Grades K–2 · Computing
How can barcode stripes carry an identifier?
Beep! A box passes a shop scanner, and its name appears on a screen. The scanner has read a pattern of dark and light stripes. It can recognize that pattern even though it does not know what the food inside tastes like.
The stripes carry a code. A code is a pattern with an agreed meaning. In our tiny pretend code, three spaces are read from left to right. Dark, light, dark means Leaf. We can also write that pattern as 1, 0, 1. The spaces must be read in the agreed order.
This code is an identifier: a label that points to the right record. The record can hold more information about Leaf. The stripe pattern does not need to contain the whole story. In a shop, an ordinary product barcode usually points to information held in the shop's computer, including its price.
A scanner reads the three light-and-dark spaces. The matching 101 label leads to the Leaf record below.
That is why the price of a box can change while its printed barcode stays the same. The shop changes its record. The stripes still help the scanner find the right item.
About this explanation
Real shop barcodes have more stripes and follow shared rules. The three-space Leaf code is a small invented example.
Starting knowledge: Follow a left-to-right sequence and distinguish dark and light regions with adult read-aloud support.
Sources
- GS1 — Barcodes and key identifiers
- GS1 — Are the description and price of the item included in the barcode?