Barcode scanners turn a pattern of black and white stripes into product information that a computer can use. This matters because stores need a fast, reliable way to identify millions of items at checkout, in warehouses, and during inventory counts. A scanner does not read the printed price directly, it reads an identification number encoded in the barcode.
The register then uses that number to find the item name and price in a database.
A laser scanner shines light across the barcode and measures how much light reflects back from each stripe. White spaces reflect more light, while black bars absorb more light, creating an electrical signal that can be converted into 1s and 0s. Camera-based scanners take an image of the barcode and use software to locate the stripes and decode the pattern.
After decoding a UPC or EAN number, the checkout system sends a database request and displays the correct price on the register screen.
Understanding How Barcode Scanners Read Products
A barcode is more carefully designed than it first appears. The bars do not simply stand for one digit each. Their widths and the widths of the spaces beside them form small groups.
A standard one dimensional retail barcode divides its width into tiny equal units. Each numeral is represented by a particular pattern of bars and spaces across seven of these units. The scanner first finds special guard patterns near the beginning, middle, and end.
These patterns show where the code starts, how the two halves are arranged, and where it finishes. They help the reader separate the barcode from nearby printing or package artwork.
The electronics must handle an imperfect signal. A hand-held scanner may move quickly, tilt slightly, or pass over a curved bottle. As the reading beam crosses the code, the reflected signal rises and falls.
The scanner measures the timing of these changes. A wider bar produces a longer low-reflection part of the signal than a narrow bar. Software turns this changing signal into estimated bar and space widths, then compares the result with the allowed barcode patterns.
This is why a barcode can still work when it is scanned at different speeds. The timing changes, but the ratio between narrow and wide sections remains usable.
The final numeral has an important error-checking job. It is called a check digit. The system calculates it from the other digits using a fixed pattern of multiplication and addition.
For many retail codes, alternating digits are given different weights, and the total must fit a required multiple of ten. If one stripe is damaged or a digit is decoded incorrectly, the calculated result will often fail.
The scanner then rejects that reading instead of sending a likely wrong item code. A failed scan is inconvenient, but charging for the wrong product is worse.
Printing quality matters as much as the code design. The edges between dark bars and light spaces need to be sharp. Smudged ink, scratches, shiny wrapping, wrinkles, and low contrast can confuse the reader.
The blank area on each side is important too. It is called the quiet zone. It gives the scanner a clear signal before and after the pattern.
Students can notice this on food packages and books. A code placed over a seam, folded around a corner, or printed too close to text is more likely to cause scanning problems.
Modern shops use several related technologies. Traditional linear barcodes store a short identification number, so their useful information comes from the linked product record. Two dimensional codes, such as QR codes, use small square modules and can hold much more data directly.
Camera readers are especially useful because they can read codes from many angles and can inspect a larger area at once. When learning this topic, keep the stages separate. First, light or an image creates raw measurements.
Next, decoding software recognizes a valid symbol and checks it. Only after that does the larger computer system use the decoded number to retrieve information.
Key Facts
- Black bars absorb more light, while white spaces reflect more light.
- A scanner converts changes in reflected light into an electrical signal.
- Digital systems represent data using binary digits: 0 and 1.
- UPC-A barcodes usually encode 12 digits, including a check digit.
- EAN-13 barcodes usually encode 13 digits, including a check digit.
- Item lookup process: scan barcode, decode number, search database, return product name and price.
Vocabulary
- Barcode
- A printed pattern of bars and spaces that encodes a number or other data.
- Scanner
- A device that reads a barcode by detecting reflected light or analyzing a camera image.
- Binary
- A number system that represents information using only two symbols, 0 and 1.
- UPC
- A Universal Product Code used mainly in North America to identify retail products.
- Check digit
- A final digit calculated from the other digits to help detect scanning or typing errors.
Common Mistakes to Avoid
- Thinking the barcode stores the price, which is wrong because most barcodes store a product identification number and the price comes from the store database.
- Assuming the scanner reads only the black bars, which is wrong because it detects the pattern of both dark bars and light spaces.
- Covering part of the barcode and expecting a normal scan, which is wrong because missing stripes can change the decoded number or prevent decoding.
- Confusing laser scanners with camera scanners, which is wrong because lasers measure reflected light along a scan line while camera scanners analyze an image.
Practice Questions
- 1 A scanner samples 95 stripe positions across a barcode. If 38 positions are dark and the rest are light, how many positions are light?
- 2 A store scans 240 items in 30 minutes at self-checkout stations. What is the average scanning rate in items per minute?
- 3 A product scans correctly but the register shows the wrong price. Explain whether the likely problem is the barcode, the scanner, or the database, and justify your answer.