
-----------------------------------
sport
Sun Mar 14, 2004 12:20 pm

BASE CONVERTER ANY BASE
-----------------------------------
This is a base converter that converts numbers from base 2 to base 16 and anywhere in between. It is a two ways converter therefore it will convert any number from base 16 to base 2 and any base in between.

Note if you enter a higher base than 16 or a lower base than 2 it will tell you to reenter the base. To exit the program enter 0 at the CONVERTING FROM BASE: " prompt. 

Any suggestion on how to improve the program are welcomed.

-----------------------------------
recneps
Sun Mar 14, 2004 12:30 pm


-----------------------------------
Question: Whats a base? :/

-----------------------------------
Tony
Sun Mar 14, 2004 2:36 pm


-----------------------------------
base is the value-1 up to which a single digit can go

examples:
base 2 - binary. 0 or 1
base 10 - deca, regular numbers
base 16 - hex, ..9,A,B,C,D,E,F

-----------------------------------
Paul
Sun Mar 14, 2004 5:49 pm


-----------------------------------
oh this is useful, if I could only have used it during my test of binary, octal and hex conversion.

-----------------------------------
the_short1
Sun Mar 14, 2004 7:24 pm


-----------------------------------
good stuff.. when did they make u do conversions??? compsci gr11??

nice programm and i learned something new today... what a BASE is.. ahaha lol

-----------------------------------
sport
Sun Mar 14, 2004 7:35 pm


-----------------------------------
I wrote this program during a DWITE contest a while ago, just didn't get around to edit it and post it.

-----------------------------------
Homer_simpson
Mon Mar 15, 2004 5:44 pm


-----------------------------------
i like how u got hex too...+bits

-----------------------------------
shorthair
Mon Mar 15, 2004 7:07 pm


-----------------------------------
dude when he says any base he means it , 

*EDIT* no  base 1
base2
base3
base4
........
base16

so the hex part isnt that impressive , the entire program is , i was with him when he did it , took him no time , he did an awsome job PROPS TO SPORT

-----------------------------------
sport
Wed Mar 17, 2004 11:23 am


-----------------------------------
One mistake it doesn't do base 1, because no one uses it and it will be just a bunch of zeros. However it does work with bases:2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 and 16.

-----------------------------------
Tony
Wed Mar 17, 2004 11:25 am


-----------------------------------
well you could do base 1

0 = 1
00 = 2
000 = 3
 :lol:

-----------------------------------
sport
Wed Mar 17, 2004 11:36 am


-----------------------------------
I'm planning to do an improvement version which will have more graphic stuff and I'll probable go up to 32 to 64 base and I'll be sure to include base 1 Tony.

-----------------------------------
Homer_simpson
Thu Mar 18, 2004 3:25 am


-----------------------------------
dude when he says any base he means it , 

it does base 1

base2
base3
base4
base5
base6
base7
AND SO ON 
so the hex part isnt that impressive , the entire program is , i was with him when he did it , took him no time

yo... you dunno jack sh|t about coding a program like this so dont spam pointlessly... :x

-----------------------------------
shorthair
Thu Mar 18, 2004 7:21 am


-----------------------------------
dude what was with hte flame  " i made a slight mistake on hte accuracy of hte progam , by one base  , the one i did for the ontest did base 1 " ........

 He nd i wrotethat program at on of the contests , he finished his and i finished mine , it was a contest problem ... i know exactly ho to do  it i got the 2nd highest mark in number conversion ( sport beat me ) ive been coding with him for over 2 years ,  and what was wrong with my post ,people were getting caught up in hte  " common bases " i was lettin people know that other bases work aswell.

BACK THE HELL OFF

-----------------------------------
josh
Thu Mar 18, 2004 11:49 am


-----------------------------------
This is really cool but a weird thing happend:

I told it to convert from base 5 to base 12 and I input 23 as the number to be converted. Instead of erroring it converted it. I do not know if this is correct but I thought that since the number was over 5 and I was entering a number in base 5 then it shoudln't convert.

i am sorry if I am incorect because I do not fulyl understand the concept of bases yet. If I am incorect I appologize and yo can call em an idiot. :D 

Really usefull though.

-----------------------------------
guruguru
Thu Mar 18, 2004 5:27 pm


-----------------------------------
23 is a valid number in base 5. Base 5 contains 1, 2, 3, 4, and 5. If we converted it to our deciaml system, base 10, it would be around 12... I think... But yea it is a legal base 5 number.

-----------------------------------
josh
Thu Mar 18, 2004 6:02 pm


-----------------------------------
thanx for clearing that up. I didn't realize that a base just refered to the digits of a number, and not the number on a whole. Thanx :D

-----------------------------------
guruguru
Thu Mar 18, 2004 7:10 pm


-----------------------------------
:P  Glad to help!  :P

-----------------------------------
zeldamaster1230
Fri Mar 19, 2004 7:25 pm

Close ...
-----------------------------------
23 is a valid number in base 5. Base 5 contains 1, 2, 3, 4, and 5. If we converted it to our deciaml system, base 10, it would be around 12... I think... But yea it is a legal base 5 number.
Sorry, guruguru.  Bases start at 0, not 1.  So, s abase 5 would have 0, 1, 2, 3, and 4 in it ... not the number 5, though.

-----------------------------------
josh
Fri Mar 19, 2004 8:55 pm


-----------------------------------
how is it possible to have a base 12 then??? What would take the place of number 11 because 11 is 2 digets???

-----------------------------------
shorthair
Fri Mar 19, 2004 9:47 pm


-----------------------------------
0123456789
ABCDEFGHI

once you reach the limit on  0-9 then you use  the alphabet , its most common with hex which is base 16

-----------------------------------
sport
Sat Mar 20, 2004 12:54 pm


-----------------------------------
Thanks shorthair for explaining how the program works. 

The program prosses each number by one digit or letter at a time (ABCDEF for hex), there a long number like 4124, will be processed by one digit at a time.
