Encoding a black-and-white image as 0s and 1s
To encode a black-and-white picture, write 1 for each black pixel and 0 for each white pixel. Work row by row, one bit per pixel.
Understanding Encoding a black-and-white image as 0s and 1s in ACARA Digital Technologies Years 5–6
What it does: The key tells everyone how to encode and decode the picture, so each pixel needs just one bit. Each line is one row of 5 pixels. Five rows of five digits make the whole 5 by 5 picture, which here is the number 1. With the key 1 = black, every black pixel is written as a 1. White pixels are written as 0. Black is 1 and white is 0, so black, white, white, white, black becomes 1 0 0 0 1. The wrong answer has the colours swapped. There are only two colours, so one bit (a 0 or a 1) is enough for each pixel.
Common mistakes: The key is back to front. In this code 1 stands for a black pixel and 0 stands for a white pixel, so it should say: Key: 1 = black, 0 = white. Each row of a 5 by 5 picture needs 5 bits, one for each pixel. This row has only 4 bits. It should be: Row 3: 1 0 0 0 0.
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.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
1 = black, 0 = whiteFill in the Blanks
Spot the Error
Student with a class code? Join your class →