Product code check digits
Children use a short recipe of adding and multiplying to find the last digit of a barcode, which is how scanners notice mistakes.
Steps
- Ask: do you check your receipt at the shop? Barcodes are so reliable that we trust them.
- Take a 13-digit barcode and cover the last digit.
- Write the 12 digits in two rows: the 1st, 3rd, 5th... digits on top and the 2nd, 4th, 6th... on the bottom.
- Add up the top row. Add up the bottom row and multiply that total by 3. Add the two results together.
- Take the last digit of that sum. The check digit is what you need to add to reach the next multiple of ten.
- Compare with the covered digit. Then change one digit and see that the check fails.
Talk about it
- Why is the last digit useful?
- What if two digits swap places?
- Where else do check digits appear, like library books or bank cards?
CC BY-SA 4.0
Adapted from CS Unplugged by the University of Canterbury Computer Science Education Research Group (CS Unplugged), licensed CC BY-SA 4.0.
Original lesson, with pictures · License: CC BY-SA 4.0
There are no pictures here. The original lesson has the pictures and printables.
Changes made: Simplified, shortened and translated by Open Cosmos with AI
This adapted lesson is shared under the same license (CC BY-SA 4.0).