The barcode on a box of crackers tells the till which product you picked up. The scanner reads the product number from the widths of the bars and spaces. The till uses that number to look up the store’s current price. When the crackers go on sale, the same printed code works at the new price.245
What does the scanner see?
Slide a box of crackers over a checkout scanner. If it uses a laser, the beam sweeps across the barcode. The white spaces reflect more light back to the reader than the black bars do. An imaging scanner can capture the pattern in a picture. Either way, the widths of the spaces matter just as much as the widths of the bars.128
Our box carries a Universal Product Code in the familiar twelve-digit format called UPC-A. Special patterns mark the beginning, middle and end. Between those markers, each group of two bars and two spaces represents one digit. Their relative widths tell the scanner which digit to read.2
The last digit gives the scanner a way to check its work. It calculates what that digit should be from the first eleven and compares the result with the digit it read. A mismatch flags a reading error. You can read the same twelve digits beside and below the bars. If a smudge spoils the scan but the numbers are clear, the cashier can type them in.23
Why can the same barcode ring up a new price?
The scanner sends the twelve digits to the till. Together they form a Global Trade Item Number, the identifier for that particular size and flavor of crackers. The supermarket keeps a record for the item in its checkout system. The number tells the till which record to open. That record connects the crackers to the price the store has set.245
Say the crackers cost $3.49 yesterday. The store updates its pricing system overnight, and they’re $2.99 today. The scanner sends exactly the same digits. The till finds the same item and uses the new price now in effect. It can also apply a promotion when the transaction qualifies. The crackers sat there all night and did absolutely nothing.45
Which boxes share the number?
Two boxes of these crackers in the same size and flavor carry the same barcode because the number identifies that version of the product. It doesn’t tell the till which individual box you picked up, its batch or its expiration date. A family-size box holding twice as many ounces gets its own product number.267
GS1, the organization that maintains the standard, also calls for a new number if the brand changes a price printed as part of the packaging itself. That’s a change to the package. The store’s overnight price update only changes the store’s own pricing data.256
What about the deli label?
Take a wedge of cheese to the deli scale. One wedge might weigh half a pound and the next a little more. The scale can weigh each wedge, calculate its price and print a barcode that carries the amount for that particular piece. Other barcode formats, including some square codes that stores can read at checkout, can carry extra details such as a batch number or expiration date. On our ordinary cracker box, the UPC supplies the product number and the till supplies the price.2457
