GoalChange binary numbers to decimal and use binary to colour a simple pixel picture.
New words
place value · what a digit is worth because of where it standsconvert · to change a number from one system to anotherpixel · one tiny square dot in a digital picturegrid · rows and columns of equal squares
Explanation
To change a binary number to decimal, write the place values 16, 8, 4, 2, 1 under its digits, then add the places that have a 1. For example, 10011 has 1s in the 16s, 2s and 1s places: 16 + 2 + 1 = 19. A famous computer joke says ‘there are 10 kinds of people in the world’: if you read 10 as binary, it means two kinds. Binary is also how pictures are stored. A digital picture is a grid of tiny squares called pixels. In a simple black-and-white picture, 1 means a coloured square and 0 means an empty one. Each row is a binary number. You can draw a picture by colouring only the 1s.
Binary
Places that are 1
Add
Decimal
10011
16, 2, 1
16 + 2 + 1
19
11011
16, 8, 2, 1
16 + 8 + 2 + 1
27
1110
8, 4, 2
8 + 4 + 2
14
Worked examples
Convert 10110: the 1s are in the 16s, 4s and 2s places. 16 + 4 + 2 = 22. So 10110 is twenty-two.
4
0
0
1
0
0
4
0
0
1
0
0
31
1
1
1
1
1
4
0
0
1
0
0
4
0
0
1
0
0
A plus sign on a 5 by 5 grid has rows 00100, 00100, 11111, 00100, 00100. In decimal these rows are 4, 4, 31, 4, 4. Colour only the 1s and you see a plus sign.
31
1
1
1
1
1
17
1
0
0
0
1
17
1
0
0
0
1
17
1
0
0
0
1
31
1
1
1
1
1
Karim’s friend gives him the numbers 31, 17, 17, 17, 31. Karim changes each to five binary places: 11111, 10001, 10001, 10001, 11111. He colours the 1s. A square frame appears.
Class activity
Pixel pictures on paper. Draw three 5 by 5 grids. In the first, write the binary numbers for 4, 14, 31, 14, 4 (00100, 01110, 11111, 01110, 00100) and colour only the 1s: what shape do you see? In the second, make your own shape (keep each row the same forwards and backwards, so it is neat). Write its rows in binary and in decimal. Give the decimal list to a partner, who fills in the third grid to find your shape.