Skip to content

Hardware

A-Level Computer Science · Topic 3

Train
3.1

Computers and their components

Syllabus
Candidates should be able to: Notes and guidance
Show understanding of the need for input, output, primary memory and secondary (including removable) storage
Show understanding of embedded systems Including: benefits and drawbacks of embedded systems
Describe the principal operations of hardware devices Including: Laser printer, 3D printer, microphone, speakers, magnetic hard disk, solid state (flash) memory, optical disc reader/writer, touchscreen, virtual reality headset
Show understanding of the use of buffers
Explain the differences between Random Access Memory (RAM) and Read Only Memory (ROM) Including their use in a range of devices and systems
Explain the differences between Static RAM (SRAM) and Dynamic RAM (DRAM) Including the use of SRAM and DRAM in a range of devices and systems and the reasons for using one instead of the other depending on the device and its use
Explain the difference between Programmable ROM (PROM), Erasable Programmable ROM (EPROM) and Electrically Erasable Programmable ROM (EEPROM)
Show an understanding of monitoring and control systems Including: • difference between monitoring and control • use of sensors (including temperature, pressure, infra-red, sound) and actuators • importance of feedback

Source: Cambridge International syllabus

A general-purpose computer has four building blocks:

  • input devices 输入设备 — get data in (keyboard, mouse, microphone, scanner, sensors).
  • output devices 输出设备 — give results out (monitor, speakers, printer, actuators).
  • primary memory 主存储器 — fast memory the processor 处理器 (CPU) reaches directly (RAM and ROM). Holds the running program and its data.
  • secondary storage 辅助存储器 — slower, larger, keeps programs and data when not in use (hard disk, SSD, optical disc, USB stick).

A full-size white wireless QWERTY computer keyboard on a white background A keyboard: a common input device for typing text and commands

A modern wireless computer mouse on a white background, with two buttons and a scroll wheel A mouse: a pointing input device

A flatbed scanner on a white background, with a photo coming out of the front after scanning A flatbed scanner: an input device that turns a paper page into a digital image

A silver flat-screen computer monitor on a round stand, with a dark screen A monitor: a common output device that displays the screen image

Explore

Tap the blocks of a computer system

Explore the four blocks plus the CPU. Data flows input → processing → output, while primary memory holds the running program and secondary storage keeps it for later.

Explore

Network route lab

Follow data from a device through network hardware and protocols.

Vocabulary Train
English Chinese Pinyin
input devices 输入设备 shū rù shè bèi
output devices 输出设备 shū chū shè bèi
primary memory 主存储器 zhǔ cún chǔ qì
processor 处理器 chǔ lǐ qì
secondary storage 辅助存储器 fǔ zhù cún chǔ qì
3.1

Embedded systems

An embedded system 嵌入式系统 is a computer built into another device to do one fixed job (washing machine, microwave, car engine unit, thermostat).

  • benefits: optimised for one task (low power, small, cheap); reliable; fast to start; cheap in volume.
  • drawbacks: limited to its one task; hard to update (its firmware 固件 may need special tools); often not repairable; sometimes weak security.
Vocabulary Train
English Chinese Pinyin
embedded system 嵌入式系统 qiàn rù shì xì tǒng
firmware 固件 gù jiàn
3.1

Principal hardware devices

Laser printer

A laser printer 激光打印机 scans the page image onto a charged photosensitive drum 感光鼓. Toner 墨粉 sticks to the charged areas, transfers to the paper, and is melted on by a fuser. Fast, sharp, high-volume.

A black desktop laser printer on a white background, with a printed page coming out of the top A laser printer: fast, sharp printing using a charged drum and toner

3D printer

A 3D printer 3D打印机 builds an object layer by layer: FDM melts plastic filament through a nozzle; stereolithography cures liquid resin with a UV laser. Used for prototypes and custom medical parts.

A black enclosed desktop FDM 3D printer with a glass front panel, a part being printed inside, on a white background An FDM 3D printer builds an object layer by layer by melting plastic filament

Microphone and speakers

A microphone 麦克风 turns sound into an electrical signal (a diaphragm vibrates, changing capacitor 电容器 charge or coil position); the signal is digitised by an analogue-to-digital converter 模数转换器 (ADC). A speaker does the reverse — a varying signal drives a coil in a magnetic field, moving a cone to make sound.

A black USB desktop microphone standing on its base, on a white background A microphone turns sound into an electrical signal

Cutaway of a microphone: sound waves hit a diaphragm linked to a coil around a permanent magnet, giving an output current Inside a microphone: sound vibrates the diaphragm and coil to produce a current

Cutaway of a loudspeaker: current in a coil around an iron core near a permanent magnet moves a paper cone to produce sound waves Inside a loudspeaker: a varying current in the coil moves the cone to make sound

Magnetic hard disk (HDD)

A hard disk 硬盘 stores data on spinning platters coated with magnetic material. Each platter has tracks 磁道 divided into sectors 扇区. A read/write head 读写头 floats just above and magnetises tiny regions (write) or senses them (read). Cheap per gigabyte, but slower than SSDs and has moving parts.

An opened 3.5-inch hard disk drive: a shiny circular platter with the actuator arm and read/write head resting over it An opened hard disk: the actuator arm carries the read/write head over a platter

A hard disk platter drawn as concentric track circles, one track highlighted, divided into sectors Tracks and sectors on a hard disk platter

Solid-state (flash) memory

A solid-state drive 固态硬盘 stores data as charge in transistors 晶体管, with no moving parts. Faster random access than HDDs, tougher, lower power, but dearer per gigabyte; each cell wears out after many writes.

The opened circuit board of a solid-state drive on a white background: a large black flash-memory chip on the left, a smaller controller chip, many tiny components, and a flat SATA connector along the bottom edge — no platters or moving parts Inside an SSD: data is stored in flash memory chips, with no moving parts (compare the hard disk above)

Optical disc

A laser detects reflections from tiny pits on an optical disc 光盘 (CD, DVD, Blu-ray). The drive is an optical disc reader/writer: writing uses a stronger laser to change the surface's reflectivity.

An external optical disc drive on a white background, its tray open with a rainbow-coloured disc loaded An optical disc drive: a laser reads tiny pits on a CD, DVD or Blu-ray disc

Touchscreen

A touchscreen 触摸屏 senses contact. Resistive 电阻式: two conductive layers pressed together; works with anything but is less accurate. Capacitive 电容式: a finger disturbs a charge field; accurate, multi-touch, used in phones.

A modern flat-panel touch monitor on a white background A touchscreen senses where a finger touches the glass

Virtual reality headset

A virtual reality 虚拟现实 (VR) headset has two small displays (one per eye) and motion sensors (accelerometer 加速度计, gyroscope 陀螺仪) that track head movement so the scene shifts as you look around.

A white virtual reality headset with its head strap and front cameras, on a white background A virtual reality headset: two small displays and motion sensors track the head

Vocabulary Train
English Chinese Pinyin
laser printer 激光打印机 jī guāng dǎ yìn jī
drum 感光鼓 gǎn guāng gǔ
toner 墨粉 mò fěn
3D printer 3D打印机 3D dǎ yìn jī
microphone 麦克风 mài kè fēng
capacitor 电容器 diàn róng qì
analogue-to-digital converter 模数转换器 mó shù zhuǎn huàn qì
hard disk 硬盘 yìng pán
tracks 磁道 cí dào
sectors 扇区 shàn qū
read/write head 读写头 dú xiě tóu
solid-state drive 固态硬盘 gù tài yìng pán
transistors 晶体管 jīng tǐ guǎn
optical disc 光盘 guāng pán
touchscreen 触摸屏 chù mō píng
resistive 电阻式 diàn zǔ shì
capacitive 电容式 diàn róng shì
virtual reality 虚拟现实 xū nǐ xiàn shí
accelerometer 加速度计 jiā sù dù jì
gyroscope 陀螺仪 tuó luó yí
3.1

Buffers

A buffer 缓冲 is memory that holds data temporarily while it moves between devices of different speeds. Example: the CPU writes a document to a printer buffer quickly, then is free to do other work while the printer prints from the buffer at its own pace. Buffers stop the fast device waiting for the slow one (also used in streaming, the keyboard, and disk access).

Vocabulary Train
English Chinese Pinyin
buffer 缓冲 huǎn chōng
3.1

RAM and ROM

  • RAM 随机存取存储器 (Random Access Memory) — volatile 易失性 (loses data without power). Holds the OS, running programs and their data; read and written constantly.
  • ROM 只读存储器 (Read-Only Memory) — non-volatile 非易失性 (keeps data without power). Usually written once; holds firmware needed at start-up (the BIOS / boot loader).

RAM is volatile and read/write; ROM is non-volatile and read-only RAM is volatile and read/write; ROM is non-volatile and read-only

ROM starts the system; RAM then holds the active work.

A RAM module (DIMM): a circuit-board stick with a black heat-spreader over the memory chips and a gold-edged connector that plugs into a slot on the motherboard A RAM module (DIMM) plugs into the motherboard as the computer's fast main memory

Explore

Device and storage lab

Classify computing examples by what job they do in a system.

Vocabulary Train
English Chinese Pinyin
RAM 随机存取存储器 suí jī cún qǔ cún chǔ qì
volatile 易失性 yì shī xìng
ROM 只读存储器 zhī dú cún chǔ qì
non-volatile 非易失性 fēi yì shī xìng
3.1

SRAM vs DRAM

  • SRAM 静态RAM (Static RAM) stores each bit in a flip-flop 触发器 of several transistors. Fast, but expensive and not dense. Used for CPU cache 高速缓存.
  • DRAM 动态RAM (Dynamic RAM) stores each bit as charge on a tiny capacitor. Cheaper and denser but slower, and must be refreshed 刷新 (rewritten) thousands of times a second. Used for main memory.

Use SRAM for small fast memory (cache); DRAM for large main memory.

Vocabulary Train
English Chinese Pinyin
SRAM 静态RAM jìng tài RAM
flip-flop 触发器 chù fā qì
cache 高速缓存 gāo sù huǎn cún
DRAM 动态RAM dòng tài RAM
refreshed 刷新 shuā xīn
3.1

PROM, EPROM and EEPROM

ROM variants you can program after manufacture:

  • PROM (Programmable ROM) — written once (fuses burned by a programmer); cannot be changed.
  • EPROM (Erasable Programmable ROM) — erased by strong UV light through a window, then rewritten (whole chip at once).
  • EEPROM (Electrically Erasable Programmable ROM) — erased and rewritten electrically, a byte at a time, in circuit. Flash memory is a derivative optimised for block erase.
3.1

Monitoring and control systems

Both read sensors; the difference is what they do next.

  • monitoring 监控 — collects and reports data but takes no action (a weather station logging readings).
  • control system 控制系统 — uses sensor data to decide and act through actuators, usually in a feedback loop (a thermostat turning a boiler on/off).

Flowchart: sensors send signals through an ADC to the processor, which either reports a warning for monitoring or sends signals to actuators in a feedback loop for control Monitoring reports data; a control system acts through a feedback loop

Sensors and actuators

A sensor 传感器 turns a physical quantity into a signal: temperature (a thermistor 热敏电阻 or thermocouple), pressure (strain gauge), infra-red, sound. Analogue signals need an ADC first. An actuator 执行器 does the reverse — turns a signal into an action (a motor, valve, heater, buzzer).

Small bead thermistors with two wire legs each, on a white background A thermistor: a temperature sensor whose resistance changes with heat

A small metal stepper motor with a central shaft and coloured wires, on a dark studio background A small electric motor: an actuator that turns a signal into movement

Feedback

In a control system the actuator changes the environment, which the sensors then re-measure — a feedback 反馈 loop. Without feedback the system cannot correct itself or know when to stop (a thermostat with no temperature feedback would heat forever).

Explore

The control feedback loop

Tap round the loop a thermostat or autopilot repeats. A control system doesn't just read the world — it acts, then re-measures, correcting itself again and again.

Vocabulary Train
English Chinese Pinyin
monitoring 监控 jiān kòng
control system 控制系统 kòng zhì xì tǒng
sensor 传感器 chuán gǎn qì
thermistor 热敏电阻 rè mǐn diàn zǔ
actuator 执行器 zhí xíng qì
feedback 反馈 fǎn kuì
3.2

Logic gates

Syllabus
Candidates should be able to: Notes and guidance
Use the following logic gate symbols: [NOT, AND, OR, NAND, NOR, XOR]
Understand and define the functions of: NOT, AND, OR, NAND, NOR and XOR (EOR) gates All gates except the NOT gate will have two inputs only.
Construct the truth table for each of the logic gates above
Construct a logic circuit From: • a problem statement • a logic expression • a truth table
Construct a truth table From: • a problem statement • a logic circuit • a logic expression
Construct a logic expression From: • a problem statement • a logic circuit • a truth table

Source: Cambridge International syllabus

The half adder: XOR + AND add two bits

A logic gate 逻辑门 is a small circuit that does one Boolean 布尔 operation. Inputs and outputs are 0 (false, low) or 1 (true, high). Know the symbol, function and truth table 真值表 for each gate.

The circuit symbols for NOT, AND, OR, NAND, NOR and XOR gates in a two-by-three grid The symbols for the six logic gates

NOT (inverter)

A NOT A
0 1
1 0

AND — output 1 only if all inputs are 1

A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1

OR — output 1 if at least one input is 1

A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1

NAND (NOT AND) — output 0 only when all inputs are 1

A B A NAND B
0 0 1
0 1 1
1 0 1
1 1 0

NOR (NOT OR) — output 1 only when all inputs are 0

A B A NOR B
0 0 1
0 1 0
1 0 0
1 1 0

XOR (Exclusive OR, also called EOR) — output 1 if the inputs are different

A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0
Explore

Logic gates

Switch the inputs and pick a gate. Each gate has its own rule — the building blocks of every digital circuit.

Vocabulary Train
English Chinese Pinyin
logic gate 逻辑门 luó jí mén
Boolean 布尔 bù ěr
truth table 真值表 zhēn zhí biǎo
3.2

Logic circuits

A logic circuit 逻辑电路 is a network of gates that carries out a Boolean expression. You should be able to move between a problem statement, a logic expression, a truth table, and a circuit diagram.

From expression to circuit

Draw one gate per operator and wire them up. For $X = (A \text{ AND } B) \text{ OR } (\text{NOT } C)$: a NOT gate on $C$, an AND gate on $A$ and $B$, then an OR gate on the two results.

A logic circuit: an AND gate on inputs A and B, a NOT gate on input C, both feeding an OR gate that gives output X Gates wired together to carry out a Boolean expression

From circuit to expression

Work forwards from the inputs, labelling each gate's output, until you reach the final output.

From circuit to truth table

For $n$ inputs there are $2^{n}$ rows. List every input combination; for each, work out the internal gates then the output.

From truth table to expression (sum of products)

For each row that outputs 1, write an AND of the inputs (with NOT on any input that is 0 in that row); OR these together. Example: a table that is 1 only on $(A=0,B=1)$ and $(A=1,B=0)$ gives $\overline{A}B + A\overline{B}$, which is $A \text{ XOR } B$.

From a problem statement

Turn the English into a Boolean expression first: "A and B" → A AND B; "A or B or both" → A OR B; "exactly one of A and B" → A XOR B; "neither A nor B" → A NOR B; "not both" → A NAND B.

Worked example. A machine's alarm $X$ sounds when the guard is open ($A=1$) and either the motor is running ($B=1$) or the temperature is high ($C=1$). Write the Boolean expression, and give the rows where $X=1$. Turn the English into logic one clause at a time: "either B or C" is $B + C$, and "A and that" is $X = A\cdot(B + C)$. For the rows, $X=1$ needs $A=1$ and at least one of $B$, $C$ equal to 1 - so $(A,B,C) = (1,0,1)$, $(1,1,0)$ and $(1,1,1)$, three rows out of eight. Notice $A=0$ can never sound the alarm, whatever $B$ and $C$ do. Bracket the OR before ANDing it: $X = A\cdot B + C$ is a different circuit altogether, one that would sound the alarm on a high temperature even with the guard closed.

Explore

Half adder

Wire XOR and AND to the same two inputs: XOR gives the sum bit, AND gives the carry. Click A and B.

Explore

Logic circuits

gates combine into circuits

Each gate has a fixed rule; chaining them builds every circuit — start with one gate.

Vocabulary Train
English Chinese Pinyin
logic circuit 逻辑电路 luó jí diàn lù
3.2

Exam tips

  • Distinguish RAM (volatile, read/write) from ROM (non-volatile, holds the bootstrap); SRAM (cache, faster) from DRAM (main memory, needs refreshing).
  • For a logic circuit, build the Boolean expression gate by gate, then a truth table covering every input combination.
  • Learn the symbol, expression and truth table for each gate (AND, OR, NOT, NAND, NOR, XOR).
  • Explain a buffer (a temporary store bridging two different speeds) and the role of an interrupt.

Log in or create account

IGCSE & A-Level