← GCSE Computer Science · Edexcel · GCSE Computer Science revision
⭐ 0
Pearson Edexcel GCSE Computer Science (1CP2) · Topic 3 Computers
Mini-Lesson

Computers

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

  1. Mission 1ENIAC took days to reprogram. Your phone swaps apps instantly. Why?
  2. Mission 2One storage firm runs 300,000+ spinning hard disks. Why not SSDs?
  3. Mission 3One CPU core, three apps at once. How is that possible?
  4. Mission 4Why could shuffling files around make an old hard drive faster?
  5. Mission 5Why write a 1999 hit game almost entirely in assembly?
  6. Mission 6Why do some languages show all your errors, and others just one?
Mission 1

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 2

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?
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?
Mission 3

One CPU core, three apps at once. How is that possible?

Make a guess: One CPU core, three apps at once. How is that possible?

Systems software · operating systems

The manager between apps and hardware

LayersUserrequestsresultsApplication softwarerequestsresultsOperating systemrequestsresultsHardware
  • The operating system (OS) is system software that manages the hardware and provides a platform for applications to run on.
  • Apps don't control the hardware themselves: they ask the OS.
  • The OS loads apps into memory, starts them and closes them.
Systems software · operating systems

Sharing the processor and memory

Time slicesCPU coreMDEMDEMDEOS switches at each dividing lineWhat you see: all three runningMusicDownloadEssay
  • Each running program is a process. One core runs one instruction at a time.
  • The OS schedules processes: each gets a short time slice on the CPU, then the OS switches to the next.
  • Switching is so fast that programs seem to run at once: multitasking.
Quick check
?On a single-core laptop you play music, download a file and type an essay. What keeps all three going?
Systems software · operating systems

Devices and files

PrintingWord processorOperating systemPrinter drivertranslates OScommands for thisprinter modelPrinter
  • The OS manages peripherals (input, output and storage devices) and the data passing between them and the processor.
  • A device driver lets the OS communicate with one particular device. It translates OS commands into ones that device understands.
  • File management: the OS organises files into folders and lets you name, save, move, copy and delete them.
Systems software · operating systems

Interface, users and security

  • User management: the OS creates user accounts, checks logins and gives each account access rights to particular files and programs.
Quick check
?A new printer is detected, but every page comes out as strange symbols. Which software most likely needs installing or updating?
Mission check

?One CPU core, three apps at once. How is that possible?
Mission 4

Why could shuffling files around make an old hard drive faster?

Make a guess: Why could shuffling files around make an old hard drive faster?

Systems software · utility software

Housekeeping software

  • Utility software is system software that helps to maintain, protect or configure a computer.
  • It carries out housekeeping tasks that the operating system may not do, or may not do well enough, on its own.
  • Some utilities come with the OS; others are installed separately.
  • Examples: file repair, backup, data compression, disk defragmentation and anti-malware software.
Systems software · utility software

Fragmented files

Defragmentationmagnetic hard diskBeforeread/write head jumpsA1A2B3456A78B9B1011A121314B1516AfterA1A2A3A4B5B6B7B8910111213141516File AFile Bfree
  • A magnetic hard disk stores files in blocks. The read/write head moves to each block to read it.
  • As files are saved and deleted, free space becomes scattered gaps, so new files get split up: they are fragmented.
  • Reading a fragmented file needs many slow head movements.
  • A disk defragmenter moves each file's pieces next to each other (contiguous) and groups the free space together, so files load faster.
Quick check
?Ali's new laptop has a solid state drive (SSD). Is it worth running a defragmenter on it?
Systems software · utility software

Backup, compression and encryption

Utility softwareBackuporiginal stayscopyexternal drivecloudCompressionfewer bytesEncryptionMeet at 3q#8Vz!2Lm
  • Backup software copies files to another device or the cloud, so they can be restored if lost or damaged.
  • Compression software makes files smaller, so they use less storage space and transfer faster.
Systems software · utility software

Protecting and repairing files

  • Anti-malware software scans files and memory for malware, comparing them with known malware signatures and watching for suspicious behaviour. It quarantines or deletes what it finds.
  • File repair tools fix damaged or corrupted files so they can be opened again.
Quick check
?Mia's folder of reports and spreadsheets is 45 MB, but her email allows attachments up to 20 MB. Which utility helps most?
Mission check

?Why could shuffling files around make an old hard drive faster?
Mission 5

Why write a 1999 hit game almost entirely in assembly?

Make a guess: Why write a 1999 hit game almost entirely in assembly?

Languages · levels of programming language

What the processor actually runs

Machine codeopcodeoperand000101000011010100100110CPUillustrative 8-bit instruction set(not a real processor)
  • A CPU can only execute machine code: instructions in binary.
  • Each instruction is a simple step, such as load a value, add, store a result or jump.
  • Each processor family has its own instruction set, so machine code for one family won't run on another.
  • Machine code and assembly language are low-level languages: they work directly with the processor's own instructions.
Languages · levels of programming language

Assembly language

Assembly to machine codeAssemblyMachine codeLDA price00010100ADD tax00110101STA total00100110assembler
  • Assembly language replaces binary with short mnemonics such as LDA (load), ADD and STA (store).
  • Each assembly instruction matches exactly one machine code instruction: a 1:1 correspondence.
  • Like machine code, it is specific to one processor family.
Assembly language (illustrative)
LDA price    ; load price into the processor
ADD tax      ; add tax to it
STA total    ; store the result in total
Languages · levels of programming language

High-level languages

  • High-level languages use English-like keywords and maths-style expressions.
  • One statement often becomes several machine code instructions: the line below becomes the three assembly instructions you just met.
  • They are machine independent: the same source code can be translated to run on different processor families.
  • A compiler or interpreter must translate the code before the CPU can run it.
  • Most programs are high-level: they are quicker to write, read and debug.
Python
total = price + tax
Quick check
?A programmer writes the line STA total. What kind of code is this?
Calculate
?An assembly program has these 3 lines: LDA price, ADD tax, STA total. How many machine code instructions will it become?
Languages · levels of programming language

Choosing a level

Levels of languageeasier for humanscloser to the hardwareHigh-leveltotal = price + taxAssemblyLDA price ADD tax STA totalMachine code0001 0100 0011 01010010 0110low-level
High-levelLow-level
Reading and writingeasier: English-likeharder: mnemonics or binary
Debuggingeasier to find and fix errorsharder
Portabilitymachine independentworks on one processor family
Hardware controlindirect, through the OSdirect control of registers and memory
Speed and memorytranslated code may be less efficientcan be very fast and compact
  • Use low-level for device drivers, embedded systems and code where speed or memory is critical.
  • Use high-level for most applications, where quick development matters more.
Quick check
?A smart thermostat has a tiny chip with very little memory, and its program must control a temperature sensor directly. Which level of language suits it best?
Mission check

?Why write a 1999 hit game almost entirely in assembly?
Mission 6

Why do some languages show all your errors, and others just one?

Make a guess: Why do some languages show all your errors, and others just one?

Languages · translators

Why translate?

TranslatorsSource codeTranslator0110 10111001 0010Machine codeCPUHigh-levelCompilerHigh-levelInterpreterAssemblyAssembler
  • The CPU can only execute machine code, so the source code that programmers write must be translated first.
  • A translator is a program that converts source code into a form the CPU can execute.
  • High-level code is translated by a compiler or an interpreter.
Languages · translators

Compiler or interpreter?

Compiler and interpreterCompiler8 linestranslateEXEexecutablerunInterpreterline 1translaterunline 2translaterunline 3translaterun… and so on, one line at a time, to line 8
  • A compiler translates the whole program before it runs, producing an executable file of machine code that runs without the compiler.
  • An interpreter translates one line at a time into machine code and runs it. It is needed every time the program runs.
  • Errors: a compiler gives an error report for the whole program; an interpreter stops at the first error.
Quick check
?An 8-line program has errors on lines 4 and 7. What happens when you run it with an interpreter?
Languages · translators

Choosing a translator

When each is usedInterpreterwhile developingeditrunfixCompilerfor releasereleaseEXEusers
CompilerInterpreter
Translatesthe whole program, before it runsone line at a time, as it runs
Producesan executable fileno executable file
Running speedfast: already translatedslower: translated again every run
Finding errorsreport after translating everythingstops at the error, easy to see where
After a changemust recompile the whole programjust run it again
Sharingsend the executable; source stays privateusers need the source and an interpreter
  • An interpreter is mostly used while developing and testing a program; a compiler translates the final program for release.
Quick check
?A games studio is ready to release its finished game and doesn't want players to see its source code. Which translator should it use?
Mission check

?Why do some languages show all your errors, and others just one?
Recap

Big ideas

  • 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.
  • 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.
  • The OS is system software that manages the hardware and gives applications a platform to run on.
  • It shares the processor between processes (multitasking) by scheduling short time slices, and manages peripherals using device drivers.
  • It also manages files and user accounts.
  • Utility software is system software that does housekeeping tasks to maintain, protect or configure the computer.
  • A defragmenter makes files contiguous on a magnetic hard disk so they load faster; it isn't needed on an SSD.
  • Backup, compression, file repair and anti-malware tools each protect, shrink or fix your files.
  • The CPU only runs machine code (binary); assembly uses mnemonics with a 1:1 match to machine code. Both are low-level and tied to one processor family.
  • High-level languages are easier to write, read and debug and are machine independent, but must be translated.
  • Low-level suits device drivers, embedded systems and speed-critical code; high-level suits most applications.
  • Source code must be translated before the CPU can run it: a compiler translates the whole program into an executable; an interpreter translates and runs it line by line.
  • Interpreters suit development and testing; compilers suit the final program.
🏆

Mini-lesson complete!

⭐⭐⭐

You've worked through Computers for Pearson Edexcel GCSE Computer Science (1CP2). 🎉

  1. Mission 1ENIAC took days to reprogram. Your phone swaps apps instantly. Why?
  2. Mission 2One storage firm runs 300,000+ spinning hard disks. Why not SSDs?
  3. Mission 3One CPU core, three apps at once. How is that possible?
  4. Mission 4Why could shuffling files around make an old hard drive faster?
  5. Mission 5Why write a 1999 hit game almost entirely in assembly?
  6. Mission 6Why do some languages show all your errors, and others just one?

Your stars: 0 / 0

Next: test yourself in the Verify stage.

📣 Smashed it? Share your score

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

→ Back to GCSE Computer Science · Edexcel

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

Sources (11)

The specification points and sources behind this lesson.

  1. 1 Pearson Edexcel GCSE 1CP2 spec, 3.1.1 and 3.1.3
  2. 2 Pearson Edexcel GCSE 1CP2 spec, 3.1.2
  3. 3 Edexcel 1CP2 spec, 3.2.1
  4. 4 Edexcel 1CP2 spec, 3.2.2
  5. 5 Edexcel 1CP2 spec, 3.3.1
  6. 6 Edexcel 1CP2 spec, 3.3.2
  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
  9. 9 Chris Sawyer (the game's creator), official site: FAQ "Chris Sawyer Software Development", Q "What language was RollerCoaster Tycoon programmed in?" ("99% written in x86 assembler/machine code … with a small amount of C code used to interface to MS Windows and DirectX"), https://chrissawyergames.com/faq3.htm; release "early in 1999": https://chrissawyergames.com/info.htm
  10. 10 Atari (publisher of the RollerCoaster Tycoon series), "Interview with RollerCoaster Tycoon's creator Chris Sawyer", Atari's own Medium publication Atari Club, Carly Francis, 27 March 2024; Sawyer's own answer to "Why did you write RollerCoaster Tycoon in assembly language … rather than a high level language like C?", https://medium.com/atari-club/interview-with-rollercoaster-tycoons-creator-chris-sawyer-684a0efb0f13
  11. 11 PCGamesN, "RollerCoaster Tycoon: the best-optimised game of all time?", https://www.pcgamesn.com/rollercoaster-tycoon/code-chris-sawyer