Go to main content

Encode your drawing

Computers use a special code in the form of zeros and ones to store and process information, such as text and images. In this experiment, you will use these numbers to encode drawings.

Get started

Two girls sit at table with paper in front of them and their backs to each other

Step 1

Both players take a sheet of graph paper and a pen or marker. Make sure that you can’t see each other’s paper.

A girl colours squares on squared paper

Step 2

To practise, start by drawing a square that is 5 boxes wide and 5 boxes high on your graph paper. Now you can use a code to colour in some of the boxes in the square. Going from left to right and top to bottom, write the following numbers in the boxes: 10001 11001 10101 10011 10001.
Colour in the boxes that contain a 1 and leave the boxes that contain a 0 blank.

A girl draws the letter N on checkered paper

Step 3

Do the coloured boxes form the letter ‘N’? If so, then the code worked. If not, draw a new square and try again.

A girl colours box on checkered paper

Step 4

Draw another 5x5 square and make your own picture by colouring in some of the squares and leaving some blank.

A sheet of squared paper on which some squares have been coloured in and a series of numbers written

Step 5

Take a blank sheet of graph paper and write the code for the picture you have drawn. If a box in your picture is empty, write a 0. If the box is coloured in, write a 1. Give the paper with your code to the other player, without showing them your picture.

A sheet of squared paper on which some squares have been coloured in

Step 6

The other player now has to use the code to recreate your picture. They can decode your picture by starting at the top left of the square and colouring in each box that contains a 1.

A girl colours in squares on squared paper with a notebook beside her on which a series of numbers are written

Step 7

Did the code work? Can you do the same with a bigger picture?

What did you discover?

You did it! You passed on information in code! A code is like a secret language: you need to know how the code works to understand the message. Computers use code too. They work using binary code, which means they only read the difference between a 0 and a 1. And that’s the code you used for your picture.