← Back to CS Hub
Topic 3 — Paper 1

Computer Systems

CPU, storage, operating systems, languages & logic gates — understand how computers work.

0
Activities
0
Correct
0
Streak

📖 Core Theory

Key definitions, concepts, and terminology for Topic 3

💻
CPU Components
CPU
The Central Processing Unit that fetches, decodes and executes instructions.
ALU
Arithmetic Logic Unit — performs calculations and logical comparisons.
CU
Control Unit — manages the fetch-decode-execute cycle, directs data flow.
MAR
Memory Address Register — holds the address of the memory location to be read/written.
MDR
Memory Data Register — holds the data that has been fetched or is to be stored.
ACC
Accumulator — stores the results of calculations from the ALU.
PC
Program Counter — holds the address of the next instruction to be executed.
Cache
Small, fast memory inside the CPU that stores frequently used data.
Key Point

The FDE cycle: 1) Fetch instruction from RAM (address in PC → MAR, instruction → MDR), 2) Decode (CU interprets instruction), 3) Execute (ALU performs operation, result → ACC)

💾
Memory & Storage
RAM
Random Access Memory — volatile, fast, stores running programs and data.
ROM
Read Only Memory — non-volatile, stores the boot-up instructions (BIOS/firmware).
HDD
Hard Disk Drive — magnetic storage, large capacity, moving parts, slower.
SSD
Solid State Drive — flash memory, fast, no moving parts, more expensive.
Optical
CD/DVD/Blu-ray — uses laser to read/write, portable, lower capacity.
Key Point

Von Neumann architecture: Instructions and data are stored in the same memory, accessed via a shared bus.

⚙️
Systems & Software
Embedded System
A computer built into a larger device for a specific purpose (e.g., washing machine, traffic lights).
Operating System
Software that manages hardware and provides a user interface.
Utility Software
Programs that maintain/optimise the system (e.g., defragmenter, antivirus).
📝
Languages & Translators
Compiler
Translates all source code into machine code before execution.
Interpreter
Translates and executes source code one line at a time.
Assembler
Translates assembly language into machine code.
🔌
Logic Gates
AND gate
Output is 1 only when BOTH inputs are 1.
OR gate
Output is 1 when AT LEAST ONE input is 1.
NOT gate
Output is the opposite of the input (inverts it).
XOR gate
Output is 1 when inputs are DIFFERENT.
🌍
Real-World Examples & Analogies
CPU as a Kitchen Analogy 🍳

Imagine the CPU is like a kitchen chef preparing a meal:

  • CU (Control Unit) = The recipe instructions — tells the chef what to do and in what order.
  • ALU (Arithmetic Logic Unit) = The actual cooking, chopping and mixing — where the real work happens.
  • Registers = The counter space — tiny area for ingredients being used right now.
  • Cache = The spice rack — small but super fast to grab frequently used items.
  • RAM = The fridge — bigger storage, quick to access, but loses contents when the power is off (volatile).
  • HDD / SSD = The freezer / pantry — large, persistent storage but slower to access.
Why This Matters

This analogy maps directly to the memory hierarchy. From registers (fastest, smallest) down to secondary storage (slowest, largest) — exam questions often ask you to compare speed, capacity, and volatility.

FDE Cycle as Online Shopping 🛒

Think of the Fetch-Decode-Execute cycle like online shopping:

FETCH: You look up the address (PC) of the next item on your shopping list, go to that address (MAR), and bring the item back (MDR).

DECODE: You read the product label to work out what it is and what to do with it (CU decodes the instruction).

EXECUTE: You actually use the product — put it on, eat it, etc. (ALU performs the calculation or data is moved).

PC + 1: The PC then moves to the next item on the list (PC increments by 1).

Storage Analogy 💾
  • RAM is like a whiteboard — fast to write and erase but wiped clean when you leave (volatile).
  • ROM is like a tattoo — permanent, can’t be easily changed (non-volatile, read-only).
  • HDD is like a record player — a spinning disc with a needle reading data (mechanical, slower).
  • SSD is like a USB stick — no moving parts, faster, more durable but more expensive.
Compiler vs Interpreter as Translation 🌐
  • A compiler is like translating an entire book from French to English before reading it — takes time upfront, but once done you can read it quickly over and over.
  • An interpreter is like having a translator sitting next to you, translating one sentence at a time as you go — you can start reading immediately but it’s slower overall.
  • An assembler is like a simple word-for-word dictionary lookup — each assembly instruction maps directly to one machine code instruction.
📚
Deep Dive
FDE Cycle — Detailed Steps

FETCH:

  1. The address in the PC is copied to the MAR.
  2. The address is sent along the address bus to RAM.
  3. The instruction stored at that address is returned via the data bus and placed in the MDR.
  4. The instruction is copied from the MDR to the CIR (Current Instruction Register).
  5. The PC is incremented by 1 (PC + 1) so it points to the next instruction.

DECODE:

  • The CU decodes the instruction held in the CIR.
  • It determines what operation needs to be performed and what data is needed.

EXECUTE:

  • The instruction is carried out — this might involve the ALU performing a calculation, data being read/written to memory, or a result being stored in the ACC.
  • The cycle then repeats from the FETCH stage.
Walkthrough — FDE with ADD Instruction

Starting state: PC holds address 0005 (the next instruction location).

1. FETCH:

  • Address 0005 is copied from the PC to the MAR.
  • The CPU fetches the instruction stored at address 0005 in RAM.
  • The instruction is placed in the MDR, then copied to the CIR.
  • The PC increments to 0006.

2. DECODE:

  • The CU reads the instruction from the CIR.
  • It’s ADD 14 — “add the value at address 14 to the accumulator.”

3. EXECUTE:

  • The MAR is set to 14.
  • The value at address 14 (say, 7) is fetched into the MDR.
  • The ALU adds 7 to the accumulator. If the ACC was 3, it is now 10.
Primary vs Secondary Storage
FeaturePrimary StorageSecondary Storage
ExamplesRAM, ROM, CacheHDD, SSD, Optical, USB
VolatilityRAM is volatile; ROM is non-volatileNon-volatile
SpeedVery fastSlower (SSD faster than HDD)
CapacitySmall (GBs)Large (TBs)
PurposeStores running programs & dataLong-term file storage
Cost per GBExpensiveCheaper
Worked Example — Choosing Storage

Scenario: A school needs to store 500 GB of student records that must be kept for 7 years.

  • HDD: ✓ Cheap at this capacity • ✓ 500 GB easily available • ✗ Mechanical parts can fail over time
  • SSD: ✓ Faster access • ✓ More reliable (no moving parts) • ✗ More expensive per GB
  • Optical (DVD): ✗ Would need ~107 DVDs (4.7 GB each) — not practical for this volume

Best choice: SSD for reliability over 7 years, or HDD if budget is limited.

Compiler vs Interpreter
FeatureCompilerInterpreter
TranslationTranslates all code at onceTranslates one line at a time
ExecutableCreates a standalone .exe fileNo executable produced
Execution speedFaster (already compiled)Slower (translates each time)
Error reportingAll errors after full analysisStops at first error found
DebuggingHarder — errors reported togetherEasier — stops at the error line
Use caseDistributing finished softwareTesting / development
Exam Quick-Reference

Compiler: Translates ALL at once → Creates executable file → Faster to run after compilation → Errors shown after full translation → Used for finished software (C++, Java)

Interpreter: Translates ONE LINE at a time → No executable file created → Slower to run (translates every time) → Stops at first error (easier to debug) → Used for development/testing (Python)

Assembler: Translates assembly language (low-level) into machine code — one-to-one mapping between instructions.

Logic Gate Truth Tables

AND Gate

ABQ
000
010
100
111

OR Gate

ABQ
000
011
101
111

NOT Gate

AQ
01
10

XOR Gate

ABQ
000
011
101
110
Walkthrough — Combined Logic Circuit

Given inputs A = 1 and B = 0:

  • A AND B = 1 AND 0 = 0
  • NOT B = NOT 0 = 1
  • (A AND B) OR (NOT B) = 0 OR 1 = 1

Exam tip: Always work through each gate left-to-right, writing down intermediate values. Never try to do it all in your head — show your working!

Key Exam Tips for Topic 3
  • “State” questions need a one-word or short-phrase answer — don’t over-explain.
  • “Describe” = say what it is + what it does (two parts).
  • “Explain” = describe + say WHY or HOW (add reasoning).
  • For FDE questions, always mention specific register names (PC, MAR, MDR, ACC) — generic answers lose marks.
  • Logic gate questions: draw truth tables systematically — don’t skip rows. List all input combinations (00, 01, 10, 11).

🔍 Explore & Visualise

Step through the FDE cycle, build truth tables, and compare storage

⚙️
FDE Cycle Step-Through

Walk through the Fetch-Decode-Execute cycle step by step. Watch how the registers change at each stage.

1 FETCH: PC → MAR
The address held in the Program Counter (PC) is copied to the Memory Address Register (MAR).
2 FETCH: RAM → MDR
The address is sent to RAM via the address bus. The instruction stored at that address is returned via the data bus and placed in the MDR.
3 FETCH: MDR → CIR, PC+1
The instruction is copied from the MDR to the CIR (Current Instruction Register). The PC is incremented by 1 to point to the next instruction.
4 DECODE
The Control Unit (CU) decodes the instruction held in the CIR, determining the operation and data needed.
5 EXECUTE
The ALU executes the instruction (e.g., performs a calculation). The result is stored in the Accumulator (ACC).
PC
0042
MAR
----
MDR
----
CIR
----
ACC
----
🔌
Logic Gate Truth Table Builder

Select a gate type to see its truth table, or explore a combined two-gate circuit.

💾
Storage Comparison

Compare different storage technologies across key metrics.

Feature HDD SSD Optical Cloud
Speed Medium High Low Medium
Cost per GB Low cost Medium cost Low cost High cost
Capacity High (TBs) Medium (TBs) Low (GBs) High (scalable)
Durability Low (moving parts) High (no moving parts) Low (scratches) High (redundancy)
Portability Low (heavy) Medium High (lightweight) High (any device)

🧩 Guided Practice

Apply your knowledge with interactive exercises

📂
Categorise: Primary vs Secondary Storage

Drag each item into the correct category.

Items to sort:

🔢
Order the Steps: FDE Cycle

Drag the steps into the correct order.

Available Steps

Correct Order

📂
Categorise: Compiler vs Interpreter

Drag each feature into the correct category.

Items to sort:

✏️
Fill in the Blanks: Logic Gate Outputs

Complete the output column for each truth table. Enter 0 or 1.

AND Gate

ABOutput
00
01
10
11

OR Gate

ABOutput
00
01
10
11

🧠 Retrieval Practice

Test your memory by matching terms with definitions

🃏
Memory Match

Find all 8 matching pairs. Click two cards to flip them.

📝 Exam Practice

Build answers using sentence banks, then reveal the mark scheme

⚡ Challenge

No hints, no help — prove your mastery

Time Remaining:
5:00

📊 Performance Review

See how you performed across each sub-topic

Overall Performance

0%

Complete activities to see your results