GCSE · Computer Science · AQA · Spec 8525
Convert decimal ↔ hexadecimal
In hexadecimal, 10 means sixteen. Not ten: sixteen. By the end of this lesson that will feel obvious.
Decimal and hex, side by side
Watch hex count in 16s
The switches are just a quick way to set a number, so keep your eyes on the two readouts. You start at 15, which is 0F in hex: the right-hand hex digit has reached F, as high as a digit goes. Now make 16 (switch everything off except the 16) and watch the hex jump to 10. Make 32. Make 47, then 48, and see 2F roll over to 30. Last of all, switch all eight on. The 0x in front of the hex readout is only a label that means 'this is hex'. It isn't part of the number, so 0x10 is written 10.
Worked example: hex to decimal
Problem
Convert hex B7 to decimal.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Two columns, 16s and 1s: convert any whole number from 0 to 255, in either direction.
What you need to know
- A two-digit hex number has a 16s column and a 1s column: the same idea as decimal's tens and ones, with 16 in place of 10.
- Hex needs sixteen single digits: 0 to 9, then A to F for the values 10 to 15.
- Two hex digits cover every whole number from 0 to 255. That's 256 different values, because 0 counts too, but the biggest is FF = 255 (binary 1111 1111).
- Converting never changes the number itself, only the way it's written.
The big picture
A two-digit hexadecimal number has a 16s column and a 1s column, and it uses A to F for the values 10 to 15. To convert hex to decimal, multiply the left digit by 16 and add the right digit. To convert decimal to hex, find how many whole 16s fit (the left digit) and what's left over (the right digit). The biggest two-digit hex number is FF, which is 255.
Key points
Worked example
Problem
Show that hex FF is 255 in decimal, and explain why no two-digit hex number can be bigger.
⚠ Watch out
Reading hex as if it were decimal: calling hex 10 'ten', or multiplying the left digit by 10. The left digit counts 16s, so hex 10 is 16 and hex 50 is 80.
Memory hook
Every two-digit hex number answers one question: 'How many 16s, and what's left over?' Read hex 10 as 'one sixteen, no ones' and you'll never call it ten again.
Check yourself
Convert hex D3 to decimal. Then convert your answer back into hex. If you don't land on D3 again, one of your steps slipped, so find it.
Flashcards
(7)In a two-digit hex number, what does each digit count?
What values do the hex digits A to F stand for?
What is hex 10 in decimal?
Hex to decimal: what's the method?
Decimal to hex: what's the method?
What is the biggest two-digit hex number, and its decimal value?
Why is decimal 14 written as E in hex, and not 14?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 29 September 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.