Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

A barcode is a visual code that stores information using patterns of dark and light regions. When a scanner shines a red laser or LED across the code, black bars absorb more light and white spaces reflect more light. The scanner turns these changing reflections into an electrical signal that can be decoded by a computer.

This makes checkout, shipping, inventory, and identification fast and reliable.

Key Facts

  • A 1D barcode stores data as a sequence of bars and spaces with different widths.
  • Black bars reflect less light, while white spaces reflect more light.
  • Scanner signal pattern: dark region = low reflected intensity, light region = high reflected intensity.
  • Binary encoding uses two symbols, usually 0 and 1, to represent data.
  • UPC-A barcodes encode 12 digits, including a number system digit, manufacturer code, product code, and check digit.
  • A check digit helps detect errors by testing whether the scanned digits satisfy a fixed calculation rule.

Vocabulary

Barcode
A printed pattern of bars and spaces that represents information in a machine-readable form.
Scanner
A device that shines light on a barcode and measures the reflected light to read the code.
Binary data
Information represented using two possible values, commonly 0 and 1.
Check digit
An extra digit calculated from the other digits in a code to help detect scanning or typing errors.
Quiet zone
The blank space before and after a barcode that helps the scanner identify where the code begins and ends.

Common Mistakes to Avoid

  • Thinking the bars directly draw the product picture, which is wrong because the barcode usually stores an identification number that a database links to product information.
  • Ignoring the white spaces, which is wrong because both bars and spaces are part of the encoded pattern.
  • Assuming every barcode uses the same format, which is wrong because UPC, EAN, Code 39, QR codes, and other systems encode data differently.
  • Covering or trimming the quiet zone, which is wrong because scanners need the blank margin to detect the start and end of the barcode.

Practice Questions

  1. 1 A simple barcode uses a narrow module width of 0.33 mm. If one encoded symbol is 7 modules wide, what is the width of that symbol in millimeters?
  2. 2 A scanner samples a barcode and records the reflection pattern white, black, black, white, black, white. If white = 1 and black = 0, what binary sequence is recorded?
  3. 3 Explain why a barcode scanner needs a contrast between dark bars and light spaces, and describe what might happen if the barcode is printed with low contrast.