Your games, your website, your photos: the computer stores every one of them as 0s and 1s. Today you will encode a short message by hand, colour a tiny picture from a bit pattern, then decode someone else's bits back into letters and a drawing. By the end you will be able to explain how numbers, text and images all become binary.
A bit is the smallest piece of data a computer can store. It is either a 0 or a 1. Everything a computer keeps is built from bits.
Numbers. Binary counts in powers of two. With four bits you can store the numbers 0 to 15 (for example 0001 = 1, 0101 = 5, 1111 = 15).
Text. Every letter is first given a number, then that number is stored as bits. Today you will use this short class code (not the full computer code, just enough to send a message):
| Letter | Bits | Letter | Bits |
|---|---|---|---|
| A | 0001 | B | 0010 |
| C | 0011 | D | 0100 |
| E | 0101 | H | 1000 |
| I | 1001 | L | 1100 |
| O | 1111 | space | 0000 |
Work on paper. Keep the class code table where you can see it.
Done looks like: your message written as letters and as groups of four bits.
Images. A picture on a screen is a grid of tiny dots called pixels. In a simple black-and-white image, each pixel is one bit: 1 means colour it in, 0 means leave it blank. Line the bits up in rows and a picture appears.
Stay on paper.
Done looks like:
You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.