
-----------------------------------
prima_rory
Wed Apr 07, 2004 7:15 pm

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?

-----------------------------------
Dan
Wed Apr 07, 2004 7:19 pm


-----------------------------------
have it so it can covert any base to any base. ;)

-----------------------------------
Paul
Wed Apr 07, 2004 7:22 pm


-----------------------------------
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.

-----------------------------------
Delos
Wed Apr 07, 2004 8:07 pm


-----------------------------------
Look here (I used the "Search" button...amazing...)

http://www.compsci.ca/v2/viewtopic.php?t=3245

-----------------------------------
the_short1
Thu Apr 08, 2004 10:54 pm


-----------------------------------
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...

-----------------------------------
prima_rory
Mon Apr 12, 2004 6:01 pm


-----------------------------------
Thank you :D
