← Free Lesson Plans for Teachers Free Lesson Plan Grades 4–6Engineering & Coding2 sessions x 45 min2-DA-07 ⬇ Download PDF (lesson, student sheets & answer key) Driving question: How can a computer store a picture using only numbers? Students decode three hidden pictures to see how computers store images as numbers. Picture 1 uses binary (1 = filled pixel, 0 = empty). Picture 2 uses run-length codes (counts of empty and filled pixels in a row). Picture 3 uses two-bit codes for four colors. Then students design and encode their own picture for a partner to decode. Comparing the three codes shows that the same data can be represented in more than one way, and that some codes are shorter for some pictures. It is an unplugged first look at how screens, images, and file compression work. CSTA 2-DA-07 is a grade 6–8 code; grades 4–5 can do the same activity as an early introduction. CSTA codes are from the CSTA K-12 CS Standards (2017); the short labels are our own summaries, not CSTA wording. This lesson has not been reviewed or endorsed by CSTA. Students will: Geyer resources for this lesson Exit ticket: Ask: "Which code is shorter for a picture with long rows of the same color, binary or run-length? Why?" Use these sheets in class, or download the PDF for a print-ready layout. Student Sheet 1 Print-ready version in the PDF. Name: ______________________________ Date: ______________ Picture 1 (binary): 1 = color the square, 0 = leave it blank. Picture 2 (run-length): counts of blank, colored, blank, colored… in each row, always starting with blank. Student Sheet 2 Print-ready version in the PDF. Name: ______________________________ Date: ______________ Each pair of bits is one pixel: 00 = white, 01 = orange, 10 = blue, 11 = black. How many bits does this picture use? Which picture had the shortest code? Why? Student Sheet 3 Print-ready version in the PDF. Name: ______________________________ Date: ______________ My picture in binary (8 rows): My picture in run-length code: Picture 1 is a heart; Picture 2 is a robot face; Picture 3 is a sun over water. Need a print-ready copy? The PDF includes the lesson, student sheets, and answer key. Free for classroom use. You may print and copy this lesson for your students. © Geyer Instructional Products. Standards text: CSTA K-12 CS Standards © CSTA.Overview
Standards
Code Standard CSTA 2-DA-07 (2017) representing data with different codes Learning Objectives
Materials
Students stick a grid in their notebook to design their own pixel picture.
Reusable grids for decoding practice and partner challenges.Also needed
Vocabulary
Word What it means pixel One small square of a digital picture. binary A number system using only 0 and 1. bit One binary digit, 0 or 1. encode / decode To turn information into a code / to turn a code back into information. run-length code A code that counts how many of the same pixel come in a row. Safety Notes
Before You Teach
Warm-Up (5 min)
Procedure
Session 1: Binary and run-length (40 min)
Session 2: Color codes and design (45 min)
Differentiation
Support On-level Challenge • Decode only Picture 1, with every other row done.
• Use a 6 × 6 grid for the design.• Complete the procedure and student sheets as written. • How many bits would a 100 × 100 picture with 4 colors need? (20,000.)
• Invent a code for 8 colors and explain how many bits each pixel needs (3).Assessment
Criterion Beginning Developing Proficient Decode Many errors Some errors All three decoded correctly Encode One code, errors Two codes, some errors Two codes, correct Compare No comparison States which is shorter Explains why with counts Extensions
Student Sheets
Decode Pictures 1 and 2
Row Code 1 01100110 2 11111111 3 11111111 4 11111111 5 01111110 6 00111100 7 00011000 8 00000000 Row Code 1 0, 8 2 0, 1, 6, 1 3 0, 1, 1, 1, 2, 1, 1, 1 4 0, 1, 6, 1 5 0, 1, 1, 4, 1, 1 6 0, 1, 6, 1 7 0, 8 8 2, 1, 2, 1, 2 Decode Picture 3 (two-bit color)
Row Code 1 00 00 01 01 00 00 2 00 01 01 01 01 00 3 00 01 01 01 01 00 4 00 00 01 01 00 00 5 10 10 10 10 10 10 6 10 10 10 10 10 10 Design and Encode
Show answer key (for teachers)
Answer Key & Teacher Notes
Answer Key
