Computer Science

Senior High

NotesFree

Barcodes and QR Codes: How They Work and Where They Are Used

Topic: Y2 Barcodes and QR codes using input and output devices and system components

How barcodes and QR codes store information, explained step by step: types of barcodes (EAN-13, UPC-A, ITF-14, ISBN, ISSN), the structure and features of QR codes, generating and scanning them, and the input and output devices involved.

View resource Free to join

What's inside

At a supermarket checkout, the cashier passes each item over a red light, there's a beep, and the name and price appear on the screen. At a church event or a concert, someone scans a square pattern on your phone and lets you in. Both rely on codes made of patterns that a machine can read in a split second. This note explains how barcodes and QR codes work.

SUMMARIZED NOTES ON

  • Year 1: Year 1 introduces input and output devices such as scanners and screens, which are used to read and display codes.

  • Year 2: What barcodes are, the main types (EAN-13, UPC-A, ITF-14, ISBN and ISSN), what QR codes are, their structure and features, and how to generate and scan them.

Year 2: Barcodes and QR codes

What a barcode is

Look at the back of a packet of biscuits and you'll see black bars of different widths with a number underneath. Those bars are just another way of writing that number, one a scanner can read instantly.

The textbook definition is: a barcode is a series of lines of varying widths that represent numbers and other symbols. Each barcode is a globally unique number, so no two different products share one.

Here is what happens when an item is scanned. The barcode scanner, an input device, shines light on the bars and reads the pattern as a number. The computer looks up that number in the shop's database to find the product's name and price, and the result is displayed on the screen and printed on the receipt, both output devices. Because every sale is recorded, the shop owner can see which items sell most, which sell slowly and which are out of stock, and can track goods through the supply chain. Libraries use the same idea: scanning a book's barcode shows its title and author.

Types of barcodes

Type

Digits

Where it is used

EAN-13 (International Article Number)

13

Retail products around the world (except the USA and Canada). The first digits can show the country. Ghana's system is based on EAN-13 (the book calls it GHBS-13).

UPC-A (Universal Product Code)

12

Retail products in the USA and Canada.

ITF-14 (Interleaved Two of Five)

14

Printed on shipping cartons and boxes to track goods. It carries a GTIN-14 number. Easy to read on cardboard, but numbers only, not used at checkouts.

ISBN (International Standard Book Number)

13

Books. Uses a retail barcode starting with 978 or 979. Made of a prefix, group number, publisher number, title number and a check digit.

ISSN (International Standard Serial Number)

8

Magazines and journals.

Open the full resource free with a TudHub account.

More on Barcodes and QR codes using input and output devices and system components

Other resources you can find on TudHub.

Barcodes and QR Codes: How They Work and Where They Are Used (Computer Science) · TudHub