GCSE · Computer Science · AQA · Spec 8525
Hexadecimal (base 16)
Read this out loud without losing your place: 1101011010110110. Tricky, right? Now try D6B6. Same bits, same number, far fewer characters. That shorthand is hexadecimal.
Computer Science · Number bases
Eight bits, written in hex
Each square is one bit. Tap one to flip it between 0 and 1: the row of squares is the binary. The Denary readout gives the value in ordinary base 10, and the Hex readout gives the same value in hexadecimal, using far fewer digits than the row of bits. Set the eight bits however you like.
Predict, then check
You know hex uses 0 to 9. Commit to what finishes the list before you peek.
Hex uses the digits 0 to 9 and needs sixteen digits altogether. Which finishes the list?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
A shorter way for people to write binary, while the computer carries on with its 1s and 0s.
What you need to know
- Hexadecimal, or hex, is a base-16 number system: it has sixteen different digits.
- Those digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.
- There's no G. Hex stops at F, so a string containing G, or any later letter, isn't a hex number.
Have a goYour mate writes 2G4 and says it's a hex number. Spot the problem.
G isn't a hex digit.
Hex's digits are 0 to 9 and A to F, and that's all. Any G in the string means it can't be hex.
- People often use hex instead of binary because it's easier to read and interpret.
Have a goWhich would you rather copy out by hand: 1101011010110110 or D6B6? Say why.
D6B6, because it has far fewer digits.
Fewer digits means less to read and less to get wrong, which is why people like hex. The computer doesn't copy anything: it keeps binary.
- It also uses fewer digits than binary for the same value.
- Computers use binary to represent all data and instructions. They only ever store and process binary.
- Hex is a shorthand for humans: writing a value in hex leaves the number of bits underneath exactly the same.
Have a goQuick one: a value takes up 24 bits in memory. You write it in hex. How many bits is it now?
Still 24.
Hex only changes how a person writes the value. The bits underneath stay exactly the same, so nothing is saved.
The big picture
Hexadecimal (hex for short) is a base-16 number system, so it uses sixteen single digits: 0 to 9, then A, B, C, D, E and F. People use hex instead of binary because it's easier to read and interpret and it uses fewer digits. The computer never uses hex, though. It stores and processes binary only, and writing a value in hex doesn't change the number of bits underneath.
Key points
Worked example
Problem
A 32-bit value is shown on screen in hexadecimal as CAFEBABE. (a) Give one reason why a programmer might view it in hexadecimal instead of binary. (b) How many bits does the computer use to store the value?
⚠ Watch out
Treating hex as denary with a few letters tacked on: carrying on to G after F. It looks convincing. It isn't. Hex stops at F, and a string with a G in it isn't a hex number.
Memory hook
Hex is for Humans. Sixteen digits from 0 to F, the same bits underneath, and the computer never sees any of it.
Check yourself
Your friend says: "There's no point learning hex, because the computer doesn't even use it." One half of that is true and the other half isn't. Which half is which, and why?
Flashcards
(6)What number base is hexadecimal?
List the hexadecimal digits in order.
Is G a hexadecimal digit?
Who is hex written for, the computer or people?
Does a computer store or process data in hex?
Does writing a value in hex make it take up less memory?
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 28 October 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.