The shape of the lesson
By the end of the lesson, learners can
- Sixteen digits: In the lab, flip the bits and watch each group of four turn into a single hex digit.
- Converting with nibbles: Binary and hex convert directly, four bits at a time.
- Where hex is used: The lab's colour code mode builds an HTML colour from three bytes, and its last mode lists other places hex appears.
- Digits: 0 to 9, then A = 10 up to F = 15.
- Binary to hex: split into groups of 4 from the right; convert each group.
- Hex to denary: multiply each digit by 16 or 1 (or 256, 4096 for longer numbers) and add.
- Why hex: shorter, easier for humans to read and write, fewer errors; the computer still uses binary.
One picture every idea returns to
Hexadecimal is base 16. It uses the digits 0 to 9 and the letters A to F for 10 to 15. One hex digit stands for exactly 4 bits (a nibble), so binary converts to hex by splitting it into groups of 4 from the right. Hex is used because it is shorter and easier for humans to read and write than binary, with fewer mistakes, yet converts to binary simply. The computer itself still stores binary.
Forty-five minutes, phase by phase
| Time | Phase | What happens in the room | Grouping |
|---|---|---|---|
| 0 to 5 min | Hook: predict | Open with the question in the title, Binary, shorter.. Long strings of 0s and 1s are hard for people to read and easy to copy wrongly. Put the figure on the board: it is the one picture every idea in the lesson returns to. | Whole class, then pairs |
| 5 to 13 min | Teach and check: Sixteen digits | In the lab, flip the bits and watch each group of four turn into a single hex digit. Project tab 2 of the lab (Binary and hexadecimal) and let a student drive it while the class predicts. | Whole class, then pairs |
| 13 to 21 min | Teach and check: Converting with nibbles | Binary and hex convert directly, four bits at a time. Model the worked example Binary to hex on the board, one line at a time. Your turn: Convert the hex number 3E to binary and to denary. | Pairs |
| 21 to 30 min | Teach and check: Where hex is used | The lab's colour code mode builds an HTML colour from three bytes, and its last mode lists other places hex appears. Project tab 2 of the lab (Hexadecimal colour codes) and let a student drive it while the class predicts. | Rally Coach |
| 30 to 36 min | Check | The four Stage 1 questions from the student lesson, answered on mini whiteboards or by show of fingers. Re-teach the one most get wrong. | Individual, then whole class |
| 36 to 43 min | Plenary | The exam-style questions from Stage 2, one at a time: thirty seconds alone, then a random call. The feedback lines in the key give the examiner's wording. | Individual, random call |
| 43 to 45 min | Exit and homework | Set the worksheet below (6 questions, 14 marks). Learners self-assess against the objectives before they leave. | Individual |
Protect the parts that carry the learning
The sequence carries about fifty minutes of material, so the lab is driven by one student while the class predicts rather than explored freely. Times are a guide.
Protected: the check at 30 minutes. It is the only individual read on whether the key idea landed, and it is not cut.
Cut first if the build overruns: the last check in Where hex is used, never the check or the plenary.
In a 60 minute block: run worksheet questions 1 to 3 in class as a Rally Coach set and model both the hardest worked example and its check live.
Rally Coach
Pairs share one worksheet. One partner solves the first question aloud while the other coaches, checking each line and offering a prompt rather than the answer; they swap roles for the next question.
The full structure, with its variations and the other twelve, is on the cooperative-learning page.
What to head off, and how
| Trap learners fall into | Teaching move that pre-empts it |
|---|---|
| Do not write 12 as the hex digit for twelve. | Each place holds a single character, so twelve is C; 12 in hex means 1 × 16 + 2 = 18. |
| Say that hex is easier for humans. | Computers do not store or process hex: they convert it to binary. |
Hexadecimal and where it is used: worksheet
6 questions, 14 marks. Written in the style of the papers; no past paper question is reproduced.
Convert the binary number 1010 1111 0011 to hexadecimal.
Convert the hexadecimal number 7B to denary. Show your working.
Convert the denary number 172 to hexadecimal.
Give two reasons why hexadecimal is used by programmers instead of binary.
A web page uses the colour code #33CC99. Give the denary value of the red, green and blue components.
Identify three uses of hexadecimal in computer science.
Answer key and marking notes
- 1010 = A, 1111 = F, 0011 = 3.
- AF3.
- 7 × 16 = 112; B = 11.
- 112 + 11 = 123.
- 172 = 1010 1100 in binary (128 + 32 + 8 + 4).
- 1010 = A, 1100 = C, so AC.
- It is shorter, so it is quicker to read and write.
- It is easier to understand and fewer errors are made when copying it, and it converts easily to binary (4 bits per digit).
- Red 33 = 3 × 16 + 3 = 51.
- Green CC = 12 × 16 + 12 = 204.
- Blue 99 = 9 × 16 + 9 = 153.
- HTML / web colour codes.
- MAC addresses.
- Error codes, memory dumps or IPv6 addresses (any one).
6 multiple-choice questions on this lesson
From the topic question bank. Assign them in the app for a marked score in your gradebook, or run the topic as a class game.
Why is hexadecimal often used instead of binary when values are shown to people?
- AIt is shorter and easier for humans to read and write, with fewer mistakes
- BThe processor can process hexadecimal faster than binary
- CA value written in hexadecimal takes up less storage space in memory
- DHexadecimal can represent larger numbers than binary can
Convert the 12-bit binary number 1011 1110 0101 to hexadecimal.
- ABE5
- BBD5
- C5EB
- DB145
Convert the hexadecimal number 3A to denary.
- A58
- B48
- C310
- D63
A web page uses the HTML colour code #1E90FF, written as red, green, blue. What is the denary value of the green component?
- A144
- B90
- C30
- D255
Convert the denary number 237 to hexadecimal.
- AED
- BDE
- CEC
- DFD
Which of these hexadecimal numbers has the largest value?
- AB0
- BAF
- CA9
- D9F
Quiz key
One hex digit replaces four bits, so long binary values become short and are easier for people to read, remember and copy correctly. The computer still stores and processes the value in binary, so hex is not faster and does not save memory. Any number that hex can show can also be shown in binary, just with more digits.
1011 = 11 = B, 1110 = 14 = E and 0101 = 5, so the answer is BE5. BD5 misreads 1110 as 13 (D). 5EB writes the groups in reverse order. B145 writes 14 as two denary digits instead of the single hex digit E.
3 × 16 = 48, and A = 10, so 48 + 10 = 58. 48 forgets to add the A. 310 just writes 3 next to 10 as if the places were denary. 63 reads A as 15 (that would be F).
The pairs are 1E (red), 90 (green) and FF (blue). 90 in hex is 9 × 16 + 0 = 144. 90 copies the hex digits as if they were denary. 30 is the red value (1E). 255 is the blue value (FF).
237 ÷ 16 = 14 remainder 13. 14 = E and 13 = D, so 237 = ED (check: 14 × 16 + 13 = 237). DE swaps the digits (222). EC is 236, one too small. FD is 253, from using 15 sixteens.
B0 = 11 × 16 = 176. AF = 175, A9 = 169 and 9F = 159. The left digit is worth 16 times as much as the right one, so B in the sixteens place beats any number starting with A or 9, however large its right digit is.
What to project
The student lesson embeds these tabs. Open them full screen on the projector; every slider has a drag handle on the stage.
Slides for this lesson
A projectable deck for every pack is on the way. Until then, present the student lesson full screen: its sections, figure and lab tabs follow the same order as the plan above.