SYNDROME DECODING the syndrome depends only on the error — so it names where the error is
A linear code has parity checks that a valid codeword satisfies. Multiply a received word by the check matrix and you get the syndrome. Its magic property: the syndrome depends only on the error, not on which codeword was sent — every codeword gives syndrome zero, so a nonzero syndrome is a pure signature of the corruption. For a Hamming code, the syndrome is the binary position of the flipped bit: read it, flip that bit, done. You never compare against a codebook; you reconstruct the error itself from a number that the message part cannot influence. That independence — syndrome as a function of error alone — is the structure the recovery rests on.
THE TECHNIQUE syndrome = H·received; depends only on the error → its position
A Hamming(7,4) codeword with one bit flipped. The demo computes the three parity checks — the syndrome — and reads off the error position: live demo
HISTORY & CREDIT Hamming 1950 · Slepian
“To find the error you compare against every codeword.” — the syndrome skips all that: it is a function of the error alone, and for a Hamming code it literally spells the error's position in binary. Decode by structure, not by search. cited
1950 · Richard Hamming — the (7,4) code whose syndrome is the error's binary address. lineage · David Slepian — the general theory of syndromes and standard-array decoding for linear codes. now · ECC memory, deep-space telemetry, every linear block code.
Every codeword maps to zero, so the syndrome is the error and nothing but the error — and for Hamming it reads out as the position to flip. Recovery from a signature the message cannot touch. Hamming 1950
RECOMMEND FOR I-13 error position read from the syndrome, computed
On the canonical compiler, flipping bit 5 of an all-zero Hamming(7,4) codeword yields parity checks 1,0,1 — syndrome 101₂ = 5, the exact position:
$ i13 run rec_syndrome.i13 # H . received -> syndrome
p1 = 1
p2 = 0
p4 = 1
syndrome = 5 -- the syndrome IS the flipped bit's position
Recommend: syndrome decoding is reconstruction of the error from a structure-guaranteed independence. i13 computes the three parity XORs and reads syndrome 5 — the position to correct — using its native bitwise ^. What makes it work is load-bearing: the syndrome is a function of the error alone, because every codeword is in the null space of the check matrix. Change the code so that were false and the syndrome would mix message with error and name nothing. The recovery is caused by the code's linear structure; i13 enacts the read-off.