Mathematics × Information theory × Publishing and records
Why can the last digit of a book number catch a typo?
Mathematics × information theory × publishing: extra information detects errors
Learn with an experimentThe last digit watches over a book number
An ISBN identifies a book’s edition and format. The last digit of an ISBN-13 is calculated from the preceding digits, adding a clue that can reveal a copying error.
Look at the number rule before the bars
A barcode represents a number for machine reading. A check digit is a rule within the number itself. It can detect some errors even when the number is typed by hand.
Multiply, add, then check for a multiple of ten
Multiply the 13 digits alternately by 1 and 3, starting on the left, then add. Including the check digit, the sum must be a multiple of ten. Our example 9780306406157 totals 100.
Passing the check does not prove a book is genuine
A one-digit typo is detected, but changes in several digits can cancel out. A number that passes arithmetic is not necessarily an assigned book number. Error detection is not authentication.
Compare changing one digit with swapping two
Try the original, first digit 9→0, and the later pair 61→16. Changed positions are highlighted. Watch the sum and check result to discover which error slips through.
The last digit watches over a book number
An ISBN identifies a book’s edition and format. The last digit of an ISBN-13 is calculated from the preceding digits, adding a clue that can reveal a copying error.
Look at the number rule before the bars
A barcode represents a number for machine reading. A check digit is a rule within the number itself. It can detect some errors even when the number is typed by hand.
Multiply, add, then check for a multiple of ten
Multiply the 13 digits alternately by 1 and 3, starting on the left, then add. Including the check digit, the sum must be a multiple of ten. Our example 9780306406157 totals 100.
Passing the check does not prove a book is genuine
A one-digit typo is detected, but changes in several digits can cancel out. A number that passes arithmetic is not necessarily an assigned book number. Error detection is not authentication.
Compare changing one digit with swapping two
Try the original, first digit 9→0, and the later pair 61→16. Changed positions are highlighted. Watch the sum and check result to discover which error slips through.
Look at the number rule before the bars
A barcode represents a number for machine reading. A check digit is a rule within the number itself. It can detect some errors even when the number is typed by hand.
How is the final digit chosen?
The first 12 digits have a weighted sum of 93: multiply each by its position’s 1 or 3, then add. Adding 7 reaches the next multiple of ten, 100, so the check digit is 7. If the sum is already a multiple of ten, use 0. The lab fixes the check digit and introduces input errors.
Two changed digits can hide an error
The later pair 61 contributes 6×3 + 1×1 = 19. Swapping it to 16 contributes 1×3 + 6×1 = 9. The sum falls by ten and remains a multiple of ten. Thus swapping adjacent digits that differ by five can go undetected. This is stronger than a simple unweighted sum, but not perfect.
Checking, correcting and authenticating differ
A failed check says the number breaks the rule, but does not uniquely identify which digit to repair. Error correction needs more information; authentication needs a separate basis for trust. An ISBN passing arithmetic says nothing about a book’s claims or its publisher’s reliability.
Key concepts
- The last digit watches over a book number
- An ISBN identifies a book’s edition and format. The last digit of an ISBN-13 is calculated from the preceding digits, adding a clue that can reveal a copying error.
- Look at the number rule before the bars
- A barcode represents a number for machine reading. A check digit is a rule within the number itself. It can detect some errors even when the number is typed by hand.
- Multiply, add, then check for a multiple of ten
- Multiply the 13 digits alternately by 1 and 3, starting on the left, then add. Including the check digit, the sum must be a multiple of ten. Our example 9780306406157 totals 100.
- Passing the check does not prove a book is genuine
- A one-digit typo is detected, but changes in several digits can cancel out. A number that passes arithmetic is not necessarily an assigned book number. Error detection is not authentication.
Takeaways
- A check digit adds information for testing a number’s consistency.
- ISBN-13 detects single-digit typos but misses some transpositions.
- Error detection, error correction and authentication are different functions.