HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Input Devices, Output Devices and Sensors
  1. 1Input devices
  2. 2Output devices
  3. 3Sensors and choosing the right one
  1. Computer Science
  2. /Input Devices, Output Devices and Sensors
  3. /Input devices

Course 3.2·Lesson 1 of 3

Input devices

An input device lets data from the outside world into a computer. This lesson explains why input devices are needed and how the ten in the syllabus work: the barcode and QR code scanners, the digital camera, the keyboard, the microphone, the optical mouse, three kinds of touch screen, and the 2D and 3D scanners.

about 25 min1 simulation1 practice question
Lesson 1 of 3Show all lessonsHide
Input Devices, Output Devices and Sensors
  1. 1Input devices
  2. 2Output devices
  3. 3Sensors and choosing the right one

Try the code and the simulations beside the lesson.

Why a computer needs input devices

A computer can only process data that is inside it, as binary. Your voice, a barcode or the touch of a finger is not binary. An input device captures data from the outside world and turns it into a form the computer can process. Without input devices, the computer would have nothing to work on.

Scanners for codes

  • Barcode scanner. A light shines on the barcode. The dark bars reflect little light and the white spaces reflect a lot. A sensor picks up the pattern of reflected light and turns it into a number, the product code. The computer then looks the code up, for example to find a price.
  • QR code scanner. A QR code is a square pattern of small black and white squares, a two-dimensional code. The scanner, often the camera of a phone, takes an image of it. Software reads the pattern of squares. A QR code can hold far more data than a barcode, such as a web address or a ticket.

Cameras, keys, sound and the mouse

  • Digital camera. Light passes through a lens onto a sensor made of millions of light-sensitive cells, one for each pixel. Each cell turns the light into an electrical signal. It is converted to binary and saved as an image file.
  • Keyboard. Pressing a key completes a circuit under that key. The keyboard's processor works out which key it was and sends its character code to the computer.
  • Microphone. Sound waves make a thin sheet, the diaphragm, vibrate. The movement is turned into an electrical signal that matches the sound. The signal is then converted to binary.
  • Optical mouse. A light shines down onto the desk. A tiny sensor takes many pictures of the surface each second. The mouse compares each picture with the last, to work out how far and which way it moved. There is no ball and no moving part to wear out.

Touch screens

There are three kinds in the syllabus.

Three small diagrams side by side. Resistive: two flexible layers with a small gap, and a finger pressing the top layer down onto the bottom layer at one point. Capacitive: a glass layer with a charge on it, and a bare finger drawing some of the charge at the point it touches. Infra-red: a square screen crossed by a grid of beams from emitters on two edges to sensors on the opposite edges, with a finger breaking one beam across and one beam down.
  • Resistive. Two thin, flexible layers with a conductive coating are held apart by a tiny gap. A press pushes the top layer onto the bottom one and completes a circuit at that point. It works with a gloved finger or any pointer. It is cheap, but the screen is less clear and a sharp object can damage it.
  • Capacitive. A glass layer holds a small electric charge. A bare finger conducts electricity, so it draws some charge from the point it touches. Sensors find that point. It is clear and hard-wearing and it detects several fingers at once. An ordinary glove does not work, because it does not conduct.
  • Infra-red. Beams of infra-red light cross the screen in a grid, with sensors on the opposite edges. A finger or any object breaks a beam across and a beam down, and the crossing point gives the position. It works with gloves and on very large screens.

Scanners for paper and objects

  • 2D scanner. A document lies on a sheet of glass. A bright light moves across it, and the reflected light is caught by a sensor. The scanner builds up a digital image of the page.
  • 3D scanner. It scans a solid object from many angles, using lasers or light, and measures its shape. The result is a digital model of the object. It can be changed on a computer or sent to a 3D printer.

Practise with new numbers

Try it in Python

The program counts the pixels of a camera sensor and the touch points of an infra-red grid. You worked out file sizes like these in the chapter on data representation.

Read it first. Then run it. How many megapixels does the camera have?

1. Change the grid to 40 beams across and 24 down. Predict the number of touch points.

2. Change the camera to 6000 by 4000. How many times more pixels is that?

Common mistakes

  • Calling a QR code scanner a barcode scanner. A barcode is a row of bars. A QR code is a square grid of squares and holds more data.
  • Saying a capacitive screen works with any glove. It needs something that conducts, such as a bare finger.
  • Saying a microphone gives out sound. A microphone takes sound in. A speaker gives sound out.
  • Mixing up the two scanners. A 2D scanner makes an image of a flat page. A 3D scanner measures the shape of a solid object.

Remember these

  • An input device captures data from the outside world in a form the computer can process.
  • Barcode scanner: reflected light from bars. QR code scanner: an image of a square code that holds more data.
  • Resistive: two layers pressed together. Capacitive: a finger draws charge. Infra-red: a finger breaks beams.
  • 2D scanner: flat pages. 3D scanner: the shape of solid objects.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. Why does a computer need input devices?
  1. Which kind of touch screen works by two flexible layers touching?
  1. A nurse wearing thin rubber gloves cannot use a tablet's touch screen. Which kind of touch screen is it likely to be?
  1. How does an optical mouse know that it has moved?
  1. A designer wants a digital model of a clay figure, so that copies can be printed. Which input device should be used?

References

  • Cambridge International, IGCSE Computer Science 0478 syllabus (2026, 2027 and 2028), section 3.2 Input and output devices, outcome 1: input devices.

Enroll free in Input Devices, Output Devices and Sensors

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (4)

A supermarket checkout has a computer that must know what each customer buys and how the customer…Easy · High School (9–10) · by StemPy Lab
A factory wants touch screens on its machines…Medium · High School (9–10) · by StemPy Lab
A museum has an infra-red touch screen. It has 48 beams of infra-red light across it and 32 beams…Medium · High School (9–10) · by StemPy Lab
Next: lesson 2Output devices
← Input Devices, Output Devices and Sensors
← PreviousOutput devices →

Discussion (0)

Log in to join the discussion.

Loading…

1 Python program
5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

A library uses barcodes inside its books…Hard · High School (9–10) · by StemPy Lab