← ACARA Digital Technologies Years 5–6

One wrong digit changes the picture

One wrong digit in an image code changes just one pixel. Decode the code back into a picture to spot the wrong pixel, then fix that digit.

Understanding One wrong digit changes the picture in ACARA Digital Technologies Years 5–6

What it does: With only 3 digits, the row is too short, so pixels after the gap slide into the wrong places. Decoding turns the 0s and 1s back into a picture, so a wrong pixel is easy to spot and the digit can be fixed. Only the third digit changed, so only the third pixel is different. Find the pixel's digit in the code and flip it from 0 to 1 or from 1 to 0. Every row needs exactly 6 digits, one for each pixel.

Common mistakes: The code has only 3 rows, so decoding gives a picture that is 3 tall, not 4. The line should say '3 tall'. Decoding row 1 gives an extra black pixel on the right, so the plus sign is spoiled. One digit is wrong. Row 1 should be 010.

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
A 5x5 picture is coded as 0s and 1s. One digit in the code is wrong. How many pixels will look wrong?
One pixelThe whole picture
Matches
Row 2 is 1001 but the picture needs 1011, so I will redraw the whole picture.
↓
Only one digit is wrong, so only one pixel needs fixing. Change the single digit instead of redrawing everything.
Applying
Meanings
Term
decode to check
Meaning
One wrong digit in an image code changes just one pixel. Decode the code back into a picture to spot the wrong pixel, then fix that digit.
Practice
11111
Testing
Gaps
Fixed code: 1 0 1
Check Answer
Spots
1Picture: 4 wide, 4 tall
2Row 1: 0110

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

The 'Meerkat' badge — Communicator, 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. A 5x5 picture is coded as 0s and 1s. One digit in the code is wrong. How many pixels will look wrong?
A. The whole picture
B. One pixel ✓
Each digit stands for one pixel, so one wrong digit changes just one pixel.
2. The code for a row should be 1 1 1 1 1, but it says 1 1 0 1 1. What will you see when you decode it?
A. A white pixel in the middle of the row ✓
B. The whole row turns white
Only the third digit changed, so only the third pixel is different.
3. How can you check if a coded picture has a mistake?
A. Count how many 1s there are and guess
B. Decode it back into a picture and look for a wrong pixel ✓
Decoding turns the digits back into a picture, so a wrong pixel is easy to spot.
4. You find one wrong pixel in the decoded picture. What is the best fix?
A. Change the one digit that makes that pixel ✓
B. Rewrite every digit in the code
Find the pixel's digit in the code and flip it from 0 to 1 or from 1 to 0.
5. A row should be 0 1 1 0 but it says 0 1 0 1 (two digits swapped). What happens?
A. Two pixels in that row show the wrong colour ✓
B. Nothing changes in the picture
Swapped digits put each digit in the wrong place, so both pixels change colour.

Match the Pairs

0110 -> 0100 → One digit changed from 1 to 0, so just one pixel in the row turns from black to white.
0110 -> 0101 → Two digits were swapped, so two pixels in the row change places.
A row should have 4 digits, but a digit went missing, so the rest of the row shifts along. → 011 (should be 0110)
To check a coded picture, decode each row into pixels and look for a pixel that does not fit the picture. → decode to check
Row 2 is 1001 but the picture needs 1011, so I will redraw the whole picture. → Only one digit is wrong, so only one pixel needs fixing. Change the single digit instead of redrawing everything.
The code looks fine, so I will not decode it to check. → A wrong digit is hard to see in a string of 0s and 1s. Decode the code back into a picture to find the mistake.

Key Term

decode to check
One wrong digit in an image code changes just one pixel. Decode the code back into a picture to spot the wrong pixel, then fix that digit.

Fill in the Blanks

1. Picture: B W W B Wrong code: 1 1 0 1 Fixed code: 1 0 0 1
Hint: Black is 1 and white is 0. Type the digit that makes the second pixel match the picture.
2. Wanted row: 1 0 0 1 Typed row: 1 0 1 0 The last two digits are swapped
Hint: Type the word for two digits that are in each other's places.
3. Row should have 4 pixels: 1 0 1 0 Code with a digit missing: 1 0 0 Missing digit: row has 3 pixels, not 4
Hint: Type how many digits are left in the broken row code.
4. code ← 1001 picture ← decode(code) show(picture)
Hint: Type the function name that turns the code back into a picture so you can check it.
5. Picture row: W B B B W Code: 0 1 0 1 0 Wrong digit is number 3 from the left
Hint: Type the position of the wrong digit, counting from the left. The third pixel should be black.

Spot the Error

Question 1
A Picture: 4 wide, 4 tall
B Row 1: 0110
C Row 2: 1001
D Row 3: 0110
Line A — The code has only 3 rows, so decoding gives a picture that is 3 tall, not 4. The line should say '3 tall'.
Question 2
A Plus sign, 3 by 3
B Row 1: 011
C Row 2: 111
D Row 3: 010
Line B — Decoding row 1 gives an extra black pixel on the right, so the plus sign is spoiled. One digit is wrong. Row 1 should be 010.
Question 3
A Letter L, 3 by 3
B Row 1: 010
C Row 2: 100
D Row 3: 111
Line B — The first two digits were swapped. This moves the black pixel one place to the right. Row 1 should be 100 so the L stands up straight.
Question 4
A Each row has 5 digits
B Row 1: 01110
C Row 2: 1001
D Row 3: 11111
Line C — Row 2 has only 4 digits when every row needs 5. A missing digit shifts the row and the picture goes wrong. It should be 10001.
Question 5
A X shape: 3 rows of 3
B row1 = 111
C row2 = 010
D row3 = 101
Line B — Decoding row1 gives three black pixels, but an X has a gap in the middle of the top row. One digit is wrong. It should be 101.

Student with a class code? Join your class →