← International GCSE Computer Science · Edexcel · GCSE Computer Science revision
⭐ 0
Pearson Edexcel International GCSE Computer Science (4CP0) · 4.1–4.2 Computers: hardware and models
Mini-Lesson

Computers: hardware and models

5 missions. Guess, learn, then check. Your place is saved.

  1. Mission 1Jams appear with no crash. How can a computer predict one?
  2. Mission 2ENIAC took days to reprogram. Your phone swaps apps instantly. Why?
  3. Mission 3Double the cores. Why isn't the computer twice as fast?
  4. Mission 4Pull the plug and unsaved work is gone. So how does it boot?
  5. Mission 5One storage firm runs 300,000+ spinning hard disks. Why not SSDs?
Mission 1

Jams appear with no crash. How can a computer predict one?

Make a guess: Jams appear with no crash. How can a computer predict one?

Computers · machines and computational modelling

The input–process–output model

IPO: a sat navInputGPS positiondestinationtyped inProcesscalculate thefastest routeOutputmap on screenspokendirections
  • Any computer system can be described with the input–process–output (IPO) model.
  • Input: data going into the system, from a keyboard, a sensor or a file.
  • Process: the computer carries out operations on the data, such as calculating, comparing or sorting.
  • Output: the results, shown on a screen, printed, played as sound, or sent as a signal to a device.
Quick check
?A traffic program reads the number of cars per minute and the speed limit, calculates where each car will be every second, and shows a map of predicted jams. Which part is the process?
Computers · machines and computational modelling

Sequential and parallel models

Sequential and parallelSequential, 1 coreTask 1Task 2Task 3Task 4Core 1Parallel, 4 coresCore 1Task 1Core 2Task 2Core 3Task 3Core 4Task 4Task 5: needs results of 1–4about a quarter of the timetime
  • Sequential: instructions are carried out one after another, in order. Each step starts only when the one before has finished.
  • Parallel: a task is split into parts that are carried out at the same time on several processors or cores.
  • Parallel is faster only when the task can be split into independent parts. A part needing an earlier result must still wait, and sharing out work adds overhead.
Calculate
?An animation has 120 frames. Rendering one frame takes 2 s on one core, and the frames do not depend on each other. The frames are shared equally between 4 cores working in parallel. What is the shortest possible time to render all the frames?
s
Computers · machines and computational modelling

Multi-agent models

A multi-agent traffic modelcars move clockwisejam driftsbackwardsjam: nobody planned iteach car = anagentkeep a safe gap;brake if the gapshrinks; speed upif the gap grows
  • In a multi-agent model, many independent agents act at the same time. Each follows its own rules and reacts to the agents around it.
  • An agent can be a program, a robot in a swarm, or a simulated car, bird or person.
  • No single agent is in charge. The overall pattern, such as a traffic jam, a flock or a crowd, comes from the agents' interactions.
Computers · machines and computational modelling

Simulation and modelling software

  • A model is a simplified representation of part of the real world, built from variables and rules (an abstraction).
  • A simulation runs the model over time. Change the inputs to ask "what if?".
UsesBenefitsLimitations
Weather forecastingSafer than real testsOnly as accurate as its rules and data
Flight simulatorsCheaper than real testsSimplifications leave out real details
Traffic and road planningCan run faster (or slower) than real timeComplex models need a lot of processing power
Spread of disease; building evacuationsMany "what if" runs can be triedResults still need checking against reality
Quick check
?A weather centre splits the atmosphere into thousands of regions and calculates them all at the same moment on thousands of processors. Which computational model is this?
Quick check
?A council's simulation said a new junction would not cause jams, but it does. What is the most likely reason?
Mission check

?Jams appear with no crash. How can a computer predict one?
Mission 2

ENIAC took days to reprogram. Your phone swaps apps instantly. Why?

Make a guess: ENIAC took days to reprogram. Your phone swaps apps instantly. Why?

Hardware · the CPU

Programs live in memory

A stored programinputCPUaddressmain memory0LOAD 61ADD 72STORE 63OUTPUT 64STOP5615727copied in, one at atimeoutputprograms loadedfrom heresecondary storageinstructiondataExample instructions, not any real assembly language.
  • A program is a list of instructions in binary (machine code), processed by the CPU.
  • A running program's instructions and data are both held in main memory (RAM). This is the stored program concept (the Von Neumann model).
  • New program? Load new instructions into memory. Nothing is rewired.
  • Input devices send data in; output devices present results; secondary storage keeps programs when they are not running.
Hardware · the CPU

Inside the CPU

Inside the CPUCPUControl unit(CU)ALUregistersclockMainmemoryaddressdatacontrol
ComponentWhat it does
Control unit (CU)Decodes instructions and sends control signals to coordinate the other parts
Arithmetic logic unit (ALU)Carries out calculations and logical operations, such as comparisons
RegistersTiny, very fast memory locations inside the CPU that hold the instruction, data or address in use right now
ClockSends regular electrical pulses that keep every part in step
  • Main memory is outside the CPU. The CPU must copy instructions and data from it before using them.
Hardware · the CPU

Buses

Inside the CPUCPUControl unit(CU)ALUregistersclockMainmemoryaddressdatacontrol
  • A bus is a set of parallel wires carrying signals between the CPU, main memory and other components.
  • The address bus carries memory addresses from the CPU to memory. It only goes one way.
  • The data bus carries data and instructions between the CPU and memory, in both directions.
  • The control bus carries control signals, such as "read" or "write" and clock pulses, to coordinate components.
Hardware · the CPU

The cycle that never stops

fetch–decode–execute cyclefetch–decode–execute cycleFetchDecodeExecuteeach step timed by clock pulsesFetch in detailCPUMainmemoryaddress (address bus)instruction (data bus)
  • Kept in step by the clock, the CPU repeats this cycle billions of times a second: the fetch–decode–execute (FDE) cycle.
StageWhat happens
FetchThe next instruction is copied from main memory into the CPU
DecodeThe control unit works out what the instruction means
ExecuteThe instruction is carried out: the ALU may do a calculation, or data may be read from or written to main memory
  • During fetch, the instruction's address goes out on the address bus and the instruction comes back on the data bus.
Quick check
?An instruction says "add the number stored at address 12 to the total". In which stage is the number at address 12 read from memory?
Quick check
?During fetch, which bus carries the location in memory that the CPU wants to read?
Hardware · the CPU

Embedded systems

  • An embedded system is a computer built into a larger device to do one dedicated job.
  • Examples: washing machine, microwave, thermostat, car engine management, traffic lights, vending machine.
  • Usually small, cheap, low power and reliable. Its program is stored permanently, often in ROM.
  • A general-purpose computer, such as a PC or laptop, runs many different programs.
Quick check
?Which of these is not an embedded system?
Mission check

?ENIAC took days to reprogram. Why can your phone swap apps instantly?
Mission 3

Double the cores. Why isn't the computer twice as fast?

Make a guess: Double the cores. Why isn't the computer twice as fast?

Hardware · CPU performance

Clock speed

Clock speed1 GHz1 cycle3 GHz1 cycle1 cycle1 cycle1 nanosecond
  • The clock sends out regular electrical pulses that keep the CPU's parts in step.
  • Clock speed is the number of clock cycles per second, measured in hertz (Hz).
  • 1 GHz = 1,000,000,000 cycles per second, so 3.5 GHz is 3.5 billion.
  • Higher clock speed: more fetch–decode–execute cycles each second, so more instructions are processed.
Calculate
?A CPU has a clock speed of 2.8 GHz. How many clock cycles does it complete each second?

cycles per second

Hardware · CPU performance

Cores

Two kinds of taskTask ATask BCore 1Core 2Core 3Core 4finishedCore 1Core 2idleCore 3idleCore 4idletimeTwo kinds of task
  • A core is a complete processing unit. Each core can fetch, decode and execute instructions on its own.
  • A dual-core CPU can process two instructions at the same time; a quad-core CPU, four.
  • Doubling the cores rarely doubles the speed: some tasks cannot be split, and one core may wait for another's result.
  • Software must be written to use several cores.
Hardware · CPU performance

Cache

Memory distanceCPUregisterscacheRAMSecondarystoragefasterslower: further to fetch
  • Cache is a small amount of very fast memory on or very near the CPU.
  • It holds frequently used instructions and data, saving slower trips to RAM.
  • A larger cache holds more, so the CPU waits less. But cache is expensive, so it stays small.
  • Cache has levels: L1 (smallest, fastest), then L2, then L3 (largest and slowest, but still faster than RAM).
Quick check
?Sam's CPU often waits for data from RAM. The same small set of instructions is used again and again. Which upgrade is most likely to help?
Quick check
?A game only ever uses one core. Which CPU will run it fastest, if everything else is the same?
Mission check

?Double the cores. Why isn't the computer twice as fast?
Mission 4

Pull the plug and unsaved work is gone. So how does it boot?

Make a guess: Pull the plug and unsaved work is gone. So how does it boot?

Hardware · primary memory

Primary storage

Memory hierarchyRegistersCacheRAMROMSecondary storagemainmemory /primarystoragebelow the line: not directly accessed by the CPUfaster,smaller,more costlyper byte
  • Primary storage (main memory) is memory the CPU can access directly.
  • It holds the instructions and data the CPU is using now. Secondary storage is too slow for the CPU to work from directly.
  • Main memory is made up of RAM and ROM.
Hardware · primary memory

RAM

  • RAM (random access memory) holds the operating system, the programs that are open and the data they are using.
  • The CPU can read and write RAM, so its contents change all the time.
  • RAM is volatile: its contents are lost when the power is switched off. That is why unsaved work disappears.
  • More RAM lets more programs and data be open at once without slowing down.
Hardware · primary memory

ROM

RAM and ROM in a power cut1 Power onRAMOS, essay.docROMstart-upinstructions2 Power offRAM(empty)ROMstart-upinstructions3 Power on againRAMOSROMstart-upinstructionsROM loads the OS from storage
  • ROM (read-only memory) is non-volatile: it keeps its contents with the power off.
  • It can only be read. Its contents cannot normally be changed.
  • ROM holds the start-up instructions (the BIOS or boot program). They load the operating system from secondary storage into RAM.
RAMROM
Keeps data with power off?No (volatile)Yes (non-volatile)
Can be changed?Read and writeRead only
HoldsOperating system, open programs and data in useStart-up instructions
SizeGigabytesSmall
Quick check
?A washing machine's wash programs must never be lost and must not be changed by the user. Where should they be stored?
Hardware · primary memory

Registers and cache

Memory hierarchyRegistersCacheRAMROMSecondary storagemainmemory /primarystoragebelow the line: not directly accessed by the CPUfaster,smaller,more costlyper byte
  • Registers are tiny memory locations inside the CPU holding the instruction, data or address in use right now.
  • Cache is small, very fast memory on or near the CPU. It holds copies of frequently used instructions and data, so fewer slow trips to RAM are needed.
  • Both are volatile. The faster the memory, the more it costs per byte, so fast memory is kept small.
Hardware · primary memory

Virtual memory

Virtual memoryRAM: 8 page slots, all fullAABBCCDDApp E opensB’s pages move out; E loads into the freedslotsAAEECCDDvirtualmemoryBBpage outpage swapped back in when B is selectedvirtual memory is on secondary storage: slow
  • When RAM is full, the operating system uses part of secondary storage as virtual memory.
  • Data and programs not needed right now are moved out of RAM to virtual memory in blocks called pages, freeing space.
  • When they are needed again, pages are swapped back into RAM.
  • Secondary storage is much slower than RAM, so heavy swapping slows the computer down. Adding more RAM is the fix.
Quick check
?A computer has many apps open and becomes very slow when switching between them. What is the most likely cause?
Your answer
?What word describes memory that loses its contents when the power is switched off?
Mission check

?Pull the plug and unsaved work is gone. So how does it boot?
Mission 5

One storage firm runs 300,000+ spinning hard disks. Why not SSDs?

Make a guess: One storage firm runs 300,000+ spinning hard disks. Why not SSDs?

Hardware · secondary storage

Why secondary storage?

  • Secondary storage is non-volatile: it keeps the operating system, programs and files with the power off.
  • It holds far more than RAM, for much less money per gigabyte.
  • The CPU does not access it directly. Programs and data are copied into RAM (main memory) first.
  • To choose a device, compare its capacity, speed, portability, durability, reliability and cost.
Hardware · secondary storage

Magnetic storage

Hard disk driveInside a hard diskread/write headplattersspindlearmThe head floats just above the platter: it never touches it.Top viewtracksectorMagnetised regions: one direction = 1, the other = 010110010
  • A hard disk drive (HDD) stores data on spinning magnetic platters.
  • Platters are divided into circular tracks, split into sectors.
  • A moving read/write head uses an electromagnet to magnetise tiny areas (one way for 1, the other for 0) and to read them.
  • Moving parts: slower, and easily damaged if dropped. But huge and cheap per gigabyte.
Hardware · secondary storage

Solid-state storage

Solid-state storageFlash memory cellsSSDSD cardUSB driveflash memory: no moving parts
  • Solid-state storage uses flash memory: electrical circuits that keep data with the power off. No moving parts.
  • Examples: SSD (solid-state drive), SD card, USB flash drive.
  • Fast, light, low power and robust. But it costs more per gigabyte, and cells wear out after many rewrites.
Hardware · secondary storage

Optical storage

Optical storageDisc surface (side view)landpitlasersensorland: light reflects back to thesensorpit edge: lightscattersCapacity (to scale)CD0.7 GBDVD4.7 GBBlu-ray25 GB
  • A laser reads the surface of a spinning disc. Pits and lands reflect the light differently, giving 1s and 0s.
  • To write, a laser changes the surface of a recordable disc.
  • Examples: CD (about 700 MB), DVD (4.7 GB), Blu-ray (25 GB per layer).
  • Cheap and light to post, but low capacity, slow and easily scratched. Downloads and flash drives have largely replaced it.
Calculate
?A 4,000 GB hard disk costs £80. A 2,000 GB SSD costs £120. How many times more does the SSD cost per gigabyte?
Hardware · secondary storage

Cloud storage

Cloud storagephonelaptoptabletinternetdata centre(remote location)HDD and SSD
  • Cloud storage keeps your files on servers at a remote location, reached over the internet. The servers use magnetic and/or solid-state storage.
  • Advantages: access from any device, anywhere; easy sharing; the provider handles backups and maintenance; buy more space when needed.
  • Disadvantages: no internet, no access; slow connections mean slow transfers; ongoing fees; you rely on the provider to keep data secure and private.
Quick check
?A school is choosing between cloud storage and its own local file server. Which is a disadvantage of the cloud?
Quick check
?A travel photographer copies 60 GB of photos a day to a small device kept loose in a rucksack. Which is the best choice?
Mission check

?One storage firm runs 300,000+ spinning hard disks. Why not SSDs?
Recap

Big ideas

  • Every system can be described as input, process, output.
  • Computational models can be sequential (one step at a time), parallel (parts at the same time) or multi-agent (many independent agents interacting).
  • Simulation software runs a simplified model of the real world to test "what if?" safely and cheaply; it is only as good as its rules and data.
  • Instructions and data are both stored in main memory; the CPU fetches, decodes and executes them, one after another, kept in step by the clock.
  • The address bus carries addresses, the data bus carries data and instructions, the control bus carries control signals.
  • An embedded system is a computer inside a larger device that does one dedicated job.
  • Higher clock speed means more cycles, and so more instructions, every second.
  • More cores help only when the work can be split; a larger cache means fewer slow trips to RAM.
  • RAM is volatile and holds what is in use now; ROM is non-volatile and holds the start-up instructions.
  • Registers and cache are small, fast, volatile memory close to the CPU.
  • When RAM is full, virtual memory on secondary storage takes the overflow, but swapping is slow.
  • Secondary storage is non-volatile and keeps data for the long term; choose it by capacity, speed, portability, durability, reliability and cost.
  • Magnetic: huge and cheap per gigabyte, but moving parts. Solid state: fast and robust, but dearer per gigabyte.
  • Optical discs are read by a laser (pits and lands): cheap but low capacity.
  • Cloud storage is on remote servers: access anywhere, but only with an internet connection.
🏆

Mini-lesson complete!

⭐⭐⭐

You've worked through Computers: hardware and models for Pearson Edexcel International GCSE Computer Science (4CP0). 🎉

  1. Mission 1Jams appear with no crash. How can a computer predict one?
  2. Mission 2ENIAC took days to reprogram. Your phone swaps apps instantly. Why?
  3. Mission 3Double the cores. Why isn't the computer twice as fast?
  4. Mission 4Pull the plug and unsaved work is gone. So how does it boot?
  5. Mission 5One storage firm runs 300,000+ spinning hard disks. Why not SSDs?

Your stars: 0 / 0

Next: more International GCSE Computer Science · Edexcel lessons and games on the International GCSE Computer Science · Edexcel page.

📣 Smashed it? Share your score

Challenge a mate to beat your stars, or show a parent how you got on.

→ Back to International GCSE Computer Science · Edexcel

Specification points and sources for this lesson are listed at the bottom of the page.

Sources (8)

The specification points and sources behind this lesson.

  1. 1 Pearson Edexcel International GCSE Computer Science 4CP0 spec (Issue 1), 4.1.1, 4.1.2, 4.4.3, pp. 15–16
  2. 2 Pearson Edexcel International GCSE 4CP0 spec, 4.2.1, 4.2.3, 4.2.7
  3. 3 Pearson Edexcel International GCSE 4CP0 spec, 4.2.4
  4. 4 Pearson Edexcel International GCSE 4CP0 spec, 4.2.2
  5. 5 Pearson Edexcel International GCSE 4CP0 spec, 4.2.5, 4.2.6
  6. 6 ScienceDaily / Institute of Physics, "Traffic jams without bottlenecks", 5 Mar 2008, https://www.sciencedaily.com/releases/2008/03/080304075707.htm; paper: Sugiyama et al., New J. Phys. 10, 033001 (2008), https://ir.library.osaka-u.ac.jp/repo/ouka/all/93262/
  7. 7 PBS, A Science Odyssey, "ENIAC is built 1945": https://www.pbs.org/wgbh/aso/databank/entries/dt45en.html
  8. 8 Backblaze, "Backblaze Publishes 2025 Drive Stats Report" (press release, 2026): https://ir.backblaze.com/news/news-details/2026/Backblaze-Publishes-2025-Drive-Stats-Report-13-Years-of-Data-Show-a-Growing-Healthier-Drive-Fleet/default.aspx