Thread Closed

Converting Decimal to Binary

 
Share Thread Thread Tools
Sep9-08, 10:19 PM   #1
 

Converting Decimal to Binary


I'm trying to figure out how to convert from decimal to binary. I've read a few explanations but I still don't understand. Could someone please help?

The method I've read about invloved dividing the number you want to convert, by 2 each time, and looking at the remainder.
PhysOrg.com
PhysOrg
engineering news on PhysOrg.com

>> Sensitive bomb detector to rove in search of danger
>> PNNL-developed injection molding process recognized with emerging technologies award
>> How soon could car seats enter the 3-D comfort zone?
Sep9-08, 10:55 PM   #2
 
Go back to papers and find out how decimal and binary are related.
you will find the answer for question yourself.
Sep9-08, 11:18 PM   #3
 
Blog Entries: 1
Recognitions:
Science Advisor Science Advisor
Here you go:
http://www.wikihow.com/Convert-from-Decimal-to-Binary

If you're first starting out, use the division-by-powers of two method, as this is conceptually easier.
Sep10-08, 09:13 PM   #4
rbj
 

Converting Decimal to Binary


Quote by MATLABdude View Post
Here you go:
http://www.wikihow.com/Convert-from-Decimal-to-Binary

If you're first starting out, use the division-by-powers of two method, as this is conceptually easier.
an alternative method, if you have the means to do unsigned multiply of binary numbers, is to:

1. start with the Most Significant Digit of the decimal input.
2. initialize your binary accumulator to zero (then you may skip to step 4. if you like).
3. multiply the binary accumulator by 10 (00001010 in base 2).
4. add that digit, 0 to 9, to the binary accumulator.
5. move to one less significant digit (right by one place in the decimal input number).
6. if there are any remaining digits, loop back to step 3.
7. if no remaining digits, you're done; converted number in binary accumulator.

it's pretty easy to code that in C or assembly language.

now, how 'bout a nice and clean way to convert binary to decimal? know how to do that?
Thread Closed
Thread Tools


Similar Threads for: Converting Decimal to Binary
Thread Forum Replies
Decimal to binary, Decimal to Octal confusion! Electrical Engineering 10
C program (string - binary to decimal conversion) Engineering, Comp Sci, & Technology Homework 4
converting decimal to binary Calculus & Beyond Homework 5
binary to decimal confusion!!! signed numbers! Engineering, Comp Sci, & Technology Homework 1
Decimal to Binary General Math 3