QR Code vs. Barcode: Key Differences Explained

qr code
barcode
scanning
data
technology

This article compares QR codes and barcodes, highlighting their key differences. It covers QR code generation, scanning, and interpretation, as well as barcode generation, scanning, and interpretation processes.

QR Code Basics

QR code

Figure 1: Basic QR code structure.

QR stands for “Quick Response.” It’s a 2D code that stores data in both the X and Y dimensions. The maximum data capacity of a QR code is 7089 characters for numeric data and 4296 characters for alphanumeric data. Toyota originally created QR codes to track parts during vehicle manufacturing. QR codes can be decoded quickly from any direction.

QR-code processing using mobile phone

Figure 2: QR code processing using a mobile phone.

QR code processing using a mobile phone with a camera and a QR code scanning application involves these steps:

  • The mobile phone must have a built-in camera.
  • A QR reader app needs to be downloaded and installed.
  • The QR reader app is opened, and the camera is pointed at the QR code within the designated area.
  • The QR code is scanned and converted into decoded information according to its design.

QR codes are designed for various purposes, such as storing URLs or web addresses, phone numbers, contact information, geo-locations with maps, and text. The example provided focuses on website addresses or URLs.

QR Code Generation, Scanning, and Interpretation

QR-code scanning process

Figure 3: QR-code scanning process.

Figure 3 shows how a QR code is scanned horizontally and converted to digital data for further processing by the QR code app. Unlike barcode scanning, it doesn’t require any light to be generated or received from the QR code.

QR codes are generated using QR code generation applications available online. You can create one by providing appropriate information, such as:

  • Calendar event
  • Contact information
  • Email address
  • Geo Location
  • Phone number
  • SMS
  • Text
  • URL
  • Wi-Fi Network

QR-code interpretation

Figure 4: QR-code interpretation.

Figure 4 illustrates two QR code versions with 21 and 25 modules. The interpretation of a QR code is that, excluding the no zone region, each black module represents 1 bit, and each white module represents 0 bit. Information is read, interpreted, and decoded based on the white modules once scanned horizontally.

Before using a QR code, ensure that the scanner or reader app is appropriate for your mobile phone. Test different readers and apps for compatibility.

There are different versions of QR codes, determined by a numeral followed by an error correction level. Due to error correction, QR codes can be read even if some parts are not read correctly by the scanning device.

Barcode Basics

Barcode

Figure 5: Barcode example.

As shown in Figure 5, barcode scanning requires a special barcode scanner that emits light and collects reflected light to decode the barcode. A barcode is a predefined arrangement of dark and white bars, structured to contain specific information, which allows for accurate and rapid real-time data collection.

Barcode Generation, Scanning, and Interpretation

Barcode scanning process

Figure 6: Barcode scanning process.

  • As shown in Figure 6, a barcode scanner consists of three main parts: an illuminator, a converter, and a decoder.
  • The illuminator emits light, typically red, onto the barcode.
  • Light reflects from the white areas of the barcode, creating an electrical signal.
  • The converter transforms the received waveform into a readable format.
  • The decoder reads the converted information.
  • The device operates on an electro-optical principle.

Barcode interpretation

Figure 7: Barcode interpretation.

Barcodes are created based on either discrete or continuous symbology.

In discrete symbology, each character is represented by a stack of dark and white bars, with gaps between each character. In continuous symbology, gaps are placed after a group of characters is represented together using continuous dark and white bars.

There are two main types of barcodes: linear (1D) barcodes and 2D barcodes. Linear barcode examples include Code 128 (which defines all 128 ASCII characters), Code 39, UPC, and Interleaved 2 of 5. 2D barcode examples include Data Matrix, PDF417, and Maxicode. Each uses slightly different patterns to represent alphanumeric letters.

International standards define patterns for these individual codes to maintain uniformity worldwide.

star symbol using barcodes

Figure 8: Star symbol using barcodes.

For example:

  • Code-39 barcodes use 9 bars to represent each symbol, defining 43 characters.
  • The bars can be black or white.
  • The bars are either narrow or wide.
  • Wide bars are 2.1 to 3 times wider than narrow ones.
  • Each symbol pattern starts and ends with a black bar.
  • A valid barcode starts and ends with a STAR (*) symbol, called a delimiter.
  • The STAR (*) symbol consists of a narrow black bar, a wide white bar, a narrow black bar, a narrow white bar, a wide black bar, a narrow white bar, a wide black bar, a narrow white bar, and a narrow black bar, as shown in Figure 8.
QR Codes: Advantages and Disadvantages

QR Codes: Advantages and Disadvantages

Explore the benefits and drawbacks of using QR codes, including their fast decoding, multi-purpose functionality, smartphone requirement, and app installation needs.

qr code
barcode
data storage