Hexadecimal (hex) is a base-16 number system. It uses 16 different digits: 0–9, then the letters A–F to represent values 10–15. One hex digit represents exactly 4 bits (one nibble), so two hex digits represent one byte (8 bits).
Denary
Binary (4-bit)
Hex
Denary
Binary (4-bit)
Hex
0
0000
0
8
1000
8
1
0001
1
9
1001
9
2
0010
2
10
1010
A
3
0011
3
11
1011
B
4
0100
4
12
1100
C
5
0101
5
13
1101
D
6
0110
6
14
1110
E
7
0111
7
15
1111
F
Why is Hexadecimal Used?
Long binary strings are hard for humans to read and prone to error. Hex provides a compact, human-readable representation of binary. Key uses include:
Memory addresses — e.g. 0x7FFE4C2A
Colour codes in web/CSS — e.g. #FF5733 (R=FF, G=57, B=33)
Error codes and debugging — e.g. Windows BSoD codes like 0x0000007B
MAC addresses — e.g. A4:C3:F0:85:2B:E5
Assembly/machine code — instructions written in hex
Binary to Hexadecimal
Method: Split the 8-bit binary number into two 4-bit nibbles. Convert each nibble independently to a hex digit using the table above.
Example: Convert 10110101 to hex
Split: 1011 | 0101
1011 = 11 = B
0101 = 5
Result: B5
Example: Convert 11001110 to hex
Split: 1100 | 1110
1100 = 12 = C
1110 = 14 = E
Result: CE
Hexadecimal to Binary
Method: Convert each hex digit to its 4-bit binary equivalent. Join the nibbles.
Example: Convert 3F to binary
3 → 0011
F → 1111
Result: 00111111
Hex to Denary
Method: Use column values. For a 2-digit hex number, the left digit is ×16 and the right digit is ×1.
Example: Convert A7 to denary
A = 10 → 10 × 16 = 160
7 = 7 → 7 × 1 = 7
Result: 160 + 7 = 167
Example: Convert FF to denary
F = 15 → 15 × 16 = 240
F = 15 → 15 × 1 = 15
Result: 240 + 15 = 255
Denary to Hex
Method: Divide by 16. The quotient gives the first digit; the remainder gives the second.
Example: Convert 200 to hex
200 ÷ 16 = 12 remainder 8
12 = C, 8 = 8
Result: C8
Worked Examples Summary
Binary
Hex
Denary
00000000
00
0
00001111
0F
15
11111111
FF
255
10101010
AA
170
01110000
70
112
00111100
3C
60
Exam tip: The quickest hex route in an exam is always binary ↔ hex (nibble method), not hex ↔ denary (which requires multiplication). If asked to convert between denary and hex, go denary → binary (using the column method) → hex (nibble method). Memorise: A=10, B=11, C=12, D=13, E=14, F=15.
⚠️ Common Mistakes
Forgetting that hex digits go up to F (15), not 9 — 10 in hex is not "ten", it's the letter A
Splitting 8-bit binary incorrectly — always split into two equal 4-bit nibbles from the centre
Writing hex values as decimal — e.g. writing "14" when the answer should be "E"
When converting hex FF to denary getting 99 instead of 255 — F is not 9, it is 15
Not writing leading zeros when converting to binary — 3 should be 0011, not 11
✅ Notes completed!
▶
Video coming soon
What's in this video
• The hex digit table (0–9, A–F) and why hex uses letters
• Binary to hex: split into nibbles, convert each independently
• Hex to denary: multiply each digit by its column value (16¹, 16⁰)
Q5Convert denary 175 to hexadecimal. Show your working.[3]
✅ Mark scheme
175 ÷ 16 = 10 remainder 15 [1]; 10 = A, 15 = F [1]; result: AF [1].
Q6Give three real-world uses of hexadecimal in computing.[3]
✅ Mark scheme
Any 3 from: memory addresses / colour codes in HTML/CSS (#RRGGBB) / error/debug codes / MAC addresses / machine code / assembly language [1 each].
Q7Explain why hexadecimal is preferred over binary when representing memory addresses.[2]
✅ Mark scheme
Hex is more compact/shorter than binary [1]; it is easier for humans to read and less likely to cause errors — two hex digits represent 8 bits [1].
Q8A web designer uses colour code #FF3A00. Convert each pair to denary and state what colour information each pair represents.[4]
✅ Mark scheme
FF = 255 — red value [1]; 3A: 3×16+10 = 58 — green value [1]; 00 = 0 — blue value [1]; the colour is a bright red/orange [1 for any correct interpretation of the colour].
?
out of 20 — self-mark above
Topic Quiz
Question 1 of 15
You scored
out of 15
Card 1 of 15
Click to reveal definition
🎉
Complete!
Term
Definition
🎯
Mini Test — 1.2.4d Hexadecimal
10 questions · 10 marks · 10 minutes
⏱ 10:00
10 marks
Section A — Multiple Choice [5 marks]
Q1What is the hexadecimal digit for denary 12?
Q2What is binary 10101100 in hexadecimal?
Q3What is hex FF in denary?
Q4Which of the following is a real-world use of hexadecimal?
Q5How many bits does one hexadecimal digit represent?
Section B — Short Answer [5 marks]
Q6Convert binary 01101001 to hexadecimal. Show nibble split.
Mark scheme0110|1001 → 6|9 → 69. [1]
Q7Convert hex D4 to binary.
Mark schemeD=1101, 4=0100 → 11010100. [1]
Q8Convert hex B2 to denary.
Mark schemeB=11, 11×16=176; 2×1=2; 176+2=178. [1]
Q9Convert denary 128 to hexadecimal.
Mark scheme128÷16=8 remainder 0 → 80. [1]
Q10State one reason why programmers use hexadecimal instead of binary for memory addresses.
Mark schemeHexadecimal is much shorter/more compact and easier to read than long binary strings, reducing errors when reading or typing addresses. [1]