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

8-bit binary 11010110 = 214 in denary, 0xD6 in hex

Denary214Hex0xD6
tap a bit to flip it

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.

Watch out: The Hex readout is the same value written another way, for people. The row of squares is what the computer holds, and changing how it's written never changes the number of bits.

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's really inside?

Where does the hex actually live?

A value in a computer's memory holds 11010110. A programmer looking at it on screen sees it written as D6.

Be honest: which is closest to what you think is going on inside the computer?
How sure are you?

Put it in writing

Explain it in your own words

Explain why people often write values in hexadecimal instead of binary, and state what this changes inside the computer. [3 marks]

0 words · your answer stays on this page and is not sent anywhere.

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

1Hex is a base-16 number system: sixteen single digits, 0 to 9 and then A to F.
2People use hex instead of binary because it's easier to read and interpret, and it uses fewer digits.
3Hex stops at F. A string containing G, or any later letter, isn't a hex number.
4Computers use binary to represent all data and instructions. They only ever store and process binary.
5Writing a value in hex is for humans. The number of bits underneath stays exactly the same.

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?
Base 16: it has sixteen different digits.
List the hexadecimal digits in order.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
Is G a hexadecimal digit?
No. The hex digits stop at F, so a string containing G isn't a hex number.
Who is hex written for, the computer or people?
People. Hex helps humans handle long binary sequences more easily.
Does a computer store or process data in hex?
No. Computers use binary for all data and instructions; hex is only how people write it.
Does writing a value in hex make it take up less memory?
No. The value is stored as the same number of bits whichever way a person writes it.

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 posted

More AQA GCSE Computer Science topics

See the full AQA Computer Science curriculum →

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.