Computer ScienceFoundation18 min read

Input and Output Devices

Getting data in and results out, and choosing the right device for the job

This topic appears in:

01

Input, output, and the ones that are both

An input device brings data into the system; an output device presents results to the outside world. Most devices are clearly one or the other, and questions test the few that are not.

A touchscreen is both — it displays and it senses. So is a modem, sending and receiving. Storage devices are neither in the usual sense: data goes both ways, but to and from the machine's own memory rather than to a person.

Input deviceTypical use
Keyboardentering text and commands
Mouse / trackpadpointing and selecting
Scannerconverting paper documents to digital images
Barcode / QR readeridentifying products quickly and accurately
Cameracapturing still or moving images
Microphonecapturing sound
Sensormeasuring a physical quantity continuously
02

Sensors

A sensor measures a physical quantity continuously and passes the reading to a system. It is the input device that makes automated systems possible, and the syllabus expects specific types matched to specific applications.

The key point about every sensor: it produces an analogue reading, a continuously varying quantity. A computer works in digital values, so an analogue-to-digital converter stands between the two. A sensor cannot be wired straight into a processor.

SensorMeasuresUsed in
Temperatureheatcentral heating, ovens, greenhouses
Pressureforce per unit areaburglar alarms, tyre monitors
Lightbrightnessautomatic street lighting, camera exposure
Moisture / humiditywater contentirrigation, weather stations
Infrared / motionmovement or body heatsecurity systems, automatic doors
pHaciditywater treatment, soil monitoring
Proximitynearness of an objectparking sensors, robotics

A sensor does not make decisions

It measures, and nothing else. Comparing the reading with a preset value and deciding what to do is the microprocessor's job. A question asking "explain how the system keeps the temperature at 20°C" wants the sensor, the ADC, the comparison and the actuator — describing the sensor as though it switched the heater on loses most of the marks.

03

Output devices

The syllabus names several and asks you to choose between them, so the distinguishing characteristic of each is what to know.

For printers: an inkjet sprays droplets, giving high-quality colour at low purchase cost, but is slow and expensive per page — right for photographs and low volumes. A laser uses toner and a rotating drum, printing quickly and cheaply per page in large volumes — right for an office. A 3D printer builds an object in layers, used for prototypes and custom parts.

Other outputs include screens, speakers, projectors, and actuators — motors, valves, heaters — which are the output devices of a control system, doing something physical rather than presenting information.

Worked example

A school needs to print 500 exam papers a day in black and white, and occasionally a colour photograph for a display. Recommend printers and justify the choice.

  1. For the exam papers: a laser printer.High volume is exactly what laser printers are designed for.
  2. It prints far faster than an inkjet and the cost per page is much lower with toner.500 pages a day would exhaust inkjet cartridges quickly and take a long time.
  3. For the occasional photograph: an inkjet.Better colour quality for photographs, and the low volume means the running cost does not matter.
  4. The inkjet also costs less to buy, which is reasonable for a device used rarely.Matching each device to its actual workload is what the question is testing.

A laser for bulk mono printing, an inkjet for occasional colour photographs.

Before you leave this chapter

  1. Input brings data in, output presents results. A touchscreen is both.
  2. A sensor measures continuously and produces an analogue value.
  3. An ADC is needed between any sensor and a processor.
  4. A sensor never decides anything — the microprocessor compares and decides.
  5. Laser for high volume and low cost per page; inkjet for photographs and low volume.
04

Sensors in a working system

Input devices are usually studied one at a time, but a sensor rarely works alone. It sits at the start of a chain, and the chain is what the exam asks about.

The reading is analogue, so it passes through an analogue-to-digital converter before a processor can use it. The processor compares it with a stored value and decides. If action is needed, the signal goes to an actuator — and the action changes the very quantity the sensor is measuring.

Step from Sense to Act. The sensor is only the first of four stages, and the loop closes because the actuator changes what the sensor is measuring.

Name every stage in the chain

A question asking how a system responds to a sensor reading wants four things: the sensor measuring, the ADC converting, the microprocessor comparing against a preset, and the actuator acting. Answers that jump from "the sensor detects it is cold" to "the heater comes on" miss the two stages in the middle, which are usually where the marks are.

05

Direct data entry

Some input devices are designed to capture data without anyone typing it, which is faster and far more accurate. The syllabus names several and asks where each is appropriate.

A barcode reader identifies a product from a printed pattern. QR codes hold much more data and can be read from any angle by a phone. RFID reads a tag by radio without needing line of sight, so a whole pallet can be scanned at once. Magnetic stripe and chip readers handle cards, and OMR — optical mark recognition — reads pencil marks in fixed positions, which is how multiple-choice answer sheets are marked.

MethodReadsSuited to
Barcode readera printed line patternsupermarket checkouts, libraries
QR codea two-dimensional patternlinks and tickets read by phone
RFIDa radio tag, no line of sightstock control, passports, animal tagging
Magnetic stripe / chipa bank or ID cardpayments and access control
OMRpencil marks in set positionsmultiple-choice papers, ballot forms
OCRprinted or written charactersdigitising documents, number plates

Why direct entry beats typing

It is faster, and it removes the transcription errors a person makes. It also allows validation at the moment of capture — a barcode carries a check digit, so a misread is detected immediately rather than becoming a wrong product on a receipt. The accuracy argument is usually worth more marks than the speed one, and it is the one candidates leave out.

Practice questions

6 questions · 20 marks · full working on every one

Try each one on paper first, then open the working. The marks are shown where they are actually awarded, because that is where they are actually lost.

Short questions

3 · 6 marks

Two marks each, in the style of the short-question section of the paper. Answer in two or three lines.

SQ1[2 marks]
Give one device that is both an input and an output device, and explain why.
Model answer

A touchscreen. It displays information, which is output, and senses where the user touches, which is input — both functions in one device.

Examiner tip. A modem is the other standard answer, sending and receiving. Either earns the marks provided both directions are explained.

SQ2[2 marks]
Why is an analogue-to-digital converter needed between a sensor and a microprocessor?
Model answer

A sensor produces a continuously varying analogue reading, while a microprocessor can only work with digital values. The ADC converts the analogue signal into a number the processor can use.

Examiner tip. Name both forms explicitly. "Because computers use binary" is half the answer without saying what the sensor produces.

SQ3[2 marks]
Name a suitable sensor for an automatic greenhouse watering system and explain your choice.
Model answer

A moisture sensor in the soil. It measures the water content directly, which is the quantity the system needs to control, so watering can be triggered when the soil dries below a preset level.

Examiner tip. Match the sensor to the quantity being controlled. A temperature sensor in a greenhouse is a reasonable answer to a different question.

Solved numericals

2 · 8 marks

Full working, one step per line, with the marks shown where they are awarded.

N1[4 marks]
Compare inkjet and laser printers, recommending one for a business printing 2000 invoices a month.
Full working
  1. An inkjet sprays ink droplets; it is cheap to buy and gives good colour quality, but is slow with a high cost per page[1]
  2. A laser uses toner and a drum; it is faster with a much lower cost per page, though dearer to buy[1]
  3. Recommend the laser printer[1]
  4. 2000 pages a month is high volume, so the lower cost per page and greater speed outweigh the higher purchase price, and invoices need no photographic colour qualitythe justification must use the figures given[1]

Laser — high volume makes speed and cost per page decisive, and invoices need no photo quality.

Examiner tip. Use the number in the question. "Laser is better for businesses" is a general claim; "2000 a month makes cost per page decisive" answers this question.

N2[4 marks]
Describe how a barcode reader works and give two advantages over typing a product code by hand.
Full working
  1. A light or laser is shone at the barcode and the reflection is measured — dark bars reflect less light than the light spaces[1]
  2. The pattern of reflections is converted into a number, which is looked up in the product database[1]
  3. Advantage: it is much faster than typing a long code[1]
  4. Advantage: it is far more accurate — no mistyping — and a check digit in the code catches any misread[1]

Reflected light is read as a pattern and converted to a number; faster and more accurate than typing.

Examiner tip. The check digit is worth mentioning, since it links this topic back to error detection and shows why misreads are caught.

Long questions

1 · 6 marks

Theory and numerical together, as they appear in the long-question section.

LQ1[6 marks]
An automatic car park barrier raises when a car approaches and a valid ticket is presented.
  1. Name two input devices the system would use and state what each detects.
  2. Name the output device that raises the barrier.
  3. Explain why the sensors alone cannot operate the barrier.
Mark scheme
  1. A proximity or infrared sensor to detect that a vehicle is present at the barrier[1]
  2. A barcode or card reader to read the ticket presented by the driveraccept a camera reading the number plate[1]
  3. An actuator — a motor — raises and lowers the barrier arm[1]
  4. Sensors only measure; they produce readings and make no decisions[1]
  5. A microprocessor must compare the ticket against stored valid tickets and check that a vehicle is actually present[1]
  6. Only then does it send a signal to the actuator, so the processor is what turns two readings into an action[1]

(a) a proximity sensor and a ticket reader (b) a motor as actuator (c) sensors only measure — the processor compares and decides

Examiner tip. The chain is always sensor → converter → processor → actuator. Naming all four parts is what full marks looks like in any control-system question.