← ACARA Digital Technologies Years 5–6

Decoding 0s and 1s into an image

To turn a code back into a picture: fill the grid row by row, colouring a square for each 1 and leaving it white for each 0. Then check the picture makes sense.

Understanding Decoding 0s and 1s into an image in ACARA Digital Technologies Years 5–6

What it does: Each line of the code is one row of the grid, so you fill the first row, then the second, working down. This is the rule that turns every digit of the code into a square you colour or leave blank. A 0 means the square stays white. Don't colour it. After you decode, check that the picture makes sense. A jumble can mean a digit was missed or the rows were filled in the wrong order. The same digits can make different pictures on different grid sizes. Share the width and height along with the code. Turning a picture into a code is encoding. Decoding goes the other way, from the code back to the picture.

Common mistakes: A 0 means the square stays white. Only a 1 is coloured in, so the line should be: if digit is 0, leave it white. Each row is read from left to right, so after each digit you move right along the row. You only move down when the row is finished.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 44–57) and word search (Modules 44–71).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
You are decoding a black-and-white image. What do you do for a 1 in the code?
Leave that square whiteColour that square in
Matches
Code 0110: colour squares 1 and 4, leave 2 and 3 white
↓
The colours are swapped. The 1s are in squares 2 and 3, so those get coloured, and the 0s in squares 1 and 4 stay white.
Applying
Meanings
Term
decode
Meaning
To turn a code back into a picture: fill the grid row by row, colouring a square for each 1 and leaving it white for each 0. Then check the picture makes sense.
Practice
FOR each row from top to bottom
Testing
Gaps
IF bit = THEN colour the square
Check Answer
Spots
2if digit is 1, colour it in
3if digit is 0, colour it in

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Stag' badge — Forest Legend, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. You are decoding a black-and-white image. What do you do for a 1 in the code?
A. Leave that square white
B. Colour that square in ✓
In our code, 1 means colour the square and 0 means leave it white.
2. You are decoding a black-and-white image. What do you do for a 0 in the code?
A. Leave that square white ✓
B. Colour that square in
A 0 means the square stays white. Don't colour it.
3. Which way do you fill in the grid when you decode a code?
A. Row by row, starting at the top left ✓
B. Any square you like, in any order
The code is read in order, so you fill in the grid row by row, from the top left. Then each digit lands in the right square.
4. A grid is 4 squares wide. The code is 1001 0110 0110 1001. How many squares are in the first row?
A. 4 squares: 1001 ✓
B. 8 squares: 10010110
The grid is 4 wide, so each row uses 4 digits. The first row is 1001.
5. You have decoded a grid and the picture looks like a messy jumble. What should you do?
A. Decide the picture is finished and stop
B. Check the code and the grid size, then try again ✓
After you decode, check that the picture makes sense. A jumble can mean a digit was missed or the rows were filled in the wrong order.

Match the Pairs

01110 → A row of 5 squares: leave the first white, colour the next three, leave the last white
11111 → A row where all 5 squares are coloured in
Decode a grid by reading the code one row at a time, from the top row down → Row 1: 10001 Row 2: 01010
A 0 means leave the square white and a 1 means colour it → 1 = colour, 0 = white
Code 0110: colour squares 1 and 4, leave 2 and 3 white → The colours are swapped. The 1s are in squares 2 and 3, so those get coloured, and the 0s in squares 1 and 4 stay white.
Row 1 of a 4-square grid: 10101 so colour 5 squares → The row has 5 digits but the grid is only 4 squares wide, so the code and the grid do not match. Check the picture makes sense before sharing it.

Key Term

decode
To turn a code back into a picture: fill the grid row by row, colouring a square for each 1 and leaving it white for each 0. Then check the picture makes sense.

Fill in the Blanks

1. IF bit = 1 THEN colour the square
Hint: Type the binary digit that tells you to colour a square.
2. ELSE leave the square white
Hint: Type the colour a square keeps when its digit is the other binary digit.
3. FOR each row in the grid read the bits from left to right colour a square for each 1
Hint: Type the word for each line of squares across the grid, which you decode one at a time.
4. row1 ← "0110" square 1 is 0, so leave it white square 2 is 1, so colour it
Hint: Look at the second digit in the row code and type it.
5. 1. Decode the code into a grid 2. Check the picture makes sense
Hint: Type the verb for the last step, which you do once the grid is filled in.

Spot the Error

Question 1
A read the code row by row
B if digit is 1, colour it in
C if digit is 0, colour it in
Line C — A 0 means the square stays white. Only a 1 is coloured in, so the line should be: if digit is 0, leave it white.
Question 2
A grid = 4 columns by 4 rows
B start at the top left square
C read the first row of digits
D move down after each digit
Line D — Each row is read from left to right, so after each digit you move right along the row. You only move down when the row is finished.
Question 3
A Code: 0110 1001 1001
B Row 1 is 0110, so: X _ _ X
C Row 2 is 1001, so: X _ _ X
Line B — 0110 means white, coloured, coloured, white. The broken line colours the wrong squares. It should be: _ X X _.
Question 4
A Grid is 3 columns wide
B Each row needs 4 digits
C Row code 101 fits the row
Line B — The grid is 3 columns wide, so each row of the code needs exactly 3 digits. It should say 3 digits, not 4.
Question 5
A A colours a 3x3 grid
B A writes 1 for coloured cells
C A writes 2 for white cells
D A gives the code to B
Line C — Binary code only uses 0 and 1. White cells are written as 0, so the line should be: A writes 0 for white cells.

Student with a class code? Join your class →