Converting between Decimal & Binary.

Decimal to binary.

This can require many steps. At each step we simply divide the number by 2, until this finally results in a value of 0.
The remainder produced in each step (including any final remainder), give the digits of the binary conversion from l.s.b. to m.s.b.

e.g. converting 287 to binary;

Therefore 287 decimal, = 100011111 binary.

Example converting 65 to binary;

Therefore 65 decimal = 1000001 binary.

Binary to decimal.

To convert a binary number to decimal, then for each bit in the number that is 1, we simply add the digit weightings together.

e.g. 1100 1011.

binary to decimal conversion

Therefore 1100 1011 binary, = 203 decimal.