← IGCSE Computer Science Paper 1

QR code scanner

Uses a camera to capture a 2D square grid of black and white modules and decodes it into data like a web address or text. It holds more data than a barcode and reads from any angle.

Understanding QR code scanner in IGCSE Computer Science Paper 1

What it does: A grid of black and white modules uses both width and height to store data, giving a QR code far more capacity than a 1D barcode. A web address is a typical piece of data stored in a QR code. The scanner decodes the pattern into this text and opens the link. The corner squares show the orientation, so a QR code scanner can read the code from any angle. QR codes are used for links, tickets and payments. Printing is an output task done by a printer, not a QR code scanner.

Common mistakes: A QR code stores data across a two-dimensional grid of modules, not in lines like a barcode. The line should be pattern ← findGrid(image). The scanner must output the decoded data, such as a web address or text, not the raw camera image. It should be OUTPUT data.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 252–261) and word search (Modules 240–261).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
How does a QR code scanner capture the QR code?
It uses a camera to capture an image of the square patternIt uses a microphone to listen to the pattern
Matches
A QR code is a 1D pattern of lines, like a barcode
↓
A QR code is two-dimensional, using a square grid of black and white modules, not just parallel lines. This is why it stores more data than a barcode.
Applying
Meanings
Term
QR code scanner
Meaning
Uses a camera to capture a 2D square grid of black and white modules and decodes it into data like a web address or text. It holds more data than a barcode and reads from any angle.
Practice
image ← CAMERA_CAPTURE()
Testing
Gaps
A QR scanner uses a
Check Answer
Spots
1image ← camera.capture()
2pattern ← findLines(image)

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Angelfish' badge — Reef Perfectionist, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. How does a QR code scanner capture the QR code?
A. It uses a microphone to listen to the pattern
B. It uses a camera to capture an image of the square pattern ✓
A QR code scanner uses a camera (image sensor) to capture the pattern, then software decodes it into data.
2. How is data stored in a QR code?
A. Across a 2D grid of black and white squares (modules) ✓
B. Only in a single row of vertical lines
A QR code stores data in both directions across a grid. A barcode only uses a single row of lines of different widths.
3. Which holds much more data?
A. A QR code ✓
B. A standard barcode
Because a QR code uses a two-dimensional grid, it can hold far more data than a barcode, such as a whole web address.
4. What do the three large squares in the corners of a QR code do?
A. They show the scanner the orientation of the code ✓
B. They store the price of the product
The three corner squares let the scanner work out which way up the code is, so it can decode the data correctly.
5. A QR code is upside down or turned sideways. What happens?
A. It cannot be read until it is turned the right way up
B. It can still be read, because it can be scanned from any angle ✓
The corner squares show the orientation, so a QR code scanner can read the code from any angle.

Match the Pairs

QR code scanner → Uses a camera to capture a 2D square grid of black and white modules and decodes the pattern into data such as a web address or text.
Three corner squares → Position markers in three corners of a QR code that show the scanner its orientation, so the code can be read from any angle.
A QR code stores data across a grid in two dimensions, so it holds much more data than a barcode, which only uses lines. → 2D grid of modules
A QR code scanner can decode a pattern into a web address, so scanning a poster takes you straight to a website. → https://www.example.com
A QR code is a 1D pattern of lines, like a barcode → A QR code is two-dimensional, using a square grid of black and white modules, not just parallel lines. This is why it stores more data than a barcode.
A QR code must be held upright to be scanned → The three corner squares show the scanner the orientation, so a QR code can be read from any angle and does not need to be upright.

Key Term

QR code scanner
Uses a camera to capture a 2D square grid of black and white modules and decodes it into data like a web address or text. It holds more data than a barcode and reads from any angle.

Fill in the Blanks

1. A QR scanner uses a camera to capture the QR code image
Hint: Type the device part that captures the image of the code
2. A QR code is a 2D grid of black and white squares called modules
Hint: Type the short term for a pattern that spreads across two dimensions
3. A QR code has three corner squares that show its orientation
Hint: Type the number of corner squares, written as a word
4. A QR code can be read from any angle
Hint: Type the word for the tilt or direction the scanner can view the code from
5. The scanner will decode the pattern into data such as a web address
Hint: Type the verb for turning the pattern into usable data

Spot the Error

Question 1
A image ← camera.capture()
B pattern ← findLines(image)
C data ← decode(pattern)
D OUTPUT data
Line B — A QR code stores data across a two-dimensional grid of modules, not in lines like a barcode. The line should be pattern ← findGrid(image).
Question 2
A image ← camera.capture()
B grid ← findGrid(image)
C data ← decode(grid)
D OUTPUT image
Line D — The scanner must output the decoded data, such as a web address or text, not the raw camera image. It should be OUTPUT data.
Question 3
A corners ← countSquares(grid)
B IF corners = 4 THEN
C rotate(grid)
Line B — A QR code has three corner squares that show its orientation, not four. The line should be IF corners = 3 THEN.
Question 4
A image ← camera.capture()
B orient ← findCorners(image)
C data ← decode(image, 0)
D OUTPUT data
Line C — The three corner squares give the orientation, so the scanner can read the code from any angle. Decoding must use orient, not assume the angle is 0.
Question 5
A data ← encode(grid)
B IF isLink(data) THEN
C openBrowser(data)
D ENDIF
Line A — A QR code scanner decodes the grid into data such as a web address. It does not encode. The line should be data ← decode(grid).

Student with a class code? Join your class →