LightMySky

Spotting a Mistake in Stored or Sent Data

Stored or sent data can change accidentally. Parity bits and check digits apply agreed checks that detect some errors without interpreting the message. A passing check does not prove the data is unchanged.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Add an even-parity bit to a row and locate one flipped data bit using row and column checks, with the check bits unchanged
  • Calculate a check digit using a stated rule and show how a single changed digit fails that rule
  • Explain why a passing check does not prove unchanged data, distinguishing one-row parity from row-and-column parity

1 · Read

You have used agreed codes to interpret bits. Data can also change accidentally during storage or transmission. Error-detection rules add check bits or digits calculated from the data. Recalculate the check when reading or receiving it. A failed check signals a problem. A passed check does not prove that nothing changed.

For even parity, count the 1s in a data row. Add parity bit 0 if the count is even, or 1 if it is odd. Include that bit when checking the total number of 1s. For example, 0101 has two 1s, so its parity bit is 0. One flipped bit changes an even total to an odd total.

Data: 0101Ones: 2Parity: 0Sent: 01010
The last bit is the added parity bit.
Try it together

For even parity, count 1s across each data row with its row check bit, then down each data column with its column check bit. Odd totals fail. Start with all checks passing. If exactly one data bit flips and check bits stay unchanged, the failed row and column locate it. For example, failures in row 1 and column 2 locate row 1, column 2.

A single row's parity misses an even number of flips in that row. Two flips preserve its even total. In a complete grid, two flips in the same row affect two different columns, so those column checks detect the change.

Even row-and-column checks can miss changes. Four data-bit flips at the corners of a rectangle affect each of two rows twice and each of two columns twice. All checks still pass if their bits stay unchanged. Passing parity does not prove unchanged data.

Digits: 1, 2, 2Sum: 5Check digit: 5Total: 10
This example uses the classroom rule described below.

Our classroom check-digit rule uses digits 0 to 9. Add the data digits, then choose one digit that makes the total a multiple of 10. If the sum already ends in 0, use check digit 0. To check a received code, add all its digits, including the check digit. A single changed digit fails this rule, but swapping digits can pass. Real product codes may use other rules.

Check bits and digits detect some errors. One flipped data bit can be located with unchanged row and column checks. Passing a check does not prove unchanged data.

Lesson, questions and flashcards written for this dataset. Check-digit examples use the stated classroom rule.

2 · Watch

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Learn first

This opens up

Nothing builds on it yet.

Where this leads

Jobs that lean on this skill. Follow one to see everything it is built on.

Then practise

8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Spotting a Mistake in Stored or Sent Data · Computing, ages 13 to 14 · LightMySky