FAILURE MAP
← Case archive

FA-79728 / Barcode symbology encoding / Member archive

EAN-2 parity patterns for remainders 1 and 2 are swapped · case 03

Issue numbers with value mod 4 of 1 or 2 fail the add-on parity check at the till.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Encode a two-digit EAN-2 add-on (issue number) as modules: start 1011, first character, separator 01, second character. The parity pattern is chosen by the two-digit value modulo 4: 0 LL, 1 LG, 2 GL, 3 GG, using the EAN L and G code sets. Invalid input returns None.

Why this case matters

Retail, logistics, pharmacy and document workflows depend on encoders that produce exactly the module pattern, code-set switches, separators and quiet zones scanners expect; one misplaced module or separator makes a label unreadable or, worse, scan as different data.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression: parity table order 0"10110111101010001001""10110100001010110111"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 ↗