Flip bits in Hamming codewords. Read the syndrome, correct one error, and compare extended parity with double-error detection.
code / syndromeObservation Model
ROUTE 98 / STRUCTURE / GF(2)
Redundancy leaves a syndrome
Encode four message bits, flip received bits, then press DECODE. Compare the decoder’s limited evidence with the original word, which is available only to the observer.
READY
Focus the canvas: arrow keys select a received bit; Space flips it; Enter decodes; R resets. A white outline marks selection, and * marks injected flips. The buttons below provide the same bit operations.
Canvas 2D is unavailable. Bit buttons, tables, decoding, self-tests and reports remain available. PNG is unavailable.
Received bits — activate to flip
DECODER / OBSERVER LEDGER
A decision is not ground truth
Only the received word enters the decoder. The original codeword and injected error mask are used after decoding for comparison. Distance counts differing bit positions.
A 1 in H includes that position in the check. XOR is addition modulo 2. Read the syndrome as binary s₂s₁s₀, with numeric value 4s₂+2s₁+s₀. Position 8 is outside these three checks; its overall parity is q = r₁ ⊕ … ⊕ r₈.
EXHAUSTIVE SELF-TEST
Test all small binary cases —
All 16 messages and 128 / 256 error masks are small enough to enumerate. Minimum distance is checked independently across every pair of distinct codewords. These checks test the implementation, not a real device.
Check
Cases / value
Result
MODEL CONTRACT
Even parity and fixed positions
Positions are numbered from 1. Parity bits occupy 1, 2 and 4; the four message bits occupy 3, 5, 6 and 7. Each check XOR is zero when encoded. Extended Hamming adds position 8 so the XOR of all eight bits is zero.
Hamming (7,4) has minimum distance 3. This single-error decoder flips position s when s≠0. A double error may therefore trigger a wrong correction, even though the nonzero syndrome detects that the received word is not a codeword.
SECDED DECISION TABLE
One corrected, two detected
s=0, q=0 → no error detected s≠0, q=1 → flip s s=0, q=1 → flip 8 s≠0, q=0 → double error detected; no correction
Extended (8,4) has minimum distance 4. These error labels are guaranteed when at most two bits were flipped. With three or more errors, the same decisions can be wrong: try TRIPLE and UNDETECTED. No error detected never guarantees correctness for unrestricted errors.
OBSERVATION GUIDE / STRUCTURE
Observe the correction boundary
Start with the clean extended code and DECODE. Choose SINGLE and decode again, then compare DOUBLE, TRIPLE and UNDETECTED. Read the decoder decision first and the observer comparison second. Switch to (7,4) to see why the extra parity bit matters.
REPORT records bits, checks, decisions and the model limit. PNG saves the current functional codeword diagram. This finite algebra model is separate from genetic mutation, network routing and quantum-correlation models.
No upload, registration or persistent storage. All controls and numeric results remain available without Canvas.
This finite binary-code model runs in your browser. Message bits, calculations, reports, and images stay local. It does not restore files, encrypt data, or measure a real communication channel.