Keep the reference
Stored parity bits describe the original message and never update when data changes.
Use fixed row and column parity checks to find and repair one changed data pixel.
Grades 4 to 5 · Computer Science
Your goal
Assume exactly one data pixel changed in transit. Find the mismatching row and column, mark their intersection, then flip that pixel to restore the original message.
Reduced motion is on. The controls still update the scene.
Mismatching rows: 2. Mismatching columns: 3. Selected row 1, column 1. No valid one-error intersection marked. Use the intersection only under the exactly-one-error assumption.
| Row | Column 1 | Column 2 | Column 3 | Column 4 | Stored parity | Check |
|---|---|---|---|---|---|---|
| 1 | 1 | 0 | 0 | 1 | 0 | OK |
| 2 | 0 | 1 | 1 | 0 | 1 | FAIL |
| 3 | 0 | 0 | 1 | 0 | 1 | OK |
| 4 | 1 | 0 | 0 | 1 | 0 | OK |
Fixed column parity bits: column 1: 0 (OK); column 2: 1 (OK); column 3: 1 (FAIL); column 4: 0 (OK).
Each starting message has exactly one changed data pixel and intact reference parity. Extra flips let you explore the limits: multiple errors cannot generally be located, and four corners of a rectangle can all change without failing any parity check. Matching parity alone does not prove a message is correct.
Pixel Message Repair shows how extra checking bits can help recover a damaged bitmap. Every starting message contains one changed data pixel, while its original row and column parity bits remain intact. Read the received zeros and ones, inspect the failing checks, and select the intersection of the mismatching row and column. Mark your prediction before flipping the pixel. Students can also change additional pixels to investigate the limits of this method, including patterns that pass every parity check despite containing errors. The activity explicitly separates matching checks from guaranteed correctness.
Stored parity bits describe the original message and never update when data changes.
Exactly one changed data bit fails its row and column checks.
Multiple errors may be ambiguous or invisible. Matching parity is not a guarantee of correctness.
Locate a single changed data bit at the intersection of mismatching parity checks. Ask students to predict what will happen, change one setting, and explain what they observe. Learn gives a starting point. Practice and Challenge offer new goals with the same scene.
Fixed even-parity checks on a 4 by 4 data bitmap with intact reference parity bits. Single data errors are localizable; arbitrary multiple errors are not reliably repairable.