Barcodes work by encoding data—typically a product number—into a visual pattern of parallel black bars and white spaces, which can be read by a scanner that converts the pattern back into digital information. This system allows for fast, accurate identification of items in retail, logistics, healthcare, and more.
History and Development of Barcodes
The concept of barcodes dates back to the 1940s, when Norman Joseph Woodland and Bernard Silver, inspired by Morse code, developed a circular 'bullseye' pattern to automate supermarket checkout systems. Their patent was granted in 1952, but the technology was not practical until the advent of lasers in the 1970s. The first barcode scan in a retail setting occurred on June 26, 1974, at a Marsh supermarket in Troy, Ohio, when a pack of Wrigley's Juicy Fruit gum was scanned using a Universal Product Code (UPC) barcode.
The UPC, standardized by the Uniform Code Council (now GS1 US), became the dominant system in North America. It uses a 12-digit number broken into segments: a system digit, manufacturer code, product code, and a check digit. Meanwhile, the International Article Number (EAN), used globally, expanded the format to 13 digits. These standards ensured compatibility across industries and countries, forming the backbone of modern supply chains.
How Barcode Scanners Read the Code
Barcode scanners use light—either a laser or LED—to illuminate the barcode. The black bars absorb light, while the white spaces reflect it. A sensor in the scanner detects the pattern of reflected light and converts it into an electrical signal. This analog signal is then digitized into a binary sequence (0s and 1s), where wide bars and spaces represent longer pulses and narrow ones represent shorter pulses.
The scanner decodes this binary sequence using a lookup table based on the barcode symbology (such as UPC-A or Code 128). The resulting number is sent to a computer or point-of-sale (POS) system, which retrieves product information like name, price, and inventory status from a database. This entire process typically takes less than a second.
Types of Barcodes and Their Uses
Barcodes come in two main types: 1D (linear) and 2D. Each serves different purposes based on data capacity, size, and application.
- UPC-A: 12-digit code used primarily in North American retail. Each digit is represented by a unique pattern of two bars and two spaces.
- EAN-13: 13-digit international version of UPC, used worldwide for consumer products.
- Code 128: High-density alphanumeric code used in shipping and logistics. Can encode all 128 ASCII characters.
- Code 39: Older alphanumeric format, still used in military, automotive, and healthcare sectors.
- PDF417: A 2D stacked barcode that holds more data, used on driver's licenses and ID cards.
- QR Code: A 2D matrix barcode that can store thousands of characters, URLs, or even small files. Widely used in marketing, ticketing, and mobile payments.
Choosing the right type depends on the amount of data, space available, and industry standards. For example, healthcare uses Code 128 for patient wristbands, while airlines use 2D barcodes on boarding passes to include flight details, seat numbers, and passenger data.
Structure of a Linear Barcode
A standard 1D barcode like UPC-A has a precise structure that ensures reliable scanning. It consists of several key components:
- Quiet Zone: Blank space (typically 10 times the width of the narrowest bar) on either side of the barcode. Prevents misreads by separating the code from surrounding text or graphics.
- Start and Stop Characters: Unique bar-space patterns that signal the beginning and end of the code. These help the scanner determine direction and alignment.
- Data Characters: The actual encoded digits, each represented by a specific combination of bars and spaces. In UPC-A, each digit uses seven modules (units of width).
- Guard Patterns: In UPC, these are the tall bars at the start, middle, and end that divide the code and help with synchronization.
- Check Digit: A calculated digit used to verify the accuracy of the scanned data. It’s derived from a mathematical formula applied to the other digits.
For example, in the UPC number 01234567890, the last digit is the check digit, computed using a weighted sum of the other digits. If the scanner reads a mismatch, it rejects the code, prompting a rescan.
Common Problems and How to Avoid Them
Barcodes can fail to scan for several reasons, most of which are preventable with proper design and handling:
- Poor Print Quality: Blurry, smudged, or low-contrast barcodes may not reflect light properly. Use high-resolution printers and dark ink on light backgrounds.
- Incorrect Sizing: Scaling a barcode too small reduces the width of bars and spaces below scanner resolution. Follow symbology-specific size guidelines (e.g., UPC-A should not be smaller than 80% of nominal size).
- Damaged or Obstructed Code: Tears, folds, or labels covering part of the barcode can block scanning. Protect barcodes on high-handling items with lamination or placement in safe zones.
- Insufficient Quiet Zone: Text or graphics too close to the barcode can cause misreads. Maintain a clear margin on both sides.
- Wrong Symbology: Using a non-standard or unsupported format may lead to incompatibility. Stick to industry-standard codes like UPC, EAN, or Code 128.
Testing barcodes with a handheld scanner before mass production can catch most issues early.
Alternatives to Traditional Barcodes
While barcodes remain widespread, newer technologies offer enhanced capabilities:
- Radio Frequency Identification (RFID): Uses radio waves to read data from tags embedded in products. Unlike barcodes, RFID tags don’t require line-of-sight and can store more data. Used in inventory tracking, toll collection, and smart shelves.
- Near Field Communication (NFC): Allows two-way communication between devices over short distances. Found in contactless payments and smart posters.
- Optical Character Recognition (OCR): Reads printed or handwritten text directly, useful when barcodes aren’t feasible. However, it’s slower and less accurate than barcode scanning.
Despite these advances, barcodes remain the most cost-effective and universally supported option for item identification.
Frequently Asked Questions
Can barcodes store product prices?
No, barcodes typically store only a product identifier, such as a UPC or SKU number. The price is retrieved from a database when the code is scanned. This allows retailers to change prices without reprinting labels.
Why do some barcodes have numbers printed underneath?
The human-readable numbers allow manual entry if the barcode is damaged or unreadable. They also help verify that the correct code was printed and match inventory records.
Are all barcodes the same size?
No, barcodes can be scaled within limits. However, shrinking them too much can make them unscannable. Each symbology has minimum and maximum dimensions; for example, UPC-A should not be reduced below 80% of its standard width.
Can a smartphone scan any barcode?
Most smartphones can scan common 1D and 2D barcodes using built-in camera apps or third-party scanners. However, older or damaged codes may require specialized hardware for reliable reading.
Do barcodes expire?
No, barcodes themselves do not expire. However, the product they represent may be discontinued, and the number may eventually be reused. The physical label can degrade over time, affecting scanability.
Is a QR code the same as a barcode?
A QR code is a type of 2D barcode, but not all barcodes are QR codes. While traditional barcodes store data in horizontal lines, QR codes use a grid of squares and can hold much more information, including URLs and contact details.