Hardware
Why a computer needs input, output, memory and storage; embedded systems; how nine devices work; buffers; and RAM and ROM and their kinds.
WATCH IT EXPLAINED
Input, output, memory and storage
A computer needs four kinds of part: input, output, primary memory and secondary storage.
| Part | Its job | Examples |
|---|---|---|
| Input devices | get data in | a keyboard, a microphone, a sensor |
| Output devices | present the results | a screen, a printer, speakers |
| Primary memory | is accessed directly by the processor | RAM and ROM |
| Secondary storage | keeps programs and files, much larger than memory | a hard disk, an SSD |
RAM holds the programs and data in use now. It is fast, but volatile: it loses its data when the power is off. It is small compared with storage.
Secondary storage is non-volatile. Programs and files stay there when the power is off.
Removable storage, such as a USB flash drive or an optical disc, can be carried to another computer.
Example:Your essay is in RAM while you type it. Save it, and it goes to the SSD, so it survives switching off.
Embedded systems
An embedded system is a small computer hidden inside a device, doing just one job.
An embedded system is a computer built into a larger device to do one dedicated job. It has:
- a microprocessor or microcontroller
- memory
- input and output.
Its program is firmware (software kept in the chip), stored in ROM, for example in an EEPROM.
Example:The controllers in a washing machine, a microwave oven, a TV and a car alarm.
| Benefits | Drawbacks |
|---|---|
| small, so it fits inside the device | the user cannot easily change or update its firmware |
| cheap to manufacture | it cannot easily be adapted to a different task |
| uses little power | it is hard to upgrade: finding faults or upgrading it is a specialist job |
| needs little processing power for its one task | a faulty device is often thrown away rather than repaired |
| works automatically, with no person needed |
Buffers
A buffer is a waiting area in memory, so a fast device does not have to wait for a slow one.
A buffer is a temporary area of memory. It holds data while the data moves between two devices that work at different speeds.
How a printer buffer works:
- The processor fills the printer's buffer in a moment, and goes back to other work.
- The printer empties the buffer at its own slow speed.
- When it needs more, the printer sends an interrupt (a signal asking the processor for attention).
Without a buffer, the processor would have to wait for the printer.
Buffers are also used for keyboard input, for data going to a hard disk, and when streaming video.
| Buffer | Cache |
|---|---|
| smooths out a difference in speed | keeps frequently used data close to the processor |
Watch out:A buffer is not a cache.
How output devices work: laser printer, 3D printer, speaker
A laser printer uses static charge, a 3D printer builds layers, and a speaker turns current into vibration.
| Device | What it uses | What it makes |
|---|---|---|
| Laser printer | static electricity | a printed page |
| 3D printer | thin layers, built one at a time | a solid object |
| Speaker | a varying electrical signal | sound |
Laser printer:
- A laser draws the page as a pattern of charge on a rotating drum.
- Toner (a fine powder) sticks only to that pattern.
- The toner is moved onto the paper.
- Heat melts it on.
3D printer: software slices a design into thin layers. The printer builds a solid object layer by layer.
Speaker: a varying current flows in a coil beside a magnet. This makes the coil and its cone vibrate. The cone pushes the air, and that is sound.
The box below gives every step for the exam.
LASER PRINTER
1 The drum is given an electric charge.
2 A laser beam scans the rotating drum
and changes the charge wherever the
page should be printed, leaving an
electrostatic image of the page.
3 Charged toner is attracted to that
image only.
4 The paper is given a charge opposite
to the toner's, so the toner is pulled
onto the paper.
5 The fuser's heated rollers melt the
toner and fix it to the paper.
6 The charge is removed from the drum,
and any toner left on it is collected,
ready for the next page.
3D PRINTER
1 The object is designed in CAD software
(or scanned).
2 Software divides the design into thin
horizontal layers and makes the
instructions for the printer.
3 The printer builds one layer at a time,
from the bottom up. For example, a
heated nozzle melts plastic filament
and lays it along each layer's paths.
Other printers harden liquid resin
with UV light, or fuse powder with a
laser.
4 Each layer bonds to the one below. The
plate and the nozzle move apart by one
layer's thickness.
5 Some materials need time to cool and
set, and some resins are hardened
(cured) with UV light.
SPEAKER
1 A DAC converts the digital sound data
to an analogue electrical signal, and
the current is sent to the speaker.
2 The current flows through a coil fixed
to a cone, inside the field of a
permanent magnet.
3 The current makes the coil an
electromagnet. As the signal changes,
the current changes direction, so the
permanent magnet pushes and pulls the
coil.
4 The coil and the cone vibrate and push
the air, making sound waves.How input devices work: microphone, touchscreen, VR headset
An input device turns something physical, like sound or a touch, into an electrical signal.
Each input device turns something physical into an electrical signal.
Dynamic microphone:
- Sound makes a diaphragm (a thin sheet) vibrate.
- The diaphragm moves a coil in a magnetic field.
- The current this makes copies the sound wave.
- An ADC (analogue-to-digital converter) turns it into digital samples.
Two kinds of touchscreen:
| Resistive | Capacitive | |
|---|---|---|
| What it senses | where two flexible layers are pressed together | where a finger changes the charge on the screen |
| Glove or stylus? | works too | a glove does not conduct, so it is not detected |
| Several fingers (multi-touch)? | no | yes |
A VR headset is input and output. Sensors track your head, and screens show the matching view.
Exam:A gloved finger works on a resistive screen but not on a capacitive one. Say why: a glove does not conduct.
MICROPHONE (dynamic)
1 Sound waves make a thin diaphragm
vibrate.
2 The diaphragm moves a coil in the field
of a magnet.
3 This produces a small varying current
that copies the sound wave: an analogue
signal.
4 An ADC samples it and turns it into
digital data.
RESISTIVE TOUCHSCREEN
1 Two flexible layers with conductive
coatings are held apart by a small gap.
2 Pressing makes the layers touch at one
point, and this completes a circuit.
3 In the figure's model, a voltage is put
across one layer. The voltage measured
at the touch gives the position across
(x); the other layer gives the position
down (y).
Example: 1.2 V of 3.3 V
-> 36% of the way across.
4 Anything that presses works: finger,
glove, stylus. It does not allow
multi-touch.
CAPACITIVE TOUCHSCREEN
1 Under the glass is a transparent layer
that conducts and holds a small
electric charge.
2 A finger conducts, so it changes the
charge (capacitance) where it touches.
3 A microprocessor works out the
coordinates of the touch. It can find
several fingers at once.
4 A glove or a plastic stylus does not
conduct, so no touch is detected.
VR HEADSET
1 One or two screens show the image to
the eyes, through lenses. Speakers give
surround sound.
2 Sensors (a gyroscope and an
accelerometer) detect how the head
moves.
3 A microprocessor works out the
direction and speed of the movement.
4 The images are updated to match, so
the view turns with the head.How storage devices work: hard disk, SSD, optical disc
A hard disk stores data as magnetism, an SSD as trapped charge, and an optical disc as pits and lands.
| Magnetic hard disk | Solid state drive (SSD) | Optical disc | |
|---|---|---|---|
| Stores data as | tiny magnetised areas on spinning platters | electric charge trapped in flash memory cells | pits (dips) and lands (flat parts) on one spiral track |
| Read by | heads on a moving arm, which also write | no heads: nothing moves | a laser |
| Moving parts? | yes | none | yes: the disc spins |
Exam:Each storage device keeps data in a different physical form, and each needs its own words in an answer.
Watch out:For an SSD, write flash memory and trapped charge. Never write magnetism.
Use the tabs to drive each one.
HARD DISK (magnetic)
1 Platters coated in magnetic material
spin fast.
2 Read/write heads on an arm move across
them.
3 Data is in concentric tracks, divided
into sectors.
4 Writing magnetises tiny areas in one
of two directions; reading detects
which way each one is.
5 Access time = seek + wait
seek move the arm to the track
wait the sector spins round to the
head
At 7200 rpm, one turn takes
60 / 7200 s = 8.33 ms, so the average
wait, half a turn, is 4.17 ms.
SSD (solid state, flash memory)
1 No moving parts. A bit is stored by
trapping electric charge, or not, in a
cell's floating gate.
2 The charge stays with no power
(non-volatile).
3 Old data cannot be overwritten: it
must be erased first, and then the new
data is written.
4 Each cell can be written only a
limited number of times.
OPTICAL DISC (CD, DVD, Blu-ray)
1 One spiral track of pits and lands.
2 A laser shines on the track as the
disc spins.
3 Pits and lands reflect the light
differently. A sensor turns the
changes in reflected light into binary.
4 To write data, the laser burns pits
into the disc.
5 Blu-ray uses a blue-violet laser, with
a shorter wavelength than a DVD's red
laser, and a Blu-ray disc holds more
data.RAM and ROM, SRAM and DRAM
RAM is the working memory that forgets at power-off; ROM keeps the start-up instructions. Cache is SRAM, main memory DRAM.
| RAM | ROM | |
|---|---|---|
| Volatile? | yes: lost at power-off | no: kept |
| Changed? | read and write | normally read only |
| Holds | the operating system (OS), programs and data in use now | the instructions needed at start-up (bootstrap, firmware) |
RAM comes in two kinds:
| SRAM (static) | DRAM (dynamic) | |
|---|---|---|
| One bit is | a flip-flop made of several transistors | charge in a capacitor, with one transistor |
| Refresh? | no | yes, constantly: the charge leaks, so every cell is refreshed many times a second |
| Speed | faster | slower |
| Cost per bit | higher: expensive | lower: cheaper |
| Density (bits on a chip) | lower: fewer bits fit | higher: denser |
| Used for | cache in the CPU, so a cache is small | main memory of a PC, laptop or phone |
PROM, EPROM and EEPROM
PROM is written once, EPROM is wiped with UV light, and EEPROM is rewritten electrically inside the device.
| PROM | EPROM | EEPROM | |
|---|---|---|---|
| Programmed | only once, after it is made blank | again after erasing | electrically, in the device |
| Erased | never: after that it can never be changed | by ultraviolet (UV) light: all of its data, the whole chip at once | electrically, in the device; a single byte can be changed |
| Taken out of the device? | yes, to be erased and reprogrammed | no |
Remember:An EEPROM can be rewritten many times without leaving the device. So it is used for firmware that may need an update.
Watch out:Do not write that ROM can never be changed. An EEPROM can be rewritten electrically.
Sort each device by what it does for the computer.
PICK ONE, THEN PICK ITS GROUP
- empty
- empty
- empty
KEY TERMS
CHECK YOURSELF
1.Which kind of ROM is erased with ultraviolet light?
2.Why is SRAM used for cache rather than DRAM?
3.Why does DRAM need refreshing?
4.What is a buffer used for?
5.Which kind of touchscreen does not detect a finger in an ordinary glove?
6.How does an SSD store each bit?