/ THE IDEA
An even-parity bit is chosen so the complete message contains an even number of 1s. The receiver counts again. An odd total proves that at least one bit changed. The operation behind this is XOR, often read as exclusive or. XOR returns 1 when its inputs disagree. Chaining XOR across bits tells you whether the number of 1s is odd or even.
THE FORMAL IDEA
parity = b₁ XOR b₂ XOR … XOR bₙ
| b₁ … bₙ = the message bits | | XOR combines them into one odd/even check | | the receiver recomputes and compares the result |
|
RUN THE TINY EXAMPLE
Protect 1011 with even parity
1011 contains three 1s → append parity bit 1 Sent message: 10111 contains four 1s One bit flips: 10011 contains three 1s → error detected
|
The extra bit did not say which position changed, but it changed silent corruption into a visible alarm. More elaborate codes add enough structure to locate and repair errors too.
/ SO WHAT?
This changes how to think about redundancy. A duplicate or check bit may look inefficient in a perfect world; in a noisy world it is the price of trust. Modern storage and communication systems spend extra bits to make unreliable hardware behave reliably.
ONE CAVEAT |
| A single parity bit misses any even number of flipped bits and cannot correct the error. Real systems use stronger codes matched to their expected noise. |
KEEP THIS
Add a known pattern to data and noise has something it can visibly break.
|
NEXT: How a quantum bit survives noise
|