display | more...

Converting a binary number to decimal is much simpler than the other way around. You dont need a pencil and paper for this. Lets say you have the number (110001)2 and you wish to convert it.
So start from the right. Keep ticking off powers of two in you head. Every time you encounter a 1 add the power of two to the current answer. If you encounter a 0 just move on to the next place.
Here doing this we would get:
1+16+32=49
Quite simple!

If the binary numer has a decimal point(?) then its a little more tricky(Maybe you should get your pencil now). Anyway lets say you have (.101)2. The process is the same except that you start from the left and must use inverse powers of two. So here we have (.101)2 = (.5+.125)10 = (.625)10 .

For those of us who can't keep all those numbers straight in our heads, here's a chart to help.

---------------------------------------------------------------
|  256  |  128  |  64  |  32  |  16  |  8  |  4  |  2  |  1  |
---------------------------------------------------------------
|           |           |         |        |         |      |      |       |       |
---------------------------------------------------------------

The numbers in the top row are powers of 2, carried out to the eighth power. You can expand the chart if you need to, just double the previous number. Fill it in with the binary number you've got, say 010010110:

---------------------------------------------------------------
|  256  |  128  |  64  |  32  |  16  |  8  |  4  |  2  |  1  |
---------------------------------------------------------------
|    0     |    1    |    0   |   0   |   1   |  0  |   1  |  1 |  0   |
---------------------------------------------------------------

In the binary numbering system the only numbers that you use are 0 and 1. If you have a 0 in a columb, then nothing exists there, if you have a 1, then you have 1 of whatever that columb is. (For example, if you have a 1 in the 64 columb, then you have 64). All you have to do to convert from binary to decimal is add up all the columbs that have a 1 in them. So...

2 + 4 + 16 + 128 = 150. Voila!


The E2 Offline Scratchpad rocks for making charts :)

I was very proud when I figured out how to do this.

This method starts from the left and only requires you to remember one number (instead of remembering the powers of two like some methods require). You may find it complicated to convert higher numbers, if you discover you aren't good at multiplying by two in your head. (If so, learn the powers of two and try another method mentioned in this node.)

(1) start at the left and move right
(2) put the number zero in your head
(3) for each digit, add the digit to the number in your head and then multiply the answer by two unless you're at the last digit.

Like So: 110001
Start with 0.
Add 1 = 1.
Multiply by 2 = 2.
Add 1 = 3.
Multiply by 2 = 6.
(6 + 0) * 2 = 12
(12 + 0) * 2 = 48
48 + 1 = 49

The beauty is, this works with converting any base to base 10. Simply multiply by that base instead of by 2.

Log in or register to write something here or to contact authors.