← GCSE Computer Science · OCR · GCSE Computer Science revision
⭐ 0
OCR GCSE Computer Science (J277) · 1.1 Systems architecture
Mini-Lesson

Systems architecture

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

  1. Mission 1ENIAC took days to reprogram. Your phone swaps apps instantly. Why?
  2. Mission 2Double the cores. Why isn't the computer twice as fast?
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 Von Neumann architecture.
  • 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
Program counter (PC)Holds the address of the next instruction
Memory address register (MAR)Holds the address in memory to be read from or written to
Memory data register (MDR)Holds the data or instruction just read from memory, or about to be written
Accumulator (ACC)Holds the result of calculations done by the ALU
  • An address says where something is; data is what is stored there.
  • Cache is a small, very fast memory in the CPU for frequently used instructions and data.
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-execute cycle.
StageWhat happens
FetchThe address in the PC is copied to the MAR. The instruction at that address is copied into the MDR. The PC goes up by 1
DecodeThe control unit works out what the instruction means
ExecuteThe instruction is carried out: the ALU may do a calculation, with the result stored in the accumulator, or data may be read from or written to memory
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
?Which two registers hold memory addresses rather than data or instructions?
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

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.
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?
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.
  • Registers do specific jobs: the PC and MAR hold addresses; the MDR and ACC hold data or instructions.
  • 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.
🏆

Mini-lesson complete!

⭐⭐⭐

You've worked through Systems architecture for OCR GCSE Computer Science (J277). 🎉

  1. Mission 1ENIAC took days to reprogram. Your phone swaps apps instantly. Why?
  2. Mission 2Double the cores. Why isn't the computer twice as fast?

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 · OCR

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

Sources (3)

The specification points and sources behind this lesson.

  1. 1 OCR J277 spec v3.1, 1.1.1 and 1.1.3
  2. 2 OCR J277 spec v3.1, 1.1.2
  3. 3 PBS, A Science Odyssey, "ENIAC is built 1945": https://www.pbs.org/wgbh/aso/databank/entries/dt45en.html