Odd parity bit for 1011001 — parity and checksum

introthe opposite convention

Answer

1

Why this example is worth doing

The same data under the odd convention gives the complementary bit. Neither convention is better, but the two ends of a link must agree, and a mismatch produces a system that reports an error on every single word — a failure mode distinctive enough to diagnose from the symptom alone. The page mentions that odd parity has one practical edge: an all-zeros word is invalid, so a dead line is detected.

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

Odd parity of 7 bits

Data1011001

Ones in the data4even weight

Odd parity: choose the bit that makes the total number of 1s odd, so the parity bit is the complement of the XOR of all data bits.

p (odd)1total ones becomes 5

Codeword (parity appended)10110011

Codeword (parity prepended)11011001

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)