Technology fundamentals

Barcode

A barcode represents information as a visual pattern that a machine can read. One-dimensional (1D) symbols use bars and spaces; two-dimensional (2D) symbols, such as QR Code and Data Matrix, use patterns of small shapes. A reader captures the pattern, decodes it and passes the resulting information to software.

This explanation follows a printed barcode from optical capture to decoded data in an application. Screens can also display symbols, which a compatible camera or imaging reader can capture.

Illustration of an optical scanner and a printed barcode
Phone scanning a code printed on a carton
Scroll

1D and 2D symbols

Main components.

Examples of 1D and 2D barcode symbols

Barcode symbol

A visible pattern represents data according to a defined encoding format.

Handheld barcode scanner

Optical sensor or camera

Captures differences in light reflected from the symbol; illumination may come from the reader or surroundings.

Scanner reading a barcode and converting it into binary data

Decoder

Recognizes the encoded pattern and converts it into data, within the reader or in software.

Application

Receives the decoded data and interprets it according to its own rules.

Optical contrast

How it works.

Barcode reading uses optical contrast. Dark and light areas create a pattern that a sensor can capture. The decoder applies the symbol format’s rules to recover the information represented by that pattern.

Barcode reading in four steps: light reaches the printed symbol, the scanner sensor captures the reflected pattern, the decoder recovers the data and the application uses the result.From pattern to data1D · 2DScanner1D2DPrinted barcodeon the item or labelLight1Reflected pattern2handheld or camera012345…Decoderrecovers the data3SKU-1043Rack A-03 · 14:02ScannedApplicationlooks up the item4Each scan reads one code that the scanner can see.
A simplified mechanism diagram. Follow the numbered sequence.
  1. Light makes the pattern visible

    Light reaches the symbol, whose dark and light areas reflect different amounts.

  2. The sensor captures the pattern

    An optical sensor measures the reflected light, or a camera records an image.

  3. The decoder recovers the data

    The decoder recognizes the symbol’s structure and translates its pattern into the encoded information.

  4. The application interprets the result

    The decoded data reaches an application. Any database lookup or subsequent action happens there.

Decoded data

What information does it produce?

The output is the data encoded in the symbol: for example, an identifier, text or structured fields.

Example data

Example decoded value: ITEM-001

ITEM-001 is an example value. A name or description appears only if it is encoded or supplied separately by the application.

The meaning and uniqueness of a code depend on its encoding and assignment; a barcode does not automatically identify an individual unit.