These numbers are a code for a picture; you can use them to draw the picture on this grid. Each square on the grid is one pixel. Some pixels will stay white, and some you’ll need to colour in black.
Show numbers for “Picture 1” and empty grid.
We start on the first line of squares. The 2 means it starts with 2 white pixels, and the 7 means to colour in 7 black pixels, so let’s colour those in.
Check that child skips two squares and starts colouring in the third one. They may want to count the black pixels, mark the last one, then colour a line for the row of black pixels.
The completed first row has 2 white pixels followed by 7 black pixels.
If it gets confusing to follow the alternating white and black lengths, you could highlight the numbers corresponding to the runs of black pixels (every second number).
The next row is the same, so we have 2 white, then 7 black pixels.
The third row is more complicated. The numbers always tell you how many white, then black, then white pixels there are, and so on. How many white pixels does it start with? (2) Then what does the 1 mean? (1 black pixel).
The idea that the numbers are alternating runs of white then black pixels is important. You will need to help count carefully, as getting out by one can completely change the picture! Work through the whole row (2, 1, 1, 3, 1, 1, 1, 1).
The next row starts with a 0 - what does that mean? (No white pixels at the start, so it has 11 black pixels only). Why not just have the number 11 without the 0? (Because that would mean 11 white pixels).
Check that for "0, 11" they colour in the first 11 pixels.
This one also starts with a 0, so what colour is the first pixel? (Black).
What’s on the next row?
And the final row?
Normally pixels on a computer or printer are at least 20 times smaller than this, so let’s look at the picture from a distance to make your pixels smaller.
Depending on the size of the grid, you may want to stand some distance away to see the image clearly.
After completing Picture 1, you could try Pictures 2 to 4. The codes are here.
As a follow-on activity, you could use some blank grid paper to draw your own picture, and code it using numbers to give to someone else to decode.
The small squares that you are using are the basis of most digital pictures - they are called “picture elements”, or “pixels” for short. A good quality photo or video can have millions of pixels in it; a million pixels is called a “megapixel”, and often the number of megapixels is used to indicate the quality of a camera.
The idea of coding a run of the same colour with a number is called “run-length” coding. It can significantly reduce the amount of space needed to store the image on a computer, or the time needed to send it over a network. Run-length coding works particularly well for simple pictures that have only a few colours in them. It is the basis of sending black and white scans on fax machines, and in more recent times, variations of this idea are used in JPG files of photographs to save space. Run-length coding meant that fax transmissions would typically transmit 7 times faster than if every pixel was sent separately, because long runs of the same colour are common in high resolution scans. The general idea of looking for patterns in a file and replacing them with smaller codes is called data compression, and this is used to reduce the space that files take to store (such as photos and music on a mobile phone), and to make them faster to transmit (such as digital TV and online videos).