GCSE · Computer Science · AQA · Spec 8525
Convert binary ↔ hexadecimal
Binary to hex needs no big sum, just a pencil line down the middle. By the end of this page, 1101 0110 → D6 will take you five seconds.
Computer Science · Binary and hex
Flip a bit. Which hex digit moves?
Start with the right-hand four bits: flip any of them and watch the Hex readout. Notice something? Now try the left-hand four. Last of all, switch all eight bits on and see how far one byte goes.
Watch it done: binary to hex
Problem
Convert the byte 1011 1001 into hexadecimal.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Why a byte splits neatly in half, and how that turns binary into hex and back without a single long sum.
What you need to know
- Four bits make a nibble. A byte is eight bits, so every byte splits neatly into two nibbles.
- Four bits give 16 patterns, 0000 to 1111, and hex has 16 digits. That's why one nibble is exactly one hex digit.
- After 9, hex keeps counting with letters: A is 10, B is 11, and so on up to F, which is 15.
Have a goYour mate reckons the hex digit for 12 must be L, because L is the 12th letter of the alphabet. Are they right?
No. 12 is C.
Hex letters don't start counting from the beginning of the alphabet. They carry on after 9, so A is 10, B is 11 and C is 12.
- Inside each nibble the place values run 8, 4, 2, 1 from the left. The left nibble gets its own 8-4-2-1 too.
- Going from binary to hex? Chop the byte down the middle, count each half, then write each value as one hex digit.
Have a goHave a go before you peek: what is 0100 1110 in hex?
4E
0100 is 4, and 1110 is 8 + 4 + 2 = 14, which is the single digit E. Writing 414 would squeeze two characters into one nibble.
- Going the other way, every hex digit becomes its own four bits, joined in the same order as the digits.
- Keep the zeros on the left of a nibble: 3 is 0011, not 11. Drop them and the other bits slide out of place.
Have a goTurn the hex number 1F into an 8-bit binary number.
0001 1111
1 is 0001 with its three zeros kept, and F is 15 = 8 + 4 + 2 + 1 = 1111. Writing 1 1111 leaves only five bits.
- No decimal detour needed. Each nibble converts on its own, so you never have to work out the whole number.
- The biggest byte is 1111 1111. In hex that's FF; in decimal it's 255.
The big picture
One hex digit stands for exactly four bits, a group called a nibble, because four bits have 16 patterns and hex has 16 digits: 0 to 9, then A to F. Binary to hex: split the byte into two nibbles, find each one's value with 8, 4, 2, 1, and write each value as one hex digit, so 10 to 15 become A to F. Hex to binary: turn each digit into its own four bits, keeping zeros on the left. One byte runs from 0000 0000 up to 1111 1111, which is FF in hex and 255 in decimal.
Key points
Worked example
Problem
A game stores a character's energy in one byte and shows it on screen in hex. (a) The screen shows 5D. Write the byte in binary. (b) After a power-up, the byte is 1010 0101. What does the screen show now?
⚠ Watch out
Writing a nibble's value as an ordinary number instead of one hex digit, so 1110 1000 becomes 148 instead of E8. Looks reasonable. It isn't: the left nibble is worth 14, and 14 is the single hex digit E. Each nibble gives exactly one character.
Memory hook
Chop, count, letter. Chop the byte in half, count each half with 8-4-2-1, and turn 10 to 15 into A to F. Going back? Every digit gets four bits, zeros and all.
Check yourself
Without finding the decimal value, write 0110 1101 in hex, and write 9A as 8-bit binary. Then convert each answer back: if you get what you started with, you're right.
Flashcards
(8)What is a nibble?
Why does one hex digit match exactly four bits?
What values do the hex digits A to F stand for?
What are the place values inside one nibble, from left to right?
Binary to hex: what are the three moves?
Hex to binary: what are the moves?
What is the largest value one byte can hold?
In a two-digit hex number, what does the left digit count?
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.