Denary to binary
The standard method is the place-value table:
- Write a row of place-value headings (1, 2, 4, 8, 16, 32, 64, 128) from right to left.
- Working from the left of the table, ask: does the largest column heading fit into the denary number? If yes, write a 1 under it and subtract that value from the denary number. If no, write a 0.
- Move to the next column heading and repeat with the remainder.
- Continue until you reach the rightmost column.
- The string of 1s and 0s along the bottom is the binary value.
Binary to denary
The reverse is simpler:
- Write the binary number under a row of place-value headings.
- For every column that has a 1, write down the column heading.
- Add them all up.
Converting denary to binary
Convert the denary number 175 to 8-bit binary.
Solution:
- Write the 8-bit place-value headings: 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
- 175 ≥ 128? Yes → write 1, remainder = 175 − 128 = 47
- 47 ≥ 64? No → write 0
- 47 ≥ 32? Yes → write 1, remainder = 47 − 32 = 15
- 15 ≥ 16? No → write 0
- 15 ≥ 8? Yes → write 1, remainder = 15 − 8 = 7
- 7 ≥ 4? Yes → write 1, remainder = 7 − 4 = 3
- 3 ≥ 2? Yes → write 1, remainder = 3 − 2 = 1
- 1 ≥ 1? Yes → write 1