Three number systems and why they matter
Binary for hardware. Denary for humans. Hex for compactness.
Computers use binary because their hardware is built from switches that are either ON (1) or OFF (0). Every piece of data, every instruction, every pixel is stored as binary internally.
Humans use denary (base 10) because we have ten fingers. It's natural for us to count 0-9 then start a new column.
Hexadecimal (base 16) sits between the two — a more compact way to write binary. Programmers use hex to display binary values without writing endless 1s and 0s.
Why hex? A single byte (8 bits) needs 8 binary digits but only 2 hex digits. Hex is dense and human-readable.
| Denary | Binary | Hex |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 5 | 0101 | 5 |
| 9 | 1001 | 9 |
| 10 | 1010 | A |
| 12 | 1100 | C |
| 15 | 1111 | F |
Where you see hex in real systems:
- Memory addresses (e.g., 0x7FFE3A04).
- Colour values in HTML/CSS (#FF6600 = vivid orange).
- MAC addresses (e.g., 00:1A:2B:3C:4D:5E).
- Error codes and debugging output.
Cambridge tip. "Why is hex used?" is a near-guaranteed exam question. Top answer: it's a compact, human-readable representation of binary — 1 hex digit = 4 binary bits, so a byte fits in 2 hex digits.
- Binary: hardware (on/off).
- Denary: humans (ten fingers).
- Hex: programmer-readable compaction of binary.
- 1 nibble (4 bits) = 1 hex digit.