# Input Devices

- **Track:** Cambridge IGCSE™ Computer Science (0478 / 0984) (CAMBRIDGE IGCSE 0478)
- **Module:** Section 3: Hardware & Architecture
- **Estimated Duration:** 15 minutes
- **Access:** Open Theory (All-Access for Interactive IDE &amp; Autotests)

---

## Theory & Conceptual Background

An **input device** is any piece of computer hardware that allows a user or external environment to enter data, commands, and signals into a computer system for processing.

---

## Learning Objectives

- Identify and describe the operation of manual and automatic input devices.
- Choose a suitable device for the data being captured.
- Explain keyboard, mouse, scanner, camera and microphone operation.

---

## Common Input Devices

### 1. Barcode Scanners and QR Code Readers

- **1D Barcodes**: A series of parallel alternating black and white lines of varying widths.
- A red LED or laser reflects light off the barcode; white spaces reflect high light while black bars absorb light.
- A photodiode detects the reflected light patterns and converts them into digital binary digits representing the product code.
- **2D Quick Response (QR) Codes**: A matrix of dark squares on a light background.
- Can store significantly more data than 1D barcodes (thousands of characters including URLs, plain text, and contact information).
- Built-in alignment markers in three corners allow scanning from any angle.
- Built-in Reed-Solomon error correction allows decoding when some data is damaged; the recoverable amount depends on the error-correction level and damage pattern.

### 2. Digital Cameras

- Light passes through a lens onto an array of light-sensitive sensors (a **CCD** or **CMOS** image sensor).
- Each sensor cell converts light photon intensity into an electrical charge.
- Colour filters (Red, Green, Blue) separate the light into colour components.
- An ADC converts these charges into digital pixel values and stores the photo on solid-state flash memory.

### 3. Microphones

- Sound waves vibrate a flexible diaphragm.
- The diaphragm's movement induces a varying electrical analogue voltage signal.
- The analogue signal is fed into an **ADC (Sound Card)**, which samples the wave and outputs binary audio data.

---

## Keyboard, mouse and scanners

A keyboard detects a pressed key and sends its code to the computer. An optical mouse illuminates a surface, captures repeated images and compares them to detect movement; buttons supply selection input.

A 2D scanner illuminates a document and detects reflected light to produce a digital image. OCR is separate software that can turn suitable image content into editable text. A 3D scanner measures a physical object's surface from different positions to build a model containing depth as well as width and height.

## Worked choice

To archive a paper receipt faithfully as an image, choose a 2D scanner. To measure a sculpture's surface for a 3D model, choose a 3D scanner. A barcode reader retrieves the encoded identifier, not a full page image or 3D shape.

---

## Interactive Exercises & Autotest Specifications

### Exercise 1: Concept Check: Apply the distinction (Fill in blank, 30 XP)

**Instructions:**
Work out each answer before submitting. Barcode reader supplies input or output? Does a 2D scan directly produce a 3D depth model: yes or no? Software converting scanned text images into editable text:


**Starter Code:**
```text
{"prompt":"Concept Check: Apply the distinction","template":"1. Barcode reader supplies input or output? [blank_1]\n2. Does a 2D scan directly produce a 3D depth model: yes or no? [blank_2]\n3. Software converting scanned text images into editable text: [blank_3]","blanks":[{"id":"blank_1"},{"id":"blank_2"},{"id":"blank_3"}],"word_bank":["input","output","no","yes","OCR","OMR","MICR"]}
```


### Exercise 2: Application: Input purpose (Fill in blank, 30 XP)

**Instructions:**
Work out each answer before submitting. Which device detects a pressed key? Which device captures sound? Does a barcode normally encode an identifier or the entire product database?


**Starter Code:**
```text
{"prompt":"Application: Input purpose","template":"1. Which device detects a pressed key? [blank_1]\n2. Which device captures sound? [blank_2]\n3. Does a barcode normally encode an identifier or the entire product database? [blank_3]","blanks":[{"id":"blank_1"},{"id":"blank_2"},{"id":"blank_3"}],"word_bank":["keyboard","microphone","identifier","mouse","speaker","database record"]}
```


### Exercise 3: Application: Choose the input (Fill in blank, 30 XP)

**Instructions:**
Work out each answer before submitting. Capture the depth of a sculpture: 2D scanner or 3D scanner? Device comparing images of a surface to detect pointer movement: Capture a scene as a pixel image:


**Starter Code:**
```text
{"prompt":"Application: Choose the input","template":"1. Capture the depth of a sculpture: 2D scanner or 3D scanner? [blank_1]\n2. Device comparing images of a surface to detect pointer movement: [blank_2]\n3. Capture a scene as a pixel image: [blank_3]","blanks":[{"id":"blank_1"},{"id":"blank_2"},{"id":"blank_3"}],"word_bank":["3D scanner","optical mouse","digital camera","2D scanner","touchpad","barcode reader"]}
```


