Grades 9–12 · Systems
How can a check bit reveal a data error?
A saved record can acquire an unwanted change when it is transferred or stored. An extra parity bit lets a computer check one property of the record afterward. A bit is a value of either 0 or 1. With even parity, the extra bit is chosen so the full protected record contains an even number of ones. Recounting the ones can then expose some changes.
In the diagramEven parity adds one check bitFour data bitsParityOriginal stored record101 bit flippedRead-back record3 ones → parity failsPass ≠ proof of no error · no correction here
The data 1011 contains three ones. Appending a parity bit of 1 produces 10111, which contains four ones and satisfies the even-parity rule. A reader counts the ones across all five protected bits, not just across the original data.
Flipping one bit changes the count by one, turning even into odd. The illustrated change from 10111 to 00111 leaves three ones, so the check fails. Any odd number of flips changes parity. Equivalently, the binary operation XOR returns 1 for an odd number of 1 inputs and 0 for an even number, providing the same check.
An even number of flips preserves parity and can therefore escape detection. Changing the first two data bits makes 01111, a different record that still contains four ones. A passing parity check does not prove that the original data survived unchanged.
The extra bit supplies a constraint, not the location of an error. One parity check cannot identify which bit changed or correct it. Stronger error-control methods are needed for broader reliability; this explanation isolates the useful but limited information provided by a single redundant bit.
About this explanation
Starting knowledge: Read bits, distinguish odd and even counts, and reason about changed bits.
Sources
- Carnegie Mellon University / Communications of the ACM — Error Correction Up to the Information-Theoretic Limit
- Carnegie Mellon University — Coding and Error Detection