Four bits of message, three bits of parity, seven bits sent. Flip any one of the seven in transit and the receiver doesn’t just notice — it points straight at the guilty bit and fixes it, with no resend. Slide to corrupt a bit and watch the syndrome name it.
Encoding places parity bits at positions 1,2,4 so each checks a distinct subset: p1=d1⊕d2⊕d4, p2=d1⊕d3⊕d4, p3=d2⊕d3⊕d4. On receipt three parity checks form a 3-bit SYNDROME whose value is exactly the 1-based position of the flipped bit (0 = clean). Flip it back and the message is recovered. A fail-loud self-check throws unless, for all 16 messages and all 7 error positions, the syndrome equals the error position and the correction restores the original codeword.
Hamming(7,4) corrects ONE error and detects up to one; two flips fool it (that is what the extended SECDED bit is for). The three-circle Venn is Hamming’s own 1950 picture; the arithmetic over GF(2) is exact.