Hamming Code Playground illustration

Hamming Code Playground

How can a message repair itself? Hamming(7,4) protects four data bits with three parity bits placed at positions 1, 2 and 4, arranged so that every possible single-bit error produces a unique pattern of parity failures — a syndrome that literally spells out the position of the flipped bit in binary. Set your own data bits, click any transmitted bit to corrupt it, and watch the decoder compute the syndrome, locate the error and flip it back.

Runs 100% in your browser — simulations are computed locally on your device.

Notes

  • Parity bit at position 2ᵏ checks every position whose binary index has bit k set.
  • The three parity checks fail in exactly the pattern that spells the error position in binary.
  • Hamming(7,4) corrects any single-bit error; add one more parity bit and it also detects double errors.
  • Runs 100% in your browser — simulations are computed locally on your device.