Binary to Denary Conversion
To convert an unsigned 8-bit binary number to denary, you work out the value that the eight bits stand for. Each bit has a place value — a power of 2 — with 128 on the left and 1 on the right. Write the place values above the bits, then add up only the place values that sit under a 1.
Take the pattern 10110100. The table shows each bit with its place value and what it contributes.
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| Bit | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 |
| Contributes | 128 | 0 | 32 | 16 | 0 | 4 | 0 | 0 |
The bits holding a 0 — the 64, 8, 2 and 1 columns — add nothing, so they are ignored. Adding the rest gives 128 + 32 + 16 + 4 = 180. That is the same as multiplying each bit by its place value and adding the results: 1×128 + 0×64 + 1×32 + 1×16 + 0×8 + 1×4 + 0×2 + 0×1 = 180.
Do not read a binary pattern as though it were a denary number. 10110100 is not the denary number 10,110,100 — each bit must be matched to its place value first.
Edexcel GCSE Computer Science · Binary to Denary Conversion
Edexcel GCSE Computer Science · Denary to Binary Conversion