A GTIN-13 check compares a supplied final digit with a positional calculation over the preceding twelve. Use two fictional strings to save products, sums, a zero-complement case and unresolved inputs without claiming a product investigation.
What does this GTIN-13 check actually establish?
A GTIN-13 check in this exercise compares the supplied thirteenth digit with a value calculated from the preceding twelve digits. GTIN means Global Trade Item Number, an identifier used for products. The two examples are fictional teaching strings, not identifiers presented as belonging to real products or ready-to-print labels.
The check digit is the final single digit. The calculation assigns positional multipliers of one and three to the body digits, adds their products and finds the complement to an equal-or-higher multiple of ten. A weight here means a multiplier, not the physical weight of merchandise. Preserve the method and the original text separately.
Write the contract: “V1; source explicitly stipulates GTIN-13; original thirteen-character string available; ASCII digits 0–9 only; body is the first twelve positions; final supplied digit is compared, not repaired.” ASCII digits are the ordinary characters 0,1,2,3,4,5,6,7,8,9. A visually similar character from another character set does not satisfy that input condition.
No registration, product match or authenticity check is performed. A numerical match refers only to the arithmetic carried out here. It is not permission to list a product, print a label or update inventory. The perfume-store trust discussion involves questions that this calculation has not investigated. Keep that boundary visible beside the outcome rather than turning a narrow result into a broad assurance.
Keep all thirteen original digits beside the split fields
The independent English inputs are B1=2000000000022 and B2=2000000000060. Copy each as text, including every zero. Split off the supplied final digit while retaining the complete original. These strings support a manual demonstration only. They are not assigned to a product in this exercise.
| ID | Original thirteen digits | First twelve digits | Supplied final digit |
|---|---|---|---|
| B1 | 2000000000022 | 200000000002 | 2 |
| B2 | 2000000000060 | 200000000006 | 0 |
B1’s twelve-digit body is 200000000002 and its final supplied digit is 2. B2’s body is 200000000006 and its final supplied digit is 0. Body means the characters before the final check digit, not a shortened version of the original. Including the thirteenth character in the body calculation shifts the task and loses the intended comparison.
Store a string rather than relying on numeric display formatting. For example, an additional unresolved input 0100000000007 must retain its initial zero. Its scheme has not been confirmed, so we do not calculate it as another GTIN example. Replacing it with 100000000007 would change the source and its length. Keep that unresolved input separate from B1 and B2.
The translated-number worksheet can help specify a position-by-position copy check. Do not silently remove spaces or hyphens to make an input look cleaner. Request the original string and its intended scheme. An apparently helpful formatting repair can remove the evidence of what was actually supplied.
Keep V1 unchanged. If the source owner later confirms a correction, record a new version and calculate from that version. Overwriting the final supplied digit with the expected value would mix checking with repair. This exercise gives no authority to change source records. A mismatch is a reason to preserve the evidence and ask a question, not to guess which character was intended.
Anchor the weight of three at the rightmost body digit
The retained GS1 Romania rule begins with the position immediately before the check digit. Multiply that rightmost body digit by three, move left and alternate one and three. For a body of twelve digits, the same pattern written left to right is 1,3,1,3,1,3,1,3,1,3,1,3. Direction matters; do not start from a vague instruction to alternate without an anchor.
Number the body positions one through twelve from the left. Position twelve has weight three and position one has weight one. The check digit is outside this table. Verify those two endpoint weights before multiplying the intermediate digits. A one-position shift can make a plausible-looking table describe a different calculation.
For B1, the first product is 2×1=2. The intervening zero digits contribute zero products. The last body digit is 2 and its weight is 3, producing 6. B2 has the same first product but a last body digit of 6, producing 18. Keep all twelve rows, including the zero entries, so another reader can check positions rather than merely trust two nonzero terms.
B1: position and product
| Position | Digit | Weight | Product |
|---|---|---|---|
| 1 | 2 | 1 | 2 |
| 2 | 0 | 3 | 0 |
| 3 | 0 | 1 | 0 |
| 4 | 0 | 3 | 0 |
| 5 | 0 | 1 | 0 |
| 6 | 0 | 3 | 0 |
| 7 | 0 | 1 | 0 |
| 8 | 0 | 3 | 0 |
| 9 | 0 | 1 | 0 |
| 10 | 0 | 3 | 0 |
| 11 | 0 | 1 | 0 |
| 12 | 2 | 3 | 6 |
B2: position and product
| Position | Digit | Weight | Product |
|---|---|---|---|
| 1 | 2 | 1 | 2 |
| 2 | 0 | 3 | 0 |
| 3 | 0 | 1 | 0 |
| 4 | 0 | 3 | 0 |
| 5 | 0 | 1 | 0 |
| 6 | 0 | 3 | 0 |
| 7 | 0 | 1 | 0 |
| 8 | 0 | 3 | 0 |
| 9 | 0 | 1 | 0 |
| 10 | 0 | 3 | 0 |
| 11 | 0 | 1 | 0 |
| 12 | 6 | 3 | 18 |
The tables retain each original digit, position, multiplier and product. Nothing is rounded and no percentage is calculated. The rounded-percentage audit involves a different numerical representation; here all intermediate products are exact integers. Do not label a product as the final digit before completing the sum and complement stages.
Compare the expected digit, including the zero-complement case
B1’s product sum is 2+6=8. The nearest multiple of ten that is equal to or greater than eight is ten. Subtract 8 from 10 to obtain 2. The supplied final digit is also 2, so the arithmetic matches. Record the control 8+2=10 beside the decision.
B2’s sum is 2+18=20. Twenty is already an eligible multiple of ten, so the complement is 20−20=0. Do not unnecessarily move up to thirty and produce ten. The check value is one digit; this exact-multiple case is why “always subtract from the next ten” needs the equal-to qualification. The supplied zero matches the computed zero.
Now compare deliberately mismatching final digits while keeping the bodies unchanged:2000000000023 and 2000000000061. Expected digits remain 2 and 0, not 3 and 1. Record mismatch without replacing the final character. A mismatch alone does not identify which source position was copied incorrectly.
Resolve three claims with evidence. Reject “every body position has the same multiplier,” citing positions one and twelve. Reject “a sum of twenty requires check digit ten,” citing B2’s equal-multiple calculation. Mark “matching arithmetic proves the product was checked” unsupported: no product or registry investigation was performed.
The contact-evidence review also preserves the boundary between a limited observation and identity. This card is narrower still: it compares a supplied string with an arithmetic result. Do not promise that the check detects every possible error or transposition, and do not claim that a scanner or a live system was exercised.
Which inputs stay unresolved without automatic cleanup?
If the original string is missing, someone’s recollection that it ends in two is not enough. The twelve body digits and the stipulated scheme are required. Ask the source owner for the exact original and the intended format. Thirteen visible characters alone do not establish that this particular method applies.
A source with twelve or fourteen characters is outside this card’s thirteen-character contract. Do not add a leading zero, cut a trailing character or delete separators merely to make it pass. Preserve the original and mark application of this calculation unresolved. A different scheme needs its own confirmed rule rather than an improvised conversion.
A full-width1 resembles an ordinary 1 but is not an ASCII digit. The exercise does not silently normalize it, assign it zero or infer which digit the source owner wanted. Keep the original text and request a confirmed input. The unresolved 0100000000007 example likewise preserves its leading zero without assuming a scheme.
The artificial intelligence guide offers broader context if you later compare a tool’s answer. No such run is part of this manual exercise. A generated answer cannot supply a missing original, and a successful comparison of these fictional rows would not certify any model, scanner or retail application across all inputs.
Save and reopen one named check-digit note
On Windows, open Start, type Notepad and launch the editor. Create a new blank document headed “GTIN-13 arithmetic V1.” Copy the contract and both complete original strings. Add the twelve-digit bodies, supplied final digits and both position tables. Preserve each sum, equal-or-higher multiple of ten, expected digit and comparison.
Include the two deliberate final-digit mismatches and all three claim decisions with their evidence. Add the unresolved input 0100000000007 with its first zero intact, the source-owner question and this limit: “No registration, product match or authenticity check was performed.” Do not replace any supplied digit with the computed answer.
Press Ctrl+S, choose Documents, enter gtin13-check-V1.txt as the file name and select Save. Close the editor. Open Documents in File Explorer and double-click gtin13-check-V1.txt to reopen that named file. Check B2’s sum 20 and complement 0, both complete source strings, and the leading zero of the unresolved input.
A suggested fifteen-minute allowance gives three minutes to source scope, five to positional work, four to comparisons and three to saving and reopening. This is a cognitive plan, not a measured participant trial. In earlier public writing about perfection and effectiveness, I described delaying work over details. The application here is completing one reproducible note, not inventing a store result or a customer success story.
Frequently asked questions
Should the thirteenth supplied digit enter the body table?
No. This card calculates from the first twelve digits and then compares the result with the supplied thirteenth digit.
Does a sum of twenty produce check digit ten?
No. Twenty itself is an eligible multiple of ten. Subtracting twenty from twenty gives the single digit zero.
May I discard leading zeros or normalize unknown characters?
No. Preserve the original string and length. Missing scheme or unsuitable characters leave this calculation unresolved until the source is clarified.
Does a matching digit establish product authenticity?
No. This exercise performs no registration, product-match or authenticity check. Its result concerns only the arithmetic actually carried out.


