OCR · GCSE · Computer Science
Course version: J277 · Version from Sept 2022
How to convert positive denary whole numbers into 2-digit hexadecimal…
Full specification wording
Data storage: How to convert positive denary whole numbers into 2-digit hexadecimal numbers and vice versa
Hexadecimal is base 16, using the digits 0–9 and the letters A–F, where A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15.
Checked against the OCR J277 specification on .
- Point 3 of 13
- 4 key terms
Study notes
From the checked teaching notes for this specification point.
The idea
Hexadecimal is base 16, using the digits 0–9 and the letters A–F, where A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15. A 2-digit hexadecimal number has place values 16¹ = 16 and 16⁰ = 1, so it represents values from 0 to 255. To convert denary to hexadecimal, divide the number by 16: the quotient is the first digit and the remainder is the second. For example, 202 ÷ 16 = 12 remainder 10, so 202 = CA₁₆. To convert hexadecimal to denary, multiply the first digit by 16, multiply the second digit by 1, then add: CA₁₆ = 12 × 16 + 10 × 1 = 192 + 10 = 202.
What earns the marks
- Recall that hexadecimal is base 16 and that A–F represent the denary values 10–15.
- Convert denary to hexadecimal by dividing by 16, using the quotient as the first digit and the remainder as the second.
- Convert hexadecimal to denary by multiplying the first digit by 16 and the second digit by 1, then adding the two products.
- Convert any remainder or digit greater than 9 into its letter equivalent, for example 12 becomes C and 15 becomes F.
- Check a conversion by reversing the method, such as converting CA₁₆ back to 202 to confirm the answer.
Common mistakes and how to put them right
Using base 10 place values.
Put it right: Use 16 and 1 as the place values.
Writing 10, 11 or 12 as two digits.
Put it right: Write A, B or C instead.
Swapping quotient and remainder.
Put it right: The quotient is the first digit and the remainder is the second.
Exam tips
- Write out the hexadecimal digit values 0–15 before starting, so letter conversions are quick and accurate.
- For denary to hexadecimal, show the division by 16 with its quotient and remainder so your method is visible.
- For hexadecimal to denary, write the multiplication by 16 and by 1 before adding, then state the final denary value.
Try the lesson
The start of the Data storage: How to convert positive denary whole numbers into 2-digit hexadecimal numbers and vice versa lesson, made from checked teaching notes for this specification point.
Have a go first
What is the denary value of the hexadecimal number 3B?
Listen
Hexadecimal is base 16, using the digits 0–9 and the letters A–F, where A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15. A 2-digit hexadecimal number has place values 16¹ = 16 and 16⁰ = 1, so it represents values from 0 to 255. To convert denary to hexadecimal, divide the number by 16: the quotient is the first digit and the remainder is the second. For example, 202 ÷ 16 = 12 remainder 10, so 202 = CA₁₆. To convert hexadecimal to denary, multiply the first digit by 16, multiply the second digit by 1, then add: CA₁₆ = 12 × 16 + 10 × 1 = 192 + 10 = 202. A strong answer earns marks for these points. Recall that hexadecimal is base 16 and that A–F represent the denary values 10–15. Convert denary to hexadecimal by dividing by 16, using the quotient as the first digit and the remainder as the second. Convert hexadecimal to denary by multiplying the first digit by 16 and the second digit by 1, then adding the two products. Convert any remainder or digit greater than 9 into its letter equivalent, for example 12 becomes C and 15 becomes F. A common slip: Using base 10 place values: the error is treating the digits as tens and units. Instead, use 16 and 1 as the place values. Exam tip: Write out the hexadecimal digit values 0–15 before starting, so letter conversions are quick and accurate.
See it
Key words
Say what each word means before you turn the card.
Base 16 place value
Try answering aloud or in your head before turning the card.
Digit-to-letter mapping
Try answering aloud or in your head before turning the card.
Two-digit range 0 to 255
Try answering aloud or in your head before turning the card.
Reversibility of conversion methods
Try answering aloud or in your head before turning the card.
See every definition
- Base 16 place value
- A 2-digit hexadecimal number has place values 16¹ = 16 and 16⁰ = 1, so it represents values from 0 to 255.
- Digit-to-letter mapping
- Hexadecimal uses the digits 0–9 and the letters A–F, where A = 10, B = 11, C = 12, D = 13, E = 14 and F = 15.
- Two-digit range 0 to 255
- A 2-digit hexadecimal number has place values 16 and 1, so it represents values from 0 to 255.
- Reversibility of conversion methods
- A conversion is checked by reversing the method, such as converting CA₁₆ back to 202 to confirm the answer.
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 Data storage: How to convert positive denary whole numbers into 2-digit hexadecimal numbers and vice versa
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