Worked example · Computer Science · Year 7
LNF: Numeracy → Developing mathematical proficiency → Conceptual understanding
A complete, secure Year 7 answer, annotated so you can see which success criterion each part meets. It is also the answer key. Headline answers: Icon A is a house with a door; Icon B is a heart; Icon C uses 32 bits; file sizes are 8, 16, 32 and 64 bytes; Icon B takes 36 characters in run-length code. The most common mistakes are forgetting that a colour pixel needs 2 bits, and thinking that doubling the width and height doubles the size.
| Question | Answer |
|---|---|
| Pixels in 8 by 8 and 16 by 16 | 64 and 256 |
| Bits in a byte | 8 |
| Colours with 1, 2 and 3 bits | 2, 4 and 8 |
| □ | □ | □ | ■ | ■ | □ | □ | □ |
| □ | □ | ■ | ■ | ■ | ■ | □ | □ |
| □ | ■ | ■ | ■ | ■ | ■ | ■ | □ |
| ■ | ■ | ■ | ■ | ■ | ■ | ■ | ■ |
| □ | ■ | □ | □ | □ | □ | ■ | □ |
| □ | ■ | □ | ■ | ■ | □ | ■ | □ |
| □ | ■ | □ | ■ | ■ | □ | ■ | □ |
| □ | ■ | ■ | ■ | ■ | ■ | ■ | □ |
The picture is a house with a pointed roof, walls and a door in the middle.
The pupil moves from one representation (bits) to another (a picture). Evidences criterion 1.
| Row | Bits | Row | Bits |
|---|---|---|---|
| 1 | 00000000 | 5 | 01111110 |
| 2 | 01100110 | 6 | 00111100 |
| 3 | 11111111 | 7 | 00011000 |
| 4 | 11111111 | 8 | 00000000 |
Every row has exactly 8 bits, one for each pixel. Evidences criterion 1.
| W | Y | Y | W |
| Y | O | O | Y |
| W | Y | Y | W |
| G | G | G | G |
A yellow flower with an orange centre, above green grass.
(b) 16 pixels × 2 bits = 32 bits (4 bytes). It is not 16 because each pixel needs 2 bits to choose one of 4 colours, not 1 bit.
The pupil splits each row into pairs before decoding, and links the number of bits to the number of colours. Evidences criteria 1 and 3.
| Icon | Pixels | Bits per pixel | Bits | Bytes |
|---|---|---|---|---|
| 8 by 8, 2 colours | 64 | 1 | 64 | 8 |
| 8 by 8, 4 colours | 64 | 2 | 128 | 16 |
| 8 by 8, 16 colours | 64 | 4 | 256 | 32 |
| 16 by 16, 4 colours | 256 | 2 | 512 | 64 |
(b) No. Doubling the width and the height makes 2 × 2 = 4 times as many pixels (64 becomes 256). With 4 colours the size goes from 16 bytes to 64 bytes, which is 4 times as big, not twice.
(c) 1 bit can only be 0 or 1, so it can only show 2 colours: 3 colours is a non-example. She needs 2 bits per pixel, which gives 4 codes, so one code is spare.
The pupil connects pixels to area and uses the table to test Harri’s claim, instead of just agreeing. Nia’s idea is used as a non-example. Evidences criteria 2 to 5.
| Row | Runs | Characters | Row | Runs and characters |
|---|---|---|---|---|
| 1 | 8W | 2 | 5 | 1W6B1W, 6 |
| 2 | 1W2B2W2B1W | 10 | 6 | 2W4B2W, 6 |
| 3 | 8B | 2 | 7 | 3W2B3W, 6 |
| 4 | 8B | 2 | 8 | 8W, 2 |
(b) Total: 2 + 10 + 2 + 2 + 6 + 6 + 6 + 2 = 36 characters compared with 64 bits. Row 2 is longer (10 characters instead of 8), because its colour changes 4 times, so there are 5 short runs. Run-length code only saves space when there are long runs of the same colour.
The pupil checks each run adds up to 8 pixels, and explains when the method does not help. Evidences criteria 1 and 5.