Alternate 3 and 1
The earlier digits receive alternating weights of 3 and 1. Add the products, then choose the final digit needed to reach the nearest equal or higher multiple of ten.
Episode V008 · Source record
In an EAN-13 or UPC-A retail number, the final digit is calculated from the digits before it. A mismatch can expose a changed decoded number, but a passing check does not prove authenticity, allocation, or price.
The sourced answer
The earlier digits receive alternating weights of 3 and 1. Add the products, then choose the final digit needed to reach the nearest equal or higher multiple of ten.
GS1's public example totals 57 and needs a final 3. Change one earlier digit and the required final digit can change with it.
The arithmetic does not authenticate a product, verify a price, perform a lookup, identify the wrong digit, or repair damaged bars.
Original check-digit model
The controlled mutation changes `6291041500213` to `6291041500223`. The weighted body total becomes 60, so the required final digit becomes 0 instead of the supplied 3.
Illustrative check-digit model. Not a product lookup.
These are original deterministic model results, not scanner-performance statistics. Passing the arithmetic establishes consistency only.
Controlled decoder observation
Both original lossless test images used the same dimensions, module scale, and Quiet Zones.
The valid control ran first. Both files then used zxing-cpp 3.1.1 with the same EAN13-only call.
The mismatch returned no barcode for this exact file and configuration. That result does not diagnose every failed physical scan.
Direct source library
Each note states what its reference supports and where the evidence stops. External sources open in a new tab.
Current standards
These official references support the EAN-13 and UPC-A scope, the alternating 3 and 1 arithmetic, and the limits of that whole-number check.
GS1
Pages 324 to 327, 529, and 544 to 545 support the EAN/UPC structure, reader verification, fixed-length numeric check calculation, and the distinction from other symbol mechanisms. No source figure or table is reproduced.
International Organization for Standardization
The public record identifies the current EAN/UPC bar-code symbology standard and its scope. The full normative text is paywalled and is not quoted or reproduced here.
GS1
GS1 publishes the GTIN-13 arithmetic example used in the episode. The first twelve digits produce a weighted total of 57, so the final digit is 3.
GS1
GS1 describes the check digit as a key-integrity calculation. The public calculator is a reference, not evidence of product allocation, authenticity, price, or inventory.
Barcode context
These sources provide current retail and historical context without turning the EAN/UPC rule into a universal barcode claim.
GS1 US
This overview supplies supporting retail-barcode context. It is not used to claim that a passing check digit authenticates a product or verifies a database record.
GS1
The guideline supplies current context for linear and 2D barcodes at retail. It does not establish one universal replacement date or make QR error correction equivalent to an EAN-13 check digit.
GS1
This optional history page provides background only. It is not primary support for the check-digit mechanism or the controlled decoder result.
Controlled decoder test
The selected decoder and package records identify the exact tool used. The result applies only to the preserved files and EAN13-only call.
zxing-cpp contributors
The official repository identifies the decoder project and Apache-2.0 license. No source code, logo, screenshot, or interface design is reproduced.
Python Package Index and zxing-cpp maintainers
The package record establishes the exact selected version. The local test performed no product or network lookup and returned no barcode for the deliberate mismatch after the valid control decoded.