How barcodes and QR codes work
#1
That’s Maths: How barcodes and QR codes work
Author: Peter Lynch
Publication:The Irish Times
Published: 15 January 2015
Topic: Applied mathematics, information encoding, error detection and correction

Peter Lynch explains the mathematics hidden inside everyday barcodes and QR codes. Standard barcodes such as EAN-13 represent information using a 13-digit number, with each digit translated into a pattern of bars and spaces. The final digit acts as a check digit, allowing scanners to detect errors. In a simplified example, the check digit can be chosen so that the sum of all digits is divisible by $10$. The actual EAN-13 system uses weighted digits, making it possible to detect all single-digit errors and many common mistakes such as transposed digits. Similar mathematical techniques appear in ISBN book numbers and serial numbers on banknotes. 

QR codes extend the same basic idea into two dimensions, allowing far more information to be stored in a small area. They can contain thousands of characters as well as URLs, coordinates, email addresses and text. Their reliability comes from Reed–Solomon error-correcting codes, which introduce mathematical redundancy so that information can often still be reconstructed even when part of the QR code is damaged or obscured. Thus, barcodes illustrate error detection, while QR codes demonstrate the more powerful concept of error correction

Key takeaways
  • Barcodes encode numerical information through carefully designed patterns of bars and spaces.
  • Check digits provide a simple application of modular arithmetic for detecting scanning or transcription errors.
  • QR codes contain much more information than ordinary one-dimensional barcodes.
  • Reed–Solomon codes allow QR codes to recover information even when portions of the code are damaged, making them a practical application of algebra and coding theory.

ARTICLE
┌────────────────────────────────┐
│  KONSTANTINOS MICHAILIDIS    │
└────────────────────────────────┘
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)