✦
✦
✧
Future-Ready · Hidden Systems
How a barcode is read
A UPC-A barcode represents a twelve-digit identifier in bars and spaces. Its last digit helps a scanner detect some reading errors.
📊The parts of a UPC-A barcode
A ten-pack of chewing gum was the first product purchased with a standard UPC scanner at a supermarket in Troy, Ohio, on June 26, 1974. The purchaser kept the gum. The Smithsonian’s collection includes a scanner. The diagram uses a sample number for practice.
❌
The barcode does not contain the price. Not the name, not the size, not the expiry date. It holds an identifier and nothing more for an ordinary retail item. GS1 standards support assigning identifiers. The store can retrieve the item’s price and description through a database lookup. An ordinary sale price can change without reprinting the barcode. Other schemes for variable-weight items or coupons may encode a value.
🛡️Calculating the check digit
A package can be creased or a scan unclear. The last digit is chosen so the weighted sum is a multiple of ten. Try it with the sample number below.
⚖️Which errors does a check digit catch?
⬛Comparing UPC-A and QR
📊UPC Barcodeone direction · 1974
HoldsTwelve digits identifying an ordinary retail item.
Error checkA check digit can detect a mismatch.
The check alone does not repair a misread.
⬛QR Codetwo directions · 1994
The corner squaresCalled finder patterns. They let a camera spot the code and work out its orientation, so you can scan it sideways.
Its guardError correction uses additional codewords to recover missing or damaged information within limits.
Recovery depends on the damage and level.
🔔A scan at the checkout
One scan can link several store systems. They share an item identifier so the register can retrieve its price and record the sale.
🔍Reading a QR link
A QR code can contain text or other data. It may hold a web address that you cannot read directly from the pattern. A preview gives clues about the destination.
Read the host carefully. A familiar name in a path or subdomain does not identify the organization behind the site. If a link asks for an important action, ask “Do I recognize the destination?” You can use a known address instead or ask a trusted adult.
🔑Key Terms
📊BarcodeA machine-readable pattern. A UPC-A symbol represents digits in alternating bars and spaces.
🏷️UPCUniversal Product Code. The common UPC-A format encodes twelve digits used to identify a retail trade item.
🔦ScannerA device that reads the pattern of a code optically and decodes its data.
🛡️Check digitA digit calculated from the other digits. A failed check can reveal a reading error.
⬛QR codeA two-dimensional code that can hold text or other data, including a web address.
🩹Error correctionExtra information built into a code that lets a reader rebuild some damaged or missing data, depending on the level and location of the damage.
🗄️DatabaseAn organized collection of records. A store can use a product identifier to look up a matching record.
🧾Point-of-sale systemCheckout software that can look up a product, record a sale, process payment and update inventory.
Two more worth knowing: inventory records goods on hand. A sale, return, delivery or correction can change it. Parcel tracking uses scans and timestamps to report a shipment’s recorded progress.
🌍Uses of barcode scans
🏥Hospital bedsidesA clinician may scan a patient’s wristband and the medication label and compare them with the order. A mismatch may trigger an alert for the clinician to investigate. The software does not establish by itself that every detail is correct.
🚚Warehouses & delivery routesParcel scans can record events at a warehouse, sorting hub or delivery point. A tracking page can display those reports even when no new scan has arrived.
🏖️The idea came from Morse code and a beach. In 1949 an engineer named Norman Joseph Woodland drew lines in sand while thinking about how a scanner could read a code. Woodland and Bernard Silver received a patent in 1952.
⏳The first grocery UPC scan came 22 years after the 1952 patent. Creating a shared product standard and installing readers, registers and computer systems took time.
📚The same alternating 1-and-3 weighting that guards supermarket barcodes also guards the ISBN-13 identifier used for books since 2007. Its alternating weights start with 1; UPC-A’s eleven data positions begin with 3.
📌Checking an identifier
1An ordinary retail UPC-A symbol carries a product number. A store can look up the name and price in a database using that number. Some variable-weight labels and coupons use other conventions.
2A UPC’s last digit is a check digit. Weight the first eleven digits in alternating 3s and 1s. Choose the last digit so the total is divisible by ten. The check catches a single changed digit and many swaps, but a swap of neighbors differing by five passes. A check digit cannot reconstruct the intended number from a mismatch alone.
3A QR code uses a two-dimensional grid. Corner marks help with orientation, and error correction can restore some missing information. If the code contains a link, use a trusted route for important actions.
🤔 Think about it
A UPC check can detect an error without correcting it. When would you prefer a system that reports a mismatch rather than one that guesses at the missing information?
A tracking page lists several scans but no updates for a day. What can you conclude from the last timestamp? Which records should the carrier keep?
⭐
Check the two sample codes whose first digits are 2 and 7. Why do they both pass after swapping those digits? What does that example tell you about the limits of the check?
✏️ ClickClass Anchor Chart · The Secret Life of Barcodes