Convert denary and hexadecimal
Use base-16 place values to convert positive integers between denary and hexadecimal.
This sequence follows Cambridge IGCSE Computer Science 0478, 2026–2028 syllabus Version 6. It covers subject content sections 1.1–1.3 only. The separately published 2029–2031 syllabus is not mapped here. Practice is original, self-checked and does not award an official Cambridge grade. Full timed papers and human subject-teacher review remain outstanding.
Before you begin
- No programming language is required. Be comfortable with place value and multiplication; each lesson introduces the computer-science notation it uses.
Work on paper. Try each question before revealing help, and explain why your method works.
Quick readiness check
What value does hexadecimal C represent?
What you will learn
- Use hexadecimal digits 0–9 and A–F
- Convert a positive denary integer to hexadecimal
- Convert hexadecimal to denary using powers of 16
Hexadecimal is base sixteen
The digits are 0–9 followed by A, B, C, D, E and F for values 10–15. In a two-digit number, the left digit counts sixteens and the right digit counts units.
Apply and check the rule
To convert denary to hexadecimal, divide by 16. The quotient is the left digit and the remainder is the right digit for values below 256. For larger values, continue with powers of 16.
Pause and explain
What is denary 59 in hexadecimal?
Worked example
Convert denary 202 to hexadecimal.
Show the worked solution
- 202 divided by 16 gives quotient 12 and remainder 10.
- 12 is C and 10 is A.
- Check: C×16+A = 12×16+10.
Answer CA₁₆
Try a topic test
Choose Easy, Normal or Difficult. Save your answers and open worked review after finishing.
Test this topic →From guided practice to a new situation
Write your answer and reasoning first. Use a hint only if you are stuck. The model solution is for self-checking; your written work is not automatically marked.
Convert 74₁₀ to hexadecimal.
Give me a hint
Divide by 16 and convert the remainder to one hex digit.
Compare my reasoning
- 74=4×16+10.
- 4 is 4 and 10 is A.
4A₁₆
Look for these in your work
- Quotient 4
- Remainder A
- Place-value check equals 74
Convert 9C₁₆ to denary.
Give me a hint
C is 12; multiply the left digit by 16.
Compare my reasoning
- 9×16=144.
- C=12.
- 144+12=156.
156
Look for these in your work
- C interpreted as 12
- Correct base-16 place value
- Sum equals 156
A hexadecimal colour code has the value B4 in one channel. Convert B4₁₆ to denary for a display diagnostic.
Give me a hint
Use B=11 and 4 as the units digit.
Compare my reasoning
- The left digit contributes 11×16=176.
- Add 4 units.
- 176+4=180.
180
Look for these in your work
- B=11
- Sixteens contribution correct
- Denary result correct
Common mistakes
- Writing the denary value 10 instead of hexadecimal digit A
- Reading the left hexadecimal digit as tens rather than sixteens
What can you explain now?
What is 2F₁₆ in denary?
Compare with the explanation
47
2×16+15=47, because F represents the denary value 15.
After trying it yourself, choose your next review. This is your self-assessment.
Your review choice appears on Today. Sign in to sync it across devices.
Make it stick
How do you check a hexadecimal-to-denary conversion?
If you needed the solution, close it and solve the problem again from a blank page. A correct answer is stronger when you can explain the reason for each step.