Computer Science Canada BASE CONVERTER ANY BASE |
Author: | sport [ Sun Mar 14, 2004 12:20 pm ] | ||
Post subject: | 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
Any suggestion on how to improve the program are welcomed. |
Author: | recneps [ Sun Mar 14, 2004 12:30 pm ] |
Post subject: | |
Question: Whats a base? :/ |
Author: | Tony [ Sun Mar 14, 2004 2:36 pm ] |
Post subject: | |
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 |
Author: | Paul [ Sun Mar 14, 2004 5:49 pm ] |
Post subject: | |
oh this is useful, if I could only have used it during my test of binary, octal and hex conversion. |
Author: | the_short1 [ Sun Mar 14, 2004 7:24 pm ] |
Post subject: | |
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 |
Author: | sport [ Sun Mar 14, 2004 7:35 pm ] |
Post subject: | |
I wrote this program during a DWITE contest a while ago, just didn't get around to edit it and post it. |
Author: | Homer_simpson [ Mon Mar 15, 2004 5:44 pm ] |
Post subject: | |
i like how u got hex too...+bits |
Author: | shorthair [ Mon Mar 15, 2004 7:07 pm ] |
Post subject: | |
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 |
Author: | sport [ Wed Mar 17, 2004 11:23 am ] |
Post subject: | |
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. |
Author: | Tony [ Wed Mar 17, 2004 11:25 am ] |
Post subject: | |
well you could do base 1 0 = 1 00 = 2 000 = 3 |
Author: | sport [ Wed Mar 17, 2004 11:36 am ] |
Post subject: | |
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. |
Author: | Homer_simpson [ Thu Mar 18, 2004 3:25 am ] |
Post subject: | |
shorthair wrote: 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... |
Author: | shorthair [ Thu Mar 18, 2004 7:21 am ] |
Post subject: | |
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 |
Author: | josh [ Thu Mar 18, 2004 11:49 am ] |
Post subject: | |
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. Really usefull though. |
Author: | guruguru [ Thu Mar 18, 2004 5:27 pm ] |
Post subject: | |
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. |
Author: | josh [ Thu Mar 18, 2004 6:02 pm ] |
Post subject: | |
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 |
Author: | guruguru [ Thu Mar 18, 2004 7:10 pm ] |
Post subject: | |
Glad to help! |
Author: | zeldamaster1230 [ Fri Mar 19, 2004 7:25 pm ] |
Post subject: | Close ... |
guruguru wrote: 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. |
Author: | josh [ Fri Mar 19, 2004 8:55 pm ] |
Post subject: | |
how is it possible to have a base 12 then??? What would take the place of number 11 because 11 is 2 digets??? |
Author: | shorthair [ Fri Mar 19, 2004 9:47 pm ] |
Post subject: | |
0123456789 ABCDEFGHI once you reach the limit on 0-9 then you use the alphabet , its most common with hex which is base 16 |
Author: | sport [ Sat Mar 20, 2004 12:54 pm ] |
Post subject: | |
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. |