Apex › Data & encoding

How a QR code is built (Reed-Solomon + masking)

A QR code is a little error-corrected data packet drawn as a grid. Build a real Version-1 (21×21) code end to end: the finder patterns a scanner locks onto, numeric data packed into codewords, Reed-Solomon ECC over GF(256) (why a torn or logo-covered code still reads), the zig-zag bit placement, and the mask chosen by a penalty score to keep the grid readable. The generator is verified in node against the ISO/IEC 18004 Annex-I example — data codewords 10 20 0C 56 61 80…, ECC A5 24 D4 C1 ED 36 C7 87 2C 55, all ten RS syndromes zero — and the component decodes its own matrix back to the digits (reading the mask from the format strip), an in-UI round-trip. Type your own digits and watch every layer recompute.

More in Data & encoding