- Home
- Lessons
- GCSE & IGCSE Computer Science
- Hexadecimal
Hexadecimal
🎬 The doodle video for this lesson is coming soon. Subscribe on YouTube to see it first.
Hexadecimal is a shorthand for binary that is much easier for humans to read and write.
Base 16
Hex uses 16 digits: 0 to 9, then A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
One hex digit represents exactly 4 bits (a nibble).
One hex digit represents exactly 4 bits (a nibble).
Hex to denary
The left digit is worth 16s, the right digit is worth 1s.
B4 = (11 × 16) + 4 = 176 + 4 = 180
FF = (15 × 16) + 15 = 255
B4 = (11 × 16) + 4 = 176 + 4 = 180
FF = (15 × 16) + 15 = 255
Hex and binary
Split binary into nibbles and convert each one.
1011 0100 → 1011 = B, 0100 = 4 → B4
Hex is used for colour codes and memory addresses because it is shorter and less error-prone than binary.
1011 0100 → 1011 = B, 0100 = 4 → B4
Hex is used for colour codes and memory addresses because it is shorter and less error-prone than binary.
Convert 2A from hex to denary.
- 2 is in the 16s column: 2 × 16 = 32.
- A = 10 is in the 1s column.
- 32 + 10 = 42
Answer: 42
Hex digits 0 to F, where A is 10 and F is 15. Left digit × 16 plus right digit. Each hex digit is one nibble of binary.
Check you have got it
Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.