Number Systems · Cambridge syllabus 1.1 · Lesson 2 of 5
Hexadecimal Representation
One hexadecimal digit represents exactly four binary bits because sixteen patterns are possible in a nibble. Hex makes long bit patterns shorter to read without changing their value. Group from the right and add leading zeros when needed.
By the end, you can
- Explain why hexadecimal is a convenient representation of binary.
- Recognise that hexadecimal is more compact and easier for humans to read.
- Convert between binary and hexadecimal using groups of four bits.
- Apply hexadecimal representation in computing contexts.
Why hexadecimal is used
Hexadecimal is not a different way of storing data — everything is still binary underneath. It is a shorthand for people reading and writing binary, and it exists because long binary strings are almost impossible to copy without error.
Compare 11010110 10110110 with D6B6. The second is shorter, easier to read aloud, and far easier to check, but it means exactly the same thing. Four bits map to one hex digit with no loss and no ambiguity, which is why the conversion is mechanical rather than arithmetic.
It appears wherever people have to handle raw binary. HTML and CSS colours use hex, with two digits each for red, green and blue: #FF0000 is full red. MAC addresses are six pairs of hex digits. IPv6 addresses use hex. Memory addresses, error codes, machine-code listings and assembly language all use it, and a debugger dumping memory shows hex.
The advantages to quote in an answer are that it is shorter, easier for a human to read and write, and less error-prone — and the disadvantage is that the machine still has to convert it, and that people unfamiliar with it find it harder than denary.
Worth remembering
- Hex is a human shorthand for binary, not a separate storage format.
- Four bits map exactly to one hex digit, so conversion is mechanical.
- Used for colours, MAC and IPv6 addresses, memory addresses and error codes.
Worked example
1111 0000 1010₂ becomes F0A₁₆. A colour component FF₁₆ represents 255₁₀.
Practice
Warm-up · not marked
Check your understanding
Answer in your own words, then compare with the worked answer. Nothing here is saved or scored.
Worked answer
7 = 0111 and B = 1011, so 7B₁₆ = 01111011₂.
Check your method, units and explanation against it.
Marked practice
Set 1 of 4 · easiest first · Checked as you go, with the worked answer. Sign in or create a free account to save your progress.