Denary to Binary Conversion
Repeated division is a way of turning a denary number into binary by dividing by 2 again and again. You divide by 2, write down the remainder, and keep dividing the whole-number answer until it reaches 0.
Divide 45 by 2 and note the remainder — the 0 or 1 left over. Then divide the whole-number answer (the quotient) by 2 and note that remainder too. Stop as soon as the quotient reaches 0, because there is nothing left to halve.
| Division | Quotient | Remainder |
|---|---|---|
| 45 ÷ 2 | 22 | 1 |
| 22 ÷ 2 | 11 | 0 |
| 11 ÷ 2 | 5 | 1 |
| 5 ÷ 2 | 2 | 1 |
| 2 ÷ 2 | 1 | 0 |
| 1 ÷ 2 | 0 | 1 |
The remainders arrive the wrong way round: the first one you find is the least significant bit, which belongs on the far right of the answer. So read the list from the bottom upwards: 1 0 1 1 0 1. That gives 101101, and 32 + 8 + 4 + 1 = 45, which checks the answer is correct.
101101 is only six bits long, so add leading zeros on the left until you have eight bits: 0010 1101. The zeros add no value, but they keep every bit sitting in the correct place value column. Smaller numbers need more padding — denary 5 comes out as 0000 0101 — while values of 128 or more already fill all eight places.
Edexcel GCSE Computer Science · Denary to Binary Conversion