Parity cannot detect two errors — parity and checksum

corethe fundamental limitation

Answer

0

Why this example is worth doing

Flip two bits and the count's parity is restored, so the check passes and the corruption goes undetected. This is the honest limitation of a single parity bit: it catches any odd number of errors and no even number. The page shows a concrete pair of flips rather than stating the rule abstractly, and uses the gap to motivate every stronger scheme on the page and on the Hamming page.

Try your own input in the Parity & checksum. Even and odd parity, one’s-complement sums and the Internet checksum, step by step.

How the answer is reached

Even parity of 7 bits

Data1111101

Ones in the data6even weight

Even parity: choose the bit that makes the total number of 1s even, so the parity bit equals the XOR of all data bits.

p (even)0total ones becomes 6

Codeword (parity appended)11111010

Codeword (parity prepended)01111101

Warning:

A single parity bit detects every odd number of bit errors and is blind to every even number. It can never correct anything: d_min = 2.

Source: R. W. Hamming, Bell System Technical Journal 29(2):147–160 (1950)

Compare with

Open the Parity & checksum

This input is entered in the tool itself — it is too rich for a link to carry.

Note:

Notation this page assumes

  • Bit strings are written most significant bit first, and bit 0 is the least significant bit.
  • A width is stated explicitly wherever it changes the answer; nothing is silently sign-extended or truncated.
  • The parity bit is appended after the data bits, and a checksum is stated with the byte order it was summed in.

Sources

  • Hamming, “Error Detecting and Error Correcting Codes” (1950)
  • Braden, Borman and Partridge, RFC 1071, “Computing the Internet Checksum” (1988)