Skip to content

Hardware

IGCSE Computer ScienceTopic 3

Video lesson for this topic Open the video page
11:47

The CPU

The processor in your phone is doing something almost stupidly simple. Fetch one instruction. Work out what it means. Do it. Then fetch the next one. That is…

English narration · English and 中文 subtitles you can switch

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, billions of times each second. Its role is simple to state: the CPU processes the instructions and data that are input into the computer, so that the result can be output.

A microprocessor 微处理器 is a type of integrated circuit 集成电路 on a single chip. A CPU is usually built as a microprocessor; the small computers inside washing machines and cars are microprocessors too.

Most computers follow the Von Neumann architecture 冯·诺依曼体系结构: the program's instructions and its data are stored together in the same main memory (RAM), and the CPU fetches them one at a time, along the same buses, to process them.

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).

Exam questions often ask for the fetch stage register by register. Learn this order:

  1. The address in the PC is copied to the MAR.
  2. The address is sent along the address bus to RAM, and a read signal is sent along the control bus.
  3. The instruction at that address is sent along the data bus to the MDR.
  4. The instruction is copied from the MDR to the CIR.
  5. The PC is incremented (increased by 1), so it points to the next instruction.

Then the CU decodes the instruction in the CIR, and it is executed: the CU sends signals, and the ALU does any calculation or comparison, storing the result in the ACC.

Worked example (4 marks). Describe the role of the MAR and the MDR in the fetch stage. A full answer: "The MAR holds the address of the instruction to be fetched, copied from the PC (1). This address is sent along the address bus to RAM (1). The instruction stored at that address is sent along the data bus and stored in the MDR (1). The MDR then passes the instruction to the CIR (1)." Each mark is one register and what it holds or does.

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.

Instruction sets

An instruction set 指令集 is the list of all the commands a CPU can process. The commands are machine code 机器码 (binary). Each CPU family has its own instruction set, so a program in machine code for one type of CPU will not run on a different type.

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 and is usually small and low-cost. It may use an operating system suited to its purpose. Examples: a washing machine, a microwave, a set-top box, a car's engine management, a security system, a lighting system and a vending machine.

This is different from a general purpose computer 通用计算机, such as a PC or a laptop, which can run many different programs to do many different jobs. To decide whether a device is embedded, ask: does it do one dedicated function?

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
central processing unit/ˈsentrəl ˈprəʊsesɪŋ ˈjuːnɪt/
instructions/ɪnˈstrʌkʃnz/
microprocessor/ˌmaɪkrəʊˈprəʊsesə/
integrated circuit/ˈɪntɪɡreɪtɪd ˈsɜːkɪt/
Von Neumann architecture/vɒn ˈnɔɪmən ˈɑːkɪtektʃə/
arithmetic logic unit/əˈrɪθmətɪk ˈlɒdʒɪk ˈjuːnɪt/
control unit/kənˈtrəʊl ˈjuːnɪt/
registers/ˈredʒɪstəz/
buses/ˈbʌsɪz/
address bus/əˈdres bʌs/
data bus/ˈdeɪtə bʌs/
control bus/kənˈtrəʊl bʌs/
program counter/ˈprəʊɡræm ˈkaʊntə/
memory address register/ˈmeməri əˈdres ˈredʒɪstə/
memory/ˈmeməri/
memory data register/ˈmeməri ˈdeɪtə ˈredʒɪstə/
current instruction register/ˈkʌrənt ɪnˈstrʌkʃn ˈredʒɪstə/
accumulator/əˈkjuːmjʊleɪtə/
fetch–execute cycle/fetʃ ˈeksɪkjuːt ˈsaɪkl/
fetch-execute cycle/fetʃ ˈeksɪkjuːt ˈsaɪkl/
Cache/kæʃ/
cores/kɔːz/
clock speed/klɒk spiːd/
instruction set/ɪnˈstrʌkʃn set/
machine code/məˈʃiːn kəʊd/
embedded system/emˈbedɪd ˈsɪstəm/
general purpose computer/ˈdʒenərəl ˈpɜːpəs kəmˈpjuːtə/
Watch lesson
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
2D scanner 二维扫描仪 shines light across a flat document and records the reflected light as an image
3D scanner 三维扫描仪 uses lasers or light to measure the shape of a solid object from many angles, building a 3D model
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

Sensors

A sensor is an input device that captures data from its surroundings. It measures one physical quantity and sends it to the computer, so that a system can monitor or control something without a person taking readings. Learn the data each one captures:

Sensor Data it captures When it is used
acoustic 声学 sound level a noise alarm; a sound-activated light
accelerometer 加速度计 acceleration, movement and tilt turning a phone screen; an airbag; a fitness tracker
flow 流量 how fast a liquid or gas moves through a pipe water pipes; fuel pumps; a factory line
gas 气体 the amount of a gas (such as carbon monoxide or smoke) a gas or smoke alarm; car exhaust tests
humidity 湿度 the amount of water vapour in the air a greenhouse; a museum; a weather station
infra-red infra-red radiation (body heat, or a broken beam) an intruder alarm; a TV remote; an automatic tap
level 液位 how high a liquid is in a container a water tank; a fuel tank; a drinking bowl
light 光 brightness street lights that switch on at dusk; a screen's auto-brightness
magnetic field 磁场 the strength of a magnetic field a door or window alarm; a phone's compass
moisture 水分 the amount of water in a solid, such as soil watering plants in a field or greenhouse
pH how acidic or alkaline a liquid is a fish tank; a swimming pool; soil testing
pressure 压力 force pressing on it a weighing scale; a floor mat by a door; tyre pressure
proximity 接近 how close an object is car parking sensors; a robot vacuum; a drone avoiding a tree
temperature 温度 how hot or cold something is air conditioning; an oven; a greenhouse

Two pairs are easy to mix up: humidity is water in the air, moisture is water in a solid such as soil; level measures how high a liquid is, flow measures how fast it moves.

Worked example (choosing a sensor). A farm's water bowl must refill when it is empty. Identify the most suitable sensor. The system needs to know how high the water is, so the answer is a level sensor. A pressure sensor under the bowl could also work, but "level" fits the job best. Always match the sensor to the quantity the system needs to know.

A sensor on its own only measures. In a control system, a microprocessor makes the decision and an actuator (an output device) acts. The loop repeats all the time. (Handout 6 covers automated systems in full.)

Worked example (6 marks). A train door must only close when no passenger is in the doorway. Explain how a sensor and a microprocessor are used. A strong answer, one mark per point:

  1. A proximity (or infra-red) sensor is placed by the door.
  2. The sensor continually sends readings to the microprocessor; an analogue reading is converted to digital first.
  3. The microprocessor compares the reading with a stored value (for example, an object within 20 cm).
  4. If the reading shows a person in the doorway, the door stays open (a warning may sound).
  5. If the reading shows the doorway is clear, the microprocessor sends a signal to the actuator to close the door.
  6. The process repeats continuously until the door has closed.
A loop: a temperature sensor feeds the microprocessor, which signals an actuator to open a window, cooling the greenhouse, which the sensor then measures again
The same loop drives every control question: sensor reading, compare with a stored value, signal the actuator, repeat
Explore

Device and storage lab

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

Vocabulary Train
English
barcode scanner/ˈbɑːkəʊd ˈskænə/
QR code scanner/ˌkjuː ˈɑː kəʊd ˈskænə/
optical mouse/ˈɒptɪkl maʊs/
light/laɪt/
sensors/ˈsensəz/
touch screen/tʌtʃ skriːn/
2D scanner
3D scanner
resistive/rɪˈzɪstɪv/
capacitive/kəˈpæsɪtɪv/
infrared/ˌɪnfrəˈred/
acoustic/əˈkuːstɪk/
accelerometer/əkˌseləˈrɒmɪtə/
flow/fləʊ/
gas/ɡæs/
humidity/hjuːˈmɪdɪti/
level/ˈlevl/
magnetic field/mæɡˈnetɪk fiːld/
moisture/ˈmɔɪstʃə/
pressure/ˈpreʃə/
proximity/prɒkˈsɪmɪti/
temperature/ˈtemprɪtʃə/
Watch lesson
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 screen 液晶显示屏 liquid crystals in each pixel twist to let light through or block it; a backlight (usually LEDs) shines through them
LED screen each pixel is made of tiny light-emitting diodes that give out their own light
DLP projector 数字光处理投影仪 a projector 投影仪 shines an enlarged image onto a screen; in a DLP one, millions of tiny mirrors on a chip tilt towards or away from the light to make each pixel bright or dark
LCD projector 液晶投影仪 a bright light shines through a liquid crystal panel, and a lens enlarges the image onto a 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

Describing how an output device works

A question such as “Describe how a laser printer works” is marked one point per correct step, in order, so learn each device as a short sequence.

Inkjet printer.

  1. The printer driver turns the document into data the printer can use. The data is stored in the printer's buffer 缓冲区 (a small memory), so the computer can carry on with other work.
  2. The print head moves across the paper. Its tiny nozzles 喷嘴 spray drops of ink where the image needs them. A drop is pushed out either by heating the ink, which makes a bubble (thermal bubble), or by a crystal that changes shape when a current flows (piezoelectric).
  3. A motor moves the paper up a little, and the head prints the next line, until the page is finished.

Laser printer.

  1. The data is sent through the driver and stored in the printer's buffer.
  2. A rotating drum 硒鼓 is given an electric charge. A laser beam scans across the drum and changes the charge wherever the page should be printed, leaving a pattern of the page on the drum.
  3. The drum is coated with toner 墨粉 (a fine powder), which sticks only to the charged pattern.
  4. Charged paper rolls past the drum, and the toner moves onto the paper.
  5. The paper passes through a fuser 定影器 (hot rollers), which melts the toner so it is fixed to the paper.
  6. A lamp removes the charge from the drum, ready for the next page.

3D printer. The object is designed with computer-aided design software, and the software splits it into thin horizontal layers 层. The printer then builds the object one layer at a time, for example by squeezing out melted plastic through a heated nozzle, and each layer hardens onto the one below.

Speaker. The digital sound data is changed to an analogue signal by a digital-to-analogue converter 数模转换器 (DAC) and amplified. The changing current flows through a coil next to a magnet, so the coil and the cone fixed to it move in and out, and the vibrating cone makes the sound waves.

Common mistake. Describing a laser printer as “a laser burns the image onto the paper”. The laser never touches the paper: it only changes the charge on the drum, and the image is made of toner melted on by the fuser.

Vocabulary Train
English
actuator/ˈæktʃuːeɪtə/
LCD screen/ˌel siː ˈdiː skriːn/
DLP projector/ˌdiː el ˈpiː prəˈdʒektə/
projector/prəˈdʒektə/
LCD projector/ˌel siː ˈdiː prəˈdʒektə/
inkjet printer/ɪŋkˈdʒet ˈprɪntə/
laser printer/ˈleɪzə ˈprɪntə/
speaker/ˈspiːkə/
buffer/ˈbʌfə/
nozzle/ˈnɒzl/
drum/drʌm/
toner/ˈtəʊnə/
fuser/ˈfjuːsə/
layer/ˈleɪə/
digital-to-analogue converter/ˈdɪdʒɪtl tʊ ˈænəlɒɡ kənˈvɜːtə/
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
Primary storage/ˈpraɪməri ˈstɔːrɪdʒ/
random access memory/ˈrændəm ˈækses ˈmeməri/
read only memory/riːd ˈəʊnli ˈmeməri/
volatile/ˈvɒlətaɪl/
non-volatile/nɒn ˈvɒlətaɪl/
Watch lesson
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 areas on a disk or tape 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, SD card

How each one works. Questions ask you to describe the operation of each type:

  • Magnetic — a hard disk has one or more platters 盘片 that spin. Each platter is divided into tracks 磁道 (rings) and sectors 扇区 (parts of a track). A read/write head, an electromagnet 电磁铁, moves across the platter: it magnetises tiny areas to write data and detects them to read it. Because it has moving parts, it is slower to access than solid state and can break if dropped.
  • Optical — a laser burns pits 凹坑 into the disc surface; the flat areas between them are lands 平面. To read, a laser shines on the spinning disc: lands reflect light back, pits scatter it, and the changes are read as binary. CD, DVD and Blu-ray work like this; Blu-ray uses a blue laser with a shorter wavelength, so its pits are smaller and it holds more data.
  • Solid state (flash memory) — data is stored in a grid of transistors 晶体管, using NAND or NOR technology. Each transistor has a control gate 控制栅 and a floating gate 浮栅. Electrons trapped on the floating gate store a 0 or a 1, and they stay there with the power off. There are no moving parts, so it is fast, quiet and robust.
Three panels: a hard-disk platter divided into tracks and sectors with an electromagnet head, an optical disc surface of pits and lands with a laser reflecting off a land, and a flash cell with a control gate above a floating gate holding trapped electrons
Magnetic disks store data in sectors on tracks, optical discs as pits and lands, flash memory as electrons trapped on a floating gate
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
Secondary storage/ˈsekəndəri ˈstɔːrɪdʒ/
magnetic storage/mæɡˈnetɪk ˈstɔːrɪdʒ/
optical storage/ˈɒptɪkl ˈstɔːrɪdʒ/
solid state storage/ˈsɒlɪd steɪt ˈstɔːrɪdʒ/
flash memory/flæʃ ˈmeməri/
platter/ˈplætə/
track/træk/
sector/ˈsektə/
electromagnet/ɪˌlektrəʊˈmæɡnɪt/
pit/pɪt/
land/lænd/
transistor/trænˈzɪstə/
control gate/kənˈtrəʊl ɡeɪt/
floating gate/ˈfləʊtɪŋ ɡeɪt/
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 虚拟内存.

Virtual memory is created as an area of the secondary storage. Data is moved in blocks called pages 页: a page that is not needed right now is moved out of RAM into virtual memory, which frees space in RAM for other programs. When that page is needed again, it is moved back into RAM. 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
virtual memory/ˈvɜːtʃuːəl ˈmeməri/
page/peɪdʒ/
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.
Data-centre server racks: cloud storage keeps your files on remote servers you reach over the network
Data-centre server racks: cloud storage keeps your files on remote servers you reach over the network
Vocabulary Train
English
Cloud storage/klaʊd ˈstɔːrɪdʒ/
Watch lesson
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.

A Wi-Fi router: network hardware forwards packets between devices and the wider Internet
A Wi-Fi router: network hardware forwards packets between devices and the wider Internet
Explore

Network route lab

Follow data from a device through network hardware and protocols.

Vocabulary Train
English
network interface card/ˈnetwɜːk ˈɪntəfeɪs kɑːd/
media access control/ˈmiːdiːə ˈækses kənˈtrəʊl/
internet protocol/ˈɪntənet ˈprəʊtəkɒl/
static/ˈstætɪk/
dynamic/daɪˈnæmɪk/
router/ˈruːtə/
Watch lesson
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).
  • For a "describe how the sensor and the microprocessor are used" question, write the loop: sensor sends reading → microprocessor compares with a stored value → signal to the actuator → repeats. Name the sensor that measures the right quantity (level, not flow, for a tank that empties).
  • Say Von Neumann: instructions and data share the same memory. A microprocessor is an integrated circuit on a single chip.
  • 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.

Interactive lessons on this topic

Work through it step by step, with instant-check exercises.

Past Papers

More topics in IGCSE Computer Science

Log in or create account

IGCSE, A-Level & AP