Binary to Denary Conversion
Computers store every number as a pattern of bits, so binary to denary conversion turns a stored value into a number people can read. You work out what each bit is worth, then add up the columns that are switched on.
In binary each column is worth twice the column on its right, so an 8-bit number uses the place values 128, 64, 32, 16, 8, 4, 2 and 1. Write those eight values in a row, then write the binary number underneath with its rightmost bit lined up under the 1. That bit is always worth 1, and the place values grow as you move left. A shorter binary number lines up the same way, so the six-bit number 101101 sits under 32, 16, 8, 4, 2 and 1, giving 32 + 8 + 4 + 1 = 45.
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| Bit | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| Count it? | 128 | ignore | ignore | 16 | 8 | ignore | 2 | ignore |
Work along the columns. A 1 means the column is switched on, so its place value counts. A 0 means the column is switched off, so ignore that place value completely: it adds nothing to the total, and you never add the digit 0 itself. The denary value is the total of the place values you kept, which for the number in the table is 128 + 16 + 8 + 2 = 154.
Write out the place values and the addition instead of doing it in your head. A tidy sum is easy to check, because you can see at a glance which columns you counted, and a slip such as counting 64 where the column is really worth 32 stands out immediately. Add the place values a second time in a different order as a final check.
OCR GCSE Computer Science · Binary to Denary Conversion
OCR GCSE Computer Science · Denary to Binary Conversion
OCR GCSE Computer Science · Hexadecimal to Denary Conversion