Everything a computer stores is ultimately just bits — this subtopic is about how those bits represent numbers and characters.
| System | Base | Digits used |
|---|---|---|
| Decimal | 10 | 0–9 (what humans normally use) |
| Binary | 2 | 0–1 (what computers natively use) |
| Hexadecimal | 16 | 0–9 and A–F (a compact way to represent binary) |
Converting decimal to binary: repeatedly divide by 2, recording the remainder each time, then read the remainders bottom-to-top.
Example
Convert 13 to binary: 13 ÷ 2 = 6 remainder 1 6 ÷ 2 = 3 remainder 0 3 ÷ 2 = 1 remainder 1 1 ÷ 2 = 0 remainder 1 Reading remainders bottom-to-top: 1101
Converting binary to decimal: multiply each bit by its place value (powers of 2, right to left starting at 2⁰) and sum the results.
Example
Convert 1101 to decimal: (1×8) + (1×4) + (0×2) + (1×1) = 8 + 4 + 0 + 1 = 13
Converting between binary and hexadecimal is fast because each hex digit represents exactly 4 binary bits — group the binary into sets of 4 from the right, then convert each group.
Example
Binary 1101 1010 → group into 4s: 1101 = D, 1010 = A → Hexadecimal: DA
The number of possible combinations for n bits is 2ⁿ. This is why a fixed number of bits limits the range of values you can represent.
| Bits | Possible combinations | Unsigned range |
|---|---|---|
| 4 | 2⁴ = 16 | 0–15 |
| 8 | 2⁸ = 256 | 0–255 |
| 16 | 2¹⁶ = 65 536 | 0–65 535 |
Digital character representation — how text is stored as numbers:
💡 Exam Tip
Practise binary/hex/decimal conversions by hand until they're fast and automatic — this is a guaranteed, low-effort-to-master mark source in both papers.