Computer Science Canada

how do i make a program that converts binary digits?

Author:  prima_rory [ Wed Apr 07, 2004 7:15 pm ]
Post subject:  how do i make a program that converts binary digits?

my teacher assigned us a task to write a program which converts binary digits to decimals...can you please help me and suggest anything easy i can add into the program?

Author:  Dan [ Wed Apr 07, 2004 7:19 pm ]
Post subject: 

have it so it can covert any base to any base. Wink

Author:  Paul [ Wed Apr 07, 2004 7:22 pm ]
Post subject: 

Well if I were to make it, I'd get the length of the binary number, then use an array to hold the calculated "chart" up to that number. you know like
1, 2, 4, 8, 16 (is that it?) except in reverse, then get the sum of the product of each digit to the chart.

Author:  Delos [ Wed Apr 07, 2004 8:07 pm ]
Post subject: 

Look here (I used the "Search" button...amazing...)

http://www.compsci.ca/v2/viewtopic.php?t=3245

Author:  the_short1 [ Thu Apr 08, 2004 10:54 pm ]
Post subject: 

heheheh.... not to mention the scientific calculator on ur computer (go to accessories then calculator...) and click on view scientific... wow...

decimal to hex,binary,etc... and back and forth... kinda cool eh!...

yea... the search button is AMAZING! if only more ppl used it...

Author:  prima_rory [ Mon Apr 12, 2004 6:01 pm ]
Post subject: 

Thank you Very Happy


: