โ† Back to subjects
โญ 0
OCR A-level Computer Science (H446) ยท The characteristics of contemporary processors, input, output and storage devices
Mini-Lesson

Characteristics of processors & devices

This mini-lesson covers OCR 1.1: what is inside a processor, how it executes an instruction, what genuinely makes it fast, and how data is held when the power goes off.

  • The ALU, control unit, registers and buses
  • The fetch-decode-execute cycle and pipelining
  • Von Neumann vs Harvard; RISC vs CISC; GPUs
  • Factors affecting performance
  • RAM, ROM, virtual memory and secondary storage

Work through each screen, answer the questions as you go (some are recall, some are calculations you must actually work out) and collect โญ stars. Press Start when you're ready.

1.1 ยท The processor

Inside the processor

The CPU has three parts and a set of tiny, extremely fast stores called registers.

  • ALU โ€” the arithmetic and logic unit: adds, subtracts, shifts, compares, performs AND/OR/NOT.
  • Control unit โ€” decodes each instruction and sends the control signals that make everything else act. It also manages the flow of data along the buses.
  • Registers โ€” see below. Faster than cache, faster than RAM, and there are very few of them.
RegisterJob
PC โ€” Program CounterAddress of the next instruction
MAR โ€” Memory Address RegisterThe address about to be read from or written to
MDR โ€” Memory Data RegisterThe data or instruction just fetched (or about to be written)
CIR โ€” Current Instruction RegisterThe instruction now being decoded and executed
ACC โ€” AccumulatorHolds the results of ALU operations

Buses: the address bus is unidirectional and its width fixes how much memory can be addressed (n lines โ†’ 2โฟ locations). The data bus is bidirectional and its width fixes how many bits move at once. The control bus carries read, write, clock and interrupt signals.

Calculate

Your turn โ€” the address bus

1A processor has an address bus of 16 lines. How many distinct memory locations can it address?
locations
Hint: Each line carries one bit, and each bit doubles the number of combinations. Work out 2 to the power of 16.
1.1 ยท FDE

The fetch-decode-execute cycle

FETCH MAR โ† PC // address of next instruction PC โ† PC + 1 // increment straight away MDR โ† memory[MAR] // travels back on the data bus CIR โ† MDR DECODE Control unit splits CIR into opcode and operand EXECUTE The instruction is carried out (ALU, memory access or branch) A branch simply overwrites the PC

Interrupts: at the end of each cycle the processor checks the interrupt register. If a higher-priority interrupt is waiting, the current contents of the registers are pushed onto a stack, the appropriate interrupt service routine runs, and the saved state is then popped back so the interrupted program resumes exactly where it left off.

Why the PC is incremented during fetch: so that a branch executed a moment later can simply overwrite it. If the increment came afterwards, every jump would immediately be undone.

Quick check

The FDE cycle

?Which register holds the instruction while the control unit is decoding it?
1.1 ยท Performance

What actually makes a processor fast

  • Clock speed โ€” cycles per second. 3 GHz = 3 ร— 10โน cycles a second. Higher speed means more instructions โ€” until heat stops you.
  • Number of cores โ€” each core executes independently. But doubling the cores does not double the speed: the gain depends entirely on how much of the task can actually be run in parallel.
  • Cache โ€” small, very fast memory holding recently used data and instructions. L1 is smallest and fastest; then L2; then L3. A cache hit avoids a slow trip to main memory; a miss costs dearly.
  • Pipelining โ€” fetch instruction n+2 while decoding n+1 and executing n. Throughput rises sharply. A branch can force the pipeline to be flushed, which is why processors invest so heavily in branch prediction.
  • Word length and bus width โ€” wider buses move more bits per transfer and reach more memory.

The point about cache: a register takes under a nanosecond, cache a few nanoseconds, main memory around 100 nanoseconds. The processor is not waiting on arithmetic โ€” it is waiting on memory. Cache exists to hide that gap, and the hit rate is what decides real-world speed.

Calculate

Your turn โ€” average access time

2A cache has a hit rate of 90%. A cache hit takes 2 ns; a miss takes 100 ns. What is the average memory access time, in nanoseconds?
ns
Hint: Take a weighted average: (0.9 ร— 2) + (0.1 ร— 100).
1.1 ยท Architecture

Von Neumann, Harvard, RISC, CISC and GPUs

Von NeumannHarvard
One memory for instructions and dataSeparate instruction and data memories
One shared bus โ†’ the von Neumann bottleneckSeparate buses โ†’ instruction and data fetched at once
Cheap, simple, flexible; general-purpose PCsFaster and more predictable; embedded systems and DSPs
RISCCISC
Few, simple, fixed-length instructions, mostly one cycleMany, complex, variable-length instructions, several cycles
Pipelines beautifully; more registersPipelining is hard; fewer registers
The compiler does the hard work; more instructions per programThe hardware does it; fewer instructions per program
Low power โ†’ ARM, in every phoneHistorically x86 desktops

A GPU has thousands of simple cores all executing the same instruction on different data โ€” the SIMD model. That is a perfect match for shading two million pixels, or for the matrix multiplications inside machine learning. Give a GPU a branch-heavy sequential task, however, and it is slower than a CPU.

Quick check

Pipelining

?Why does a branch instruction hurt a pipelined processor?
1.1 ยท Memory & storage

RAM, ROM, virtual memory and secondary storage

  • RAM โ€” volatile; loses its contents without power. Holds the OS, running programs and their data. Read and written.
  • ROM โ€” non-volatile; holds the BIOS / firmware that boots the machine.
  • Virtual memory โ€” when RAM is full, the least-used pages are swapped out to secondary storage, so a program larger than RAM can still run. If swapping becomes constant the system thrashes: it spends more time moving pages than doing work.
TypeHow it worksTrade-offs
Magnetic (HDD)Magnetised platters, a moving read/write headCheap per GB, huge capacity; moving parts, slow seek, fragile
Flash / SSDNAND transistors trapping charge; no moving partsFast, silent, shock-proof, low power; dearer; finite write cycles
Optical (CD/DVD)A laser burns pits into a reflective layerVery cheap, portable, long-lived; slow, small capacity, easily scratched

Why an SSD feels so much faster: not raw transfer rate, but latency. A hard disk must physically move a head and wait for the platter to rotate โ€” several milliseconds. An SSD addresses any block electronically in microseconds. For thousands of small scattered reads, that is a thousandfold difference.

Calculate

Your turn โ€” storage capacity

3A memory card holds 2 GB. Photographs are 4 MB each. Taking 1 GB = 1000 MB, how many photographs fit on the card?
photos
Hint: Convert 2 GB into megabytes first, then divide by the size of one photo.
Quick check

Virtual memory

?A computer with 8 GB of RAM runs so many programs at once that the disk light stays permanently on and everything crawls. What is happening?
Sort it

Sort the components

Tap an item, then tap the group it belongs to.

๐Ÿ“‡ Register

๐ŸšŒ Bus

๐Ÿ’พ Storage

Match it

Match the term to its meaning

Tap an item on the left, then its partner on the right.

Meaning
Term
Recap

The big ideas to know

Processor: ALU ยท control unit ยท registers (PC, MAR, MDR, CIR, ACC) ยท address, data and control buses

FDE: MAR โ† PC ยท PC โ† PC + 1 ยท MDR โ† memory ยท CIR โ† MDR ยท decode ยท execute; interrupts checked each cycle

Performance: clock speed ยท cores ยท cache hit rate ยท pipelining (flushed by branches) ยท bus width

Architecture: von Neumann (one memory, bottleneck) vs Harvard (separate, embedded) ยท RISC vs CISC ยท GPU = SIMD

Memory: RAM volatile ยท ROM holds the BIOS ยท virtual memory pages to disk and can thrash

Storage: magnetic (cheap, moving parts) ยท flash (fast, finite writes) ยท optical (cheap, slow, fragile)

That is the whole of OCR 1.1. Press Finish to see your score.

๐Ÿ†

Mini-lesson complete!

โญโญโญ

You've worked through Characteristics of processors & devices for OCR A-level Computer Science (H446). ๐ŸŽ‰

Your stars: 0 / 0

Next: test yourself in the Evaluate stage Confidence Quiz, then lock it in with Verify.

๐Ÿ“ฃ Smashed it? Share your score

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

โ†’ Back to all subjects