AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
Students must be able to represent decimal values between 0 and 255 in…
Full specification wording
Converting between number bases: Students must be able to represent decimal values between 0 and 255 in hexadecimal.
Hexadecimal is base 16, using digits 0–9 and letters A–F for the values 10–15.
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 4 of 10
Study notes
From the checked teaching notes for this specification point.
The idea
Hexadecimal is base 16, using digits 0–9 and letters A–F for the values 10–15. Any decimal value from 0 to 255 fits in two hexadecimal digits, because 16² = 256, so the largest two-digit value FF equals 15 × 16 + 15 = 255. To convert, split the decimal number into a multiple of 16 plus a remainder: divide by 16, the quotient is the first hex digit and the remainder is the second. For example, 200 ÷ 16 = 12 remainder 8, so 200 = C8 in hexadecimal. Check by reversing: C8 = 12 × 16 + 8 = 200. Values below 16 use a leading zero, so 5 becomes 05. This two-digit representation is why hexadecimal is used for bytes and colour codes.
What earns the marks
- Hexadecimal is base 16 and uses digits 0–9 plus A–F for values 10–15.
- A decimal value from 0 to 255 converts to exactly two hexadecimal digits because 16² = 256.
- Method: divide the decimal value by 16; the quotient gives the first hex digit and the remainder gives the second.
- Worked example: 200 ÷ 16 = 12 remainder 8, giving C8, and C8 = 12 × 16 + 8 = 200 confirms it.
- Values below 16 are written with a leading zero, for example 5 becomes 05.
- FF equals 15 × 16 + 15 = 255, the largest value in the range.
Common mistakes and how to put them right
Writing the decimal digits unchanged, for example giving 200 as '200' in hex.
Put it right: Divide by 16 and convert each part to a hex digit, giving C8.
Using letters beyond F or treating A as 1.
Put it right: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
Forgetting the leading zero for small values.
Put it right: Write 5 as 05 so the byte is two digits.
Reversing quotient and remainder.
Put it right: The quotient is the first (sixteens) digit and the remainder is the second (units) digit.
Exam tips
- Always show the division by 16 so the method is visible, not just the final answer.
- Check your answer by converting back: multiply the first digit by 16 and add the second.
- Remember the range 0–255 always produces two hex digits, so never write three.
- Learn the letter values A–F as 10–15 so you convert without hesitation.
Try the lesson
The start of the Converting between number bases: Students must be able to represent decimal values between 0 and 255 in hexadecimal. lesson, made from checked teaching notes for this specification point.
Have a go first
Which hexadecimal value represents the decimal number 10?
There is more to this lesson
The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge
Test your understanding of Converting between number bases: Students must be able to represent decimal values between 0 and 255 in hexadecimal.
Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge