FAILURE MAP
← Case archive

FA-71843 / Error-correcting codes / Member archive

Hamming correction flips the bit after the syndrome position · case 03

Single-bit errors are moved to the neighbouring bit instead of being repaired.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Single-error-correcting Hamming decoder for a full or shortened code of length n >= 3 (bits 0/1, else None). Positions are 1-based; parity bits sit at powers of two. The syndrome is the XOR of the positions holding a 1. A syndrome above n points outside the shortened code and is "uncorrectable" (data None); otherwise the bit at the syndrome position is flipped. Return [status, data bits from non-power-of-two positions, syndrome].

Why this case matters

Memory and link controllers use (shortened) Hamming codes to repair single-bit upsets.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression [[1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0]]["corrected", [0, 1, 0, 0, 0, 1, 1, 0], 8]["corrected", [0, 1, 0, 0, 1, 1, 1, 0], 8]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗