Skip to content

Hardware

IGCSE Computer Science · Topic 3

Train
3.1

The central processing unit (CPU)

Syllabus
Candidates should be able to: Notes and guidance
1 (a) Understand the role of the central processing unit (CPU) in a computer • The CPU processes instructions and data that are input into the computer so that the result can be output
(b) Understand what is meant by a microprocessor • A microprocessor is a type of integrated circuit on a single chip
2 (a) Understand the purpose of the components in a CPU, in a computer that has a Von Neumann architecture • Including: – units: arithmetic logic unit (ALU) and control unit (CU) – registers: program counter (PC), memory address register (MAR), memory data register (MDR), current instruction register (CIR) and accumulator (ACC) – buses: address bus, data bus and control bus
(b) Describe the process of the fetch–decode–execute (FDE) cycle, including the role of each component in the process • How instructions and data are fetched from random access memory (RAM) into the CPU, how they are processed using each component and how they are then executed • Storing data and addresses into specific registers • Using buses to transmit data, addresses and signals • Using units to fetch, decode and execute data and instructions
3 Understand what is meant by a core, cache and clock in a CPU and explain how they can affect the performance of a CPU • The number of cores, size of the cache and speed of the clock can affect the performance of a CPU
4 Understand the purpose and use of an instruction set for a CPU • An instruction set is a list of all the commands that can be processed by a CPU, and the commands are machine code
5 Describe the purpose and characteristics of an embedded system and identify devices in which they are commonly used • An embedded system is used to perform a dedicated functions. For example in, domestic appliances, cars, security systems, lighting systems or vending machines. This is different to a general purpose computer that is used to perform many different functions. For example in, a personal computer (PC) or a laptop

Source: Cambridge International syllabus

The fetch-decode-execute cycle

The central processing unit 中央处理器 (CPU) is the part of the computer that processes data and carries out instructions 指令. It runs programs by repeating a cycle, millions of times each second.

A square computer chip with a shiny metal top and the model name printed on it A central processing unit (CPU): the chip that processes data and runs the instructions

Parts of the CPU

Part What it does
arithmetic logic unit 算术逻辑单元 (ALU) does calculations (add, subtract) and logical operations (compare)
control unit 控制单元 (CU) sends control signals to manage all the parts and tell them what to do
registers 寄存器 very small, very fast stores that hold one piece of data at a time

The parts are joined by buses 总线 — sets of wires that carry information:

  • the address bus 地址总线 carries memory addresses (one direction);
  • the data bus 数据总线 carries data and instructions (both directions);
  • the control bus 控制总线 carries control signals.

Block diagram of a CPU containing the control unit, ALU and registers, joined to main memory by the address, data and control buses The CPU holds the control unit, the ALU and the registers; three buses link it to main memory

Special registers

These registers are used during the fetch–execute cycle.

Register Purpose
program counter 程序计数器 (PC) holds the address of the next instruction
memory address register 内存地址寄存器 (MAR) holds the address to read from or write to
memory data register 内存数据寄存器 (MDR) holds the data or instruction just fetched
current instruction register 当前指令寄存器 (CIR) holds the instruction now being carried out
accumulator 累加器 (ACC) holds the result of the ALU's calculations

The fetch–execute cycle

The fetch–execute cycle 取指执行周期 has three stages, repeated again and again:

  1. Fetch — the instruction is copied from memory 内存 into the CPU (using the PC, MAR and MDR). The PC then increases by 1.
  2. Decode — the control unit works out what the instruction means.
  3. Execute — the instruction is carried out (the ALU may do a calculation, with the result going to the accumulator).

The fetch-decode-execute cycle drawn as three boxes connected in a loop The processor repeats three stages: fetch the instruction, decode it, then execute it

Cache memory

Cache 高速缓存 is a small amount of very fast memory inside or close to the CPU. It stores data and instructions that the CPU uses often. The CPU can read from cache much faster than from main memory, so the computer runs faster.

What affects CPU performance

Feature Effect
number of cores 核心 each core can run instructions on its own, so more cores can do more work at the same time
cache size a larger cache holds more data ready for the CPU, so it waits less
clock speed 时钟速度 the number of cycles per second; a higher clock speed runs more instructions per second

Worked example. Two computers are identical except that A has a 3.0 GHz single-core CPU with 2 MB of cache, and B has a 2.4 GHz quad-core CPU with 8 MB of cache. Which is better for video editing, and why? Video editing splits into many tasks that can run at the same time, so B's four cores can process several streams in parallel while A can only work on one at a time. B's larger cache also keeps more frequently used data close to the CPU, so it has to fetch from RAM less often. B is the better choice, even though A has the higher clock speed. Never answer on clock speed alone: weigh cores, cache and clock speed together, and tie each one to the job being done.

Embedded systems

An embedded system 嵌入式系统 is a small computer built inside a larger device to do one fixed job. It is dedicated to that task, is usually small and low-cost, and has no general operating system. Examples: a washing machine, a microwave, a set-top box.

A green circuit board densely packed with chips, memory and connectors, taken from inside a satnav The mainboard from inside a satnav: an embedded system is a small dedicated computer like this, built into a device to do one fixed job

Explore

The fetch-execute cycle

Tap round the loop the CPU repeats billions of times a second — fetch the instruction, decode what it means, execute it, then do it all again.

Vocabulary Train
English Chinese Pinyin
central processing unit 中央处理器 zhōng yāng chǔ lǐ qì
instructions 指令 zhǐ lìng
arithmetic logic unit 算术逻辑单元 suàn shù luó jí dān yuán
control unit 控制单元 kòng zhì dān yuán
registers 寄存器 jì cún qì
buses 总线 zǒng xiàn
address bus 地址总线 dì zhǐ zǒng xiàn
data bus 数据总线 shù jù zǒng xiàn
control bus 控制总线 kòng zhì zǒng xiàn
program counter 程序计数器 chéng xù jì shù qì
memory address register 内存地址寄存器 nèi cún dì zhǐ jì cún qì
memory data register 内存数据寄存器 nèi cún shù jù jì cún qì
current instruction register 当前指令寄存器 dāng qián zhǐ lìng jì cún qì
accumulator 累加器 lěi jiā qì
fetch–execute cycle 取指执行周期 qǔ zhǐ zhí xíng zhōu qī
Cache 高速缓存 gāo sù huǎn cún
cores 核心 hé xīn
clock speed 时钟速度 shí zhōng sù dù
embedded system 嵌入式系统 qiàn rù shì xì tǒng
memory 内存 nèi cún
3.2

Input devices

Syllabus
Candidates should be able to: Notes and guidance
1 Understand what is meant by an input device and why it is required • Including: – barcode scanner – digital camera – keyboard – microphone – optical mouse – QR code scanner – touch screen (resistive, capacitive and infra-red) – two-dimensional (2D) and three-dimensional (3D) scanners
2 Understand what is meant by an output device and why it is required • Including: – actuator – digital light processing (DLP) projector – inkjet printer – laser printer – light emitting diode (LED) screen – liquid crystal display (LCD) projector – liquid crystal display (LCD) screen – speaker – 3D printer
3 (a) Understand what is meant by a sensor and the purposes of sensors • Limited to: – acoustic – accelerometer – flow – gas – humidity – infra-red – level – light – magnetic field – moisture – pH – pressure – proximity – temperature
(b) Identify the type of data captured by each sensor and understand when each sensor would be used, including selecting the most suitable sensor for a given context

Source: Cambridge International syllabus

An input device sends data into the computer.

Device How it works
barcode scanner 条形码扫描器 shines light at the bars and reads the pattern reflected back
QR code scanner 二维码扫描器 a camera reads a square pattern of black-and-white blocks
keyboard pressing a key sends a code for that character
optical mouse 光电鼠标 a light and a sensor track movement across a surface
microphone turns sound waves into an electrical signal
digital camera a lens focuses light onto a sensor that records pixels
sensors 传感器 measure a physical quantity (such as temperature or light) and send it as data
touch screen 触摸屏 detects where your finger touches the screen

A close-up of a black computer keyboard with the QWERTY letter keys A keyboard: each key press sends a code for that character

A white optical mouse on a desk, with the optical light glowing underneath An optical mouse: a light and a sensor track its movement on the desk

A flat white box-shaped scanner with a closed lid that lifts up to scan a page A flatbed scanner: it shines light across a page to copy it into the computer

A handheld scanner in a stand, joined to a computer by a USB cable A barcode scanner reads the pattern of bars and sends it to the computer

The front of a small red digital camera, showing its lens and flash A digital camera: a lens focuses light onto a sensor that records the pixels

A handheld microphone with a rounded metal mesh head A microphone turns sound waves into an electrical signal

A small blue-and-black temperature sensor on a tiny circuit board with three pins A sensor measures a physical quantity (here, temperature) and sends it as data

A touch screen can work in three ways:

  • resistive 电阻式 — two layers are pressed together where you touch;
  • capacitive 电容式 — it senses the tiny electric charge of your finger;
  • infrared 红外线 — your finger breaks a grid of light beams.

A finger touching the screen of a smartphone to scroll a page A touch screen senses where your finger touches it

Explore

Device and storage lab

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

Vocabulary Train
English Chinese Pinyin
barcode scanner 条形码扫描器 tiáo xíng mǎ sǎo miáo qì
QR code scanner 二维码扫描器 èr wéi mǎ sǎo miáo qì
sensors 传感器 chuán gǎn qì
touch screen 触摸屏 chù mō píng
resistive 电阻式 diàn zǔ shì
capacitive 电容式 diàn róng shì
infrared 红外线 hóng wài xiàn
optical mouse 光电鼠标 guāng diàn shǔ biāo
3.2

Output devices

An output device sends data out of the computer to the user.

Device How it works
actuator 执行器 turns an electrical signal into movement (e.g. a motor or valve)
LCD/LED screen shows images using a grid of tiny coloured dots
projector 投影仪 shines an enlarged image onto a wall or screen
inkjet printer 喷墨打印机 sprays tiny drops of ink onto paper
laser printer 激光打印机 uses a laser and powder (toner) fixed onto paper by heat
3D printer builds a solid object layer by layer
speaker 扬声器 turns an electrical signal into sound

A desktop inkjet printer with the paper tray open at the top An inkjet printer sprays tiny drops of ink onto the paper

A white-and-grey desktop laser printer with its paper trays folded out A laser printer uses a laser and powder (toner) fixed onto paper by heat

A 3D printer: a black metal frame holding a flat print bed and a moving print head A 3D printer builds a solid object layer by layer

A wide flat-screen computer monitor on a round stand An LCD/LED monitor shows images using a grid of tiny coloured dots

A pair of small black computer speakers on a desk A speaker turns an electrical signal into sound

A pair of blue over-ear headphones Headphones turn an electrical signal into sound for one listener

Several electric motors of different sizes next to a 9-volt battery for scale An actuator such as a motor turns an electrical signal into movement

Vocabulary Train
English Chinese Pinyin
actuator 执行器 zhí xíng qì
projector 投影仪 tóu yǐng yí
inkjet printer 喷墨打印机 pēn mò dǎ yìn jī
laser printer 激光打印机 jī guāng dǎ yìn jī
speaker 扬声器 yáng shēng qì
3.3

Primary storage: RAM and ROM

Syllabus
Candidates should be able to: Notes and guidance
1 Understand what is meant by primary storage • Primary storage is directly accessed by the CPU • Including the role of: – random access memory (RAM) – read only memory (ROM) • Including why a computer needs both RAM and ROM, and the difference between them
2 Understand what is meant by secondary storage • Secondary storage is not directly accessed by the CPU and is necessary for more permanent storage of data
3 Describe the operation of magnetic, optical and solid-state (flash memory) storage and give examples of each • Magnetic storage uses platters which are divided into tracks and sectors. Data is read and written using electromagnets. Including hard disk drive (HDD) • Optical storage uses lasers to create and read pits and lands. Including: CD, DVD and Blu-ray • Solid-state (flash memory) uses NAND or NOR technology. Transistors are used as control gates and floating gates. Including: solid-state drive (SSD), SD card and USB drive
4 Describe what is meant by virtual memory, how it is created and used and why it is necessary • Pages of data are transferred between RAM and virtual memory when needed
5 Understand what is meant by cloud storage • Cloud storage can be accessed remotely in comparison to storing data locally
6 Explain the advantages and disadvantages of storing data on the cloud in comparison to storing it locally • Physical servers and storage are needed to store data in cloud storage

Source: Cambridge International syllabus

Primary storage 主存储器 is memory the CPU can use directly. There are two kinds.

RAM: volatile, can change, holds running programs. ROM: non-volatile, cannot change, holds the startup instructions RAM is volatile and holds running programs; ROM is non-volatile and read-only

RAM ROM
Full name random access memory 随机存取存储器 read only memory 只读存储器
Read/write read and write read only
Keeps data without power? no — it is volatile 易失性 yes — it is non-volatile 非易失性
Holds programs and data in use now start-up instructions (how to boot the computer)

Both are needed: ROM tells the computer how to start, then RAM holds the programs you run.

A long thin green circuit board carrying rows of small black memory chips and a gold edge connector A stick of RAM (random access memory): it holds the programs and data in use now

Vocabulary Train
English Chinese Pinyin
Primary storage 主存储器 zhǔ cún chǔ qì
random access memory 随机存取存储器 suí jī cún qǔ cún chǔ qì
read only memory 只读存储器 zhī dú cún chǔ qì
volatile 易失性 yì shī xìng
non-volatile 非易失性 fēi yì shī xìng
3.3

Secondary storage

Secondary storage 辅助存储器 keeps data permanently, even when the power is off. It is non-volatile and is used for long-term storage. There are three types.

Type How it stores data Examples
magnetic storage 磁存储 data is stored as magnetised spots on spinning disks hard disk drive (HDD), magnetic tape
optical storage 光存储 data is stored as marks read by a laser CD, DVD, Blu-ray
solid state storage 固态存储 data is stored in flash memory 闪存, with no moving parts SSD, USB flash drive, memory card

Inside an opened hard disk drive, showing the round silver disk (platter) and the read/write arm resting on it Inside a hard disk drive (HDD): the shiny disk spins and the arm reads the magnetised data

Four square magnetic-tape cartridges, each holding a reel of thin magnetic tape Magnetic tape stores data on a long magnetic strip; it is cheap for large backups

A shiny round disc reflecting rainbow colours from its data surface An optical disc such as a CD or DVD: a laser reads the marks on its shiny surface

A 2.5 inch Samsung solid state drive, a flat grey metal box with no visible moving parts A solid state drive (SSD) stores data in flash memory chips and has no moving parts

A small white USB stick with a red cap loop, labelled 32 GB A USB flash drive stores data in flash memory and has no moving parts

A pyramid with registers at the top, then cache, then RAM, then secondary storage at the base, with a faster-smaller to slower-larger arrow Storage forms a hierarchy: registers and cache are fastest but smallest; secondary storage is slowest but largest

Explore

Device and storage lab

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

Vocabulary Train
English Chinese Pinyin
Secondary storage 辅助存储器 fǔ zhù cún chǔ qì
magnetic storage 磁存储 cí cún chǔ
optical storage 光存储 guāng cún chǔ
solid state storage 固态存储 gù tài cún chǔ
flash memory 闪存 shǎn cún
3.3

Virtual memory

When the RAM becomes full, the computer can use part of the secondary storage as extra, pretend RAM. This is called virtual memory 虚拟内存.

Data that is not needed right now is moved out of RAM onto the disk, which frees space in RAM for other programs. This lets you run more programs than the RAM alone could hold. It is slower, because secondary storage is much slower than RAM.

RAM holding two active programs and a freed slot, with an arrow moving an unused program out to the disk When RAM is full, data not in use is moved to the disk to free RAM — slower, but it lets more programs run

Vocabulary Train
English Chinese Pinyin
virtual memory 虚拟内存 xū nǐ nèi cún
3.3

Cloud storage

Syllabus
Candidates should be able to: Notes and guidance
1 Understand what is meant by primary storage • Primary storage is directly accessed by the CPU • Including the role of: – random access memory (RAM) – read only memory (ROM) • Including why a computer needs both RAM and ROM, and the difference between them
2 Understand what is meant by secondary storage • Secondary storage is not directly accessed by the CPU and is necessary for more permanent storage of data
3 Describe the operation of magnetic, optical and solid-state (flash memory) storage and give examples of each • Magnetic storage uses platters which are divided into tracks and sectors. Data is read and written using electromagnets. Including hard disk drive (HDD) • Optical storage uses lasers to create and read pits and lands. Including: CD, DVD and Blu-ray • Solid-state (flash memory) uses NAND or NOR technology. Transistors are used as control gates and floating gates. Including: solid-state drive (SSD), SD card and USB drive
4 Describe what is meant by virtual memory, how it is created and used and why it is necessary • Pages of data are transferred between RAM and virtual memory when needed
5 Understand what is meant by cloud storage • Cloud storage can be accessed remotely in comparison to storing data locally
6 Explain the advantages and disadvantages of storing data on the cloud in comparison to storing it locally • Physical servers and storage are needed to store data in cloud storage

Source: Cambridge International syllabus

Cloud storage 云存储 keeps your data on remote physical servers, reached over the internet, instead of on your own device.

  • Advantages: reach it from anywhere on any device; no local storage hardware to buy or maintain; easy to share files and to back up automatically.
  • Disadvantages: needs a working internet connection; an ongoing subscription cost; security and privacy depend on the provider; you rely on that provider staying available and in business.
Vocabulary Train
English Chinese Pinyin
Cloud storage 云存储 yún cún chǔ
3.4

Network hardware

Syllabus
Candidates should be able to: Notes and guidance
1 Understand that a computer needs a network interface card (NIC) to access a network
2 Understand what is meant by, and the purpose of, a media access control (MAC) address, including its structure • A network interface card is given a MAC address at the point of manufacture • MAC addresses are usually written as hexadecimal • MAC addresses are created using the manufacturer code and the serial code
3 (a) Understand what is meant by, and the purpose of, an internet protocol (IP) address (b) Understand that there are different types of IP address • An IP address is allocated by the network and it can be static or dynamic • Including the characteristics of, and differences between, IPv4 and IPv6
4 Describe the role of a router in a network • A router sends data to a specific destination on a network • A router can assign IP addresses • A router can connect a local network to the internet

Source: Cambridge International syllabus

Network interface card (NIC)

A network interface card 网络接口卡 (NIC) is the hardware that lets a device join a network and send and receive data. Each NIC has a built-in MAC address.

MAC address and IP address

  • A MAC address (media access control 介质访问控制 address) is a number that identifies one physical device. The maker sets it, and it does not normally change. It is written in hexadecimal.
  • An IP address (internet protocol 网际协议 address) is a number that identifies a device on a network. It is given by the network and can change.

So a MAC address stays with the device, while an IP address depends on the network the device is using.

There are two versions of IP address. IPv4 is 32-bit, written as four denary numbers 0–255 (for example 192.168.0.1); the newer IPv6 is 128-bit, written as eight groups of hexadecimal separated by colons, giving vastly more addresses. An address is also either static 静态 (fixed, set by hand and never changing) or dynamic 动态 (handed out by the router/network each time the device connects, so it can change).

Router

A router 路由器 connects different networks together — for example, your home network to the internet. It reads the IP address in each packet and forwards it towards the right network.

Explore

Network route lab

Follow data from a device through network hardware and protocols.

Vocabulary Train
English Chinese Pinyin
network interface card 网络接口卡 wǎng luò jiē kǒu kǎ
static 静态 jìng tài
dynamic 动态 dòng tài
router 路由器 lù yóu qì
fetch-execute cycle 取指执行周期 qǔ zhǐ zhí xíng zhōu qī
media access control 介质访问控制 jiè zhì fǎng wèn kòng zhì
internet protocol 网际协议 wǎng jì xié yì
3.4

Exam tips

  • Learn the fetch–decode–execute cycle and the special registers: the program counter holds the address of the next instruction, the MAR/MDR carry the address/data, and the accumulator holds the ALU's result.
  • CPU performance improves with more cores, a larger cache, and a higher clock speed.
  • RAM is volatile (it loses its data with no power) and holds programs in use; ROM is non-volatile and read-only (the start-up instructions).
  • Match the secondary-storage types: magnetic (HDD, tape), optical (CD/DVD, read by a laser), solid state (SSD, USB, flash — no moving parts).
  • A MAC address identifies the physical device and does not normally change; an IP address is given by the network and can change.

Log in or create account

IGCSE & A-Level