Lesson 1: Picture codes

Unit overview - Next: Lesson 2: Colour-number keys

Back to the grade 2 year plan

Goal: Children decode rows of 0s and 1s into a picture, learn the word "pixel", and write the code for a picture.

Length: about 30 minutes.

Materials

Steps

Opening (5 min)

Show a large picture made of squares (an enlarged printout of a small icon). "When a computer shows a picture, the screen is a grid of tiny squares. Each square shows one colour. We call each square a pixel." Write "picture element" on the board, circle "pi" and "el", and write "pixel" underneath.

"A computer can't keep a picture as crayons. It keeps it as numbers. Today our code is: 0 means leave the square blank, 1 means colour it in."

Main activity (17 min)

  1. Teacher models row 1 (3 min). Write the code 0 0 0 1 0 0 beside row 1 on the board. Point to each number in turn, left to right, and colour the matching square only when the number is 1. (Answer: only square 4 is coloured.)
  2. Pairs decode the mystery picture (8 min). Give each pair the boat code card. One child reads each number aloud or points to it; the other colours. Swap readers every row. Do not say what the picture is.

    Row Code
    1 0 0 0 1 0 0
    2 0 0 1 1 0 0
    3 0 1 1 1 0 0
    4 0 0 0 1 0 0
    5 1 1 1 1 1 1
    6 0 1 1 1 1 0

    (Answer: a sailing boat. Rows 1 to 3 make a triangle sail to the left of the mast, row 4 is the mast, rows 5 and 6 are the boat. Count of coloured squares: 1, 2, 3, 1, 6, 4, so 17 in all.) 3. Write the code (6 min). Give each pair the coloured tree picture. Together they write the six row codes in the code boxes. Early finishers swap their codes with another pair and colour a blank grid from the other pair's codes to check.

    (Answer for the tree: row 1: 0 0 1 1 0 0; row 2: 0 1 1 1 1 0; row 3: 1 1 1 1 1 1; rows 4, 5 and 6: 0 0 1 1 0 0.)

Discussion questions (with answers) (4 min)

Closing check (with answers) (4 min)

On the board, draw a single row of six squares and write the code 1 1 0 0 1 1. Children show on their fingers how many squares get coloured, then one child colours them. (Answer: four; squares 1, 2, 5 and 6.)

Then colour squares 3 and 4 of a new row. "Show me the code with number cards, or write it." (Answer: 0 0 1 1 0 0.)

Vocabulary

Differentiation

Safety

Teacher notes