CS01-04 Computer Science Watch
Denary and hexadecimal
Subscribe on YouTubeLike this lesson on YouTube
In this lesson
In this video you'll learn about denary and hexadecimal for GCSE Computer Science, with worked examples and the mistakes examiners report. By the end you'll be able to convert between denary and hexadecimal in both directions for values 0 to 255.
What it covers
- 0:54 Denary and hexadecimal: the six extra digits have to come
- 3:06 Two hundred and five now has to become two hexadecimal digits, and one question gets you the whole way there
- 5:22 Small values are the ones to be careful with, so the next one is deliberately tiny
- 7:05 Take seven E, and turn that back into an ordinary denary number
- 8:29 Common mistakes: a single dropped zero has a line
Key words
About this video
GCSE Computer Science - Denary and hexadecimal | Binary and number bases 4/9 (2026/27 exams)
In this video you'll learn about denary and hexadecimal for GCSE Computer Science, with worked examples and the mistakes examiners report.
By the end you'll be able to convert between denary and hexadecimal in both directions for values 0 to 255.
For: AQA, OCR GCSE Computer Science
Watch first: CS01-03 Why hexadecimal exists
Specifications: AQA 8525 3.3.2, OCR J277 1.2.4
Video code: CS01-04 - search YouTube for "ScholaFly CS01-04" to come straight back to this video.
Videos in this chapter:
CS01-00 — Binary and number bases - Intro
CS01-01 — Why computers use binary
CS01-02 — Denary to binary and back
CS01-03 — Why hexadecimal exists
CS01-04 — Denary and hexadecimal
CS01-05 — Binary and hexadecimal
CS01-06 — Binary addition
CS01-07 — Overflow
CS01-08 — Binary shifts
CS01-09 — Negative numbers and two's complement
#DenaryAndHexadecimal #GCSEComputerScience #ComputerScience
For more, visit ScholaFly: https://scholafly.com
Read the transcript
A design app stores the blue in your colour as the number two hundred and five. The web page next to it wants that same value written as C D. Neither version is more correct than the other, and nothing on your screen warns you when you have reached for the wrong one. Put two hundred and five into a box that is expecting hexadecimal and the machine reads a different number entirely, so out comes a colour nobody asked for.
This is video four of nine in Binary and number bases. If today feels shaky, C S oh one, oh three, Why hexadecimal exists, covers the step just before this one.
The six extra digits have to come from somewhere, and that is where the letters walk in. Hexadecimal counts zero, one, two, all the way up to nine, exactly as you would expect. Then it needs six more single digits, and it borrows the letters A, B, C, D, E and F. A is worth ten, B is eleven, C is twelve, D is thirteen, E is fourteen, and F is fifteen. That ladder is the whole of it, and it stops at fifteen. A sits on ten because ten is the first value denary cannot write with a single digit. The letters take over at exactly the point the ordinary digits run out. The trap is reading A as one, because A is the first letter of the alphabet. Do that and D comes out as four instead of thirteen, and every conversion after it is wrong. Here is one you can mark yourself. Reading straight off that ladder, what is D worth: four, thirteen, or fourteen? Take your pick, and hold on to your reason. I'll wait. D is worth thirteen. Picking four means you counted the letters instead of reading their values, and picking fourteen means you started A on eleven. So the letters are not decoration. They are digits, and each one has a fixed value you read off the ladder rather than work out.
Two hundred and five now has to become two hexadecimal digits, and one question gets you the whole way there. Name the two stages before you start, so you can tick them off and see when you are actually finished. Stage one asks how many sixteens fit. Stage two asks what is left over. Stage one is a smart-guess game, and it helps to say so. You are hunting the biggest multiple of sixteen that still fits under your number. Sixteen twelves are one hundred and ninety-two, which fits inside two hundred and five. Sixteen thirteens are two hundred and eight, which is too big. So twelve sixteens fit, and stage one is done. The only thing worth having ready is the sixteen times table as far as sixteen fifteens, which is two hundred and forty. Beyond that you are outside the range this video covers. One hundred and ninety-two taken away from two hundred and five leaves thirteen. Thirteen is the remainder, and stage two is done. Now translate both of those numbers on the ladder. Twelve is C and thirteen is D, so two hundred and five in hexadecimal is C D. In an exam you write the two digits and nothing else. The hash symbol you see in design software is a web convention sitting in front of the number, not part of it. So your handle for this video is this: how many sixteens, then what is left, and you write both. That one question, how many sixteens, carries the entire forward direction. Everything else is reading the ladder.
Small values are the ones to be careful with, so the next one is deliberately tiny. Convert eleven into hexadecimal. Pause and convert eleven, then write down every digit of your answer. Ask how many sixteens fit into eleven and the answer is none at all, so stage one gives you zero. What is left is eleven, and eleven is B. The answer is zero B. Writing B on its own is stage two answered with stage one thrown away. That leading zero is carrying real information about the number. The zero is not padding put there to make the answer look tidy. It is the answer to how many sixteens, and how many sixteens is zero. So it is two hexadecimal digits, always. Zero is written zero zero, eleven is written zero B, and the pattern holds all the way up. That fixes the range as well. Nought to two hundred and fifty-five in denary is zero zero to F F in hexadecimal, and every answer inside it wears two digits.
Take seven E, and turn that back into an ordinary denary number. The same two stages run in reverse. The left-hand digit tells you how many sixteens, so multiply it by sixteen. The right-hand digit is the leftovers, so add it on. Seven is already a number, so seven sixteens is one hundred and twelve. E is fourteen on the ladder, and one hundred and twelve plus fourteen is one hundred and twenty-six. Seven E is one hundred and twenty-six. Both stages ticked, and your answer is the second tick, never the first. There is a second route through all of this, going via four-bit binary blocks, and it is quicker once you have it. C S oh one, oh five, Binary and hexadecimal, teaches that route in full. For now, sixteens and leftovers convert anything from nought to two hundred and fifty-five, in both directions, with nothing but the ladder beside you.
A single dropped zero has a line of its own in an OCR examiner report, and it is about the answer you have just written. This comes from the report on the summer twenty twenty-two Paper One, on a question whose answer was a hexadecimal number. A common error was giving the final hexadecimal number as B, with the zero missing. Zero B and B are different numbers, and only one of them is the answer to the question. The second one is about stopping halfway. It is from the AQA report on the summer twenty twenty-five Paper Two, on a question that asked students to convert a hexadecimal number to decimal. A common partially correct answer involved students converting the hexadecimal number to binary but not completing the second step of converting this binary to decimal. Whichever route you take through a conversion, the answer is the last tick and never the one before it. That same report records around six in ten students getting both marks on it, and another quarter earning a mark for their working. So write the division and the remainder down every time. It flags one more thing worth having: students writing that F equals sixteen. F is fifteen, and sixteen is exactly the value that forces a second hexadecimal digit. This conversion is named in the AQA and OCR specifications. Edexcel asks for hexadecimal against binary instead, and C S oh one, oh five covers that side. Precision is what scores on these papers: the right letter values, both stages finished, and two digits written down.
How many sixteens, then what is left, and you write both. That line is the recap in miniature, and here are the four sentences it unpacks into. First, hexadecimal has sixteen digits, and the letters A to F carry the values ten to fifteen, with A sitting on ten. Second, denary to hexadecimal is a division by sixteen. The quotient is the first digit and the remainder is the second. Third, hexadecimal to denary is the left digit times sixteen, with the right digit added on. Fourth, you always write two digits, so eleven is zero B, and the range nought to two hundred and fifty-five is zero zero to F F.
Those thumbs going up are for you rather than for me. A thumbs-up marks a video you have nailed, so you never sit through it twice. Anything left without one is your own list to come back to. If today has not landed, save this video or the playlist, because number bases often click on a second watch a few days on.
Next in the chapter: Binary and hexadecimal, where those two hexadecimal digits turn out to be four bits each.
For more, visit scholafly.com, or watch the next video.
Related terms
For: AQA GCSE 8525, OCR GCSE J277
On the specification
For teachers
This GCSE Computer Science lesson teaches denary and hexadecimal. By the end, students should be able to convert between denary and hexadecimal in both directions for values 0 to 255. It works through three worked examples and the mistakes examiners report.