Binary and Denary
Why computers use binary
Computers are built from transistors that have only two states: on (1) and off (0). Everything — numbers, text, images, sound — is stored in binary (base 2).
Place values
Denary (base 10) columns are powers of 10. Binary columns are powers of 2:
128 64 32 16 8 4 2 1
Binary → denary
Add the place values wherever there is a 1.
0011 0010 = 32 + 16 + 2 = 50
Denary → binary
Subtract the largest place value that fits; repeat.
50 → 32 fits (18 left) → 16 fits (2 left) → 2 fits (0 left)
= 0011 0010
Units of storage
| Unit | Size |
|---|---|
| Bit | a single 0 or 1 |
| Nibble | 4 bits |
| Byte | 8 bits |
| Kilobyte (KB) | 1000 bytes |
| Megabyte (MB) | 1000 KB |
| Gigabyte (GB) | 1000 MB |
| Terabyte (TB) | 1000 GB |
- 1 byte (8 bits) stores 256 values (0–255).
- n bits store 2ⁿ different values.
Exam tip
Write binary in groups of 4 or 8 bits to spot mistakes. To find how many values n bits hold, calculate 2ⁿ.