Code Readers
Computer Science: Cambridge International GCSE, topic 1.3.9
Barcode Readers
Barcode readers convert sequences of black and white strips to a digital format to send to a microprocessor.

How does it work?
- Barcodes are machine-readable binary numbers represented by black and white lines.
- A barcode reader directs a red laser onto a barcode.
- The white strips of the barcode reflect light back into the reader, which is registered as a '1' in binary.
- The black strips do not reflect the light back into the reader, so this is registered as a '0' in binary.

Applications
- Barcode readers are used extensively in shops and supermarkets to:
- Identify items.
- Quickly find the price of products at the checkout.
- Monitor stock levels of items using automatic stock control.
- Barcode readers are used to track the transport of items like luggage.
- Libraries use barcodes to track books that are borrowed using a digital system.

Advantages of barcodes
- Scanning barcodes is much faster than entering long numbers by hand.
- Staff in shops don't need to remember or type in the prices of products.
- Accurate receipts can be given to customers quickly in shops.
- Businesses can automatically generate reliable sales and stock reports.
- Prices can be changed immediately without changing any barcodes.

Disadvantages of barcodes
- Barcodes can only store long numbers.
- Any extra information must be stored in a database linked to the barcode number.
- Barcodes can be difficult to scan if damaged.
- Highly reflective objects are hard to scan and identify using barcode readers.
QR Code Readers
Quick response (QR) codes are two-dimensional barcodes capable of holding approximately 7000 digits. These digits are accessed by scanning the pattern with a QR code reader.
-min,w_800.png)
How does it work?
- QR codes are matrix (2D) barcodes.
- QR codes contain marker squares that are used by the camera to position and align the scanned image.
- QR code readers work similarly to barcodes by reading the light that is reflected off the white parts of the QR code.
- Smartphone cameras can be used as a scanning device.
-min,w_800.png)
QR code structure

Applications of QR codes
- QR codes can be used to hold contact information, calendar entries and product details.
- QR codes are most often used to direct viewers to a specific web page.
- QR codes are used in advertising on public transport.
- QR codes are also used in digital ticketing systems.
- Ticket holders can show the QR code on their phone instead of having to print out tickets or wait for them to arrive in the post.

Advantages of QR codes
- QR codes are very accessible as most smartphones can scan them.
- QR codes are a simple way to send users to website URLs that are often long and difficult to type by hand.
- QR codes can hold a larger amount of information than barcodes due to the second dimension.
- QR codes can link to further information that is too dense for adverts.

Disadvantages
- Changing the underlying data changes the pattern of a QR code.
- You must update the pattern every time you change the data.
- This means QR codes are not suitable for data that changes regularly like prices.
- Users need a device with a camera and software that can read QR codes.
Test yourself on Code Readers
Which number system is used to encode data in barcodes?
What is the maximum number of digits a QR code store to the nearest thousand?