2D parity over a 4×4 block — parity and checksum
coreparity in two directions corrects
Answer
1
Why this example is worth doing
Compute parity across each row and down each column, and a single flipped bit fails exactly one row check and one column check — their intersection is the error, so the scheme corrects rather than merely detects. The page draws the block with the failing row and column highlighted and notes this is the same idea as the Hamming syndrome, arrived at geometrically and at a worse overhead.
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 16 bits
Data1011001011010110
Ones in the data9— odd 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)1— total ones becomes 10
Codeword (parity appended)10110010110101101
Codeword (parity prepended)11011001011010110
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)