Hamming [7, 4, 3] Visualizer

A visualization of error correction using parity bits and matrix multiplication to detect and correct single-bit errors.

Instructions

  1. 1. Original Message — Toggle data bits D1–D4 (0 or 1) to set the 4-bit message. The codeword (7 bits: D1,D2,D3,D4,P1,P2,P3) updates automatically.
  2. 2. Discover Syndromes — Click exactly one bit in the codeword to inject a single-bit error. The syndrome table on the right fills in as you discover each syndrome. Remove the error and try the next bit until all 7 syndromes are found.
  3. 3. Test Two-Bit Errors — Once all 7 syndromes are discovered, multi-bit errors are unlocked. Add two errors to see the syndrome match a different single-bit entry — demonstrating that the decoder would apply the wrong correction.

Keyboard: Tab — move between sections. Left / Right — move between bit buttons. Enter or Space — toggle. ESC — reset.

1. Original Message
2. Codeword (Click to add errors)

Syndrome Discovery

Error BitS1S2S3
Discovered: 0 / 7
Status: Healthy
Parity Check Operation (H × r = s)
Matrix (H)
Received (r)
Syndrome (s)
Note: This widget is part of the CUDA-Q Academic lesson entitled "The Basics of Classical and Quantum Error Correction". You can learn more about its context by visiting the link here.