Even parity bit for 1011001 — parity and checksum

intromake the total number of 1s even

Answer

0

Why this example is worth doing

The data has four 1s, already an even count, so the even-parity bit is 0. The page states the rule as the invariant it is — the transmitted word including the parity bit must have an even number of 1s — rather than as a recipe, because the invariant is what the receiver checks and the recipe is only how the sender achieves it.

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

Data1011001

Ones in the data4even 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 4

Codeword (parity appended)10110010

Codeword (parity prepended)01011001

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)