Hamming (7,4) Code Visualizer

The Hamming (7,4) code encodes 4 data bits into 7 bits by adding 3 parity bits. It can detect up to 2 errors and correct 1 error. The syndrome — XOR of parity checks — points directly to the erroneous bit. Click data bits to set message, then flip transmitted bits to inject errors.

1. Set 4 data bits (d1–d4)
d1=b3, d2=b5, d3=b6, d4=b7
p1=b1: covers b1,b3,b5,b7
p2=b2: covers b2,b3,b6,b7
p3=b4: covers b4,b5,b6,b7
2. Transmitted codeword (click to flip bits)
Syndrome:
3. Decode & correct
Press Decode to analyze syndrome...
Venn diagram (parity sets)