So you want to convert a number (decimal) into binary, do you now? Here's the pencil and paper method us old farts got taught back when the Earth was still young. As an example, we'll convert 163 to binary as we go along.

Take your number and repeatedly divide by 2 (until you reach 1, when there's really not much point in going on (but you can!)). Ignore any remainders (we'll come back later to pick them up).

163
81
40
20
10
5
2
1
Now read the column of numbers from the bottom up; write down (from left to right!) a "1" for every odd number, a "0" for every even number.

In our case, this yields 101000112=16310.

Here is how to convert a decimal number with a decimal point to binary(which was taught to us when the Earth had aged a bit). As an example we'll convert .875 as we go along.

1)Take your number and multiply it by 2. So when we do this here we get 1.75 .
2)If the result of the previous step is greater than 1, put down a 1 wherever you are writing the binary expansion, and subtract 1 from the result. So here, we put down a 1 and subtract 1 to get .75
3)Now repeat this process. In general the binary expansion may not terminate so you can take as many places as you like. In this case we multiply by 2 to get 1.5 . So we put down another 1 and take .5 as the new number. Multiplying again we get another 1 but the new number is 0.
So
(.875)10 = (.111)2 .
There, thats it!

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