how do i make a program that converts binary digits?
Author |
Message |
prima_rory
|
Posted: 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? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Dan
|
Posted: Wed Apr 07, 2004 7:19 pm Post subject: (No subject) |
|
|
have it so it can covert any base to any base. |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
Paul
|
Posted: Wed Apr 07, 2004 7:22 pm Post subject: (No 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. |
|
|
|
|
|
Delos
|
|
|
|
|
the_short1
|
Posted: Thu Apr 08, 2004 10:54 pm Post subject: (No 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... |
|
|
|
|
|
prima_rory
|
Posted: Mon Apr 12, 2004 6:01 pm Post subject: (No subject) |
|
|
Thank you |
|
|
|
|
|
|
|