3.1 Computer architecture

Show All Section Notes
Test yourself on Computer architecture 12 questions — drag-to-order, code completion, matching and multiple choice.
Start the quiz

The CPU and Architecture

Watch this lesson Video 3.1.1 · 8:53 · The stored program idea, what sits inside the processor and what does not, and the instruction set

1. The Evolution of Computing

Before the mid-1940s, computers were fixed-program machines. If you wanted a computer to switch from doing math to processing text, you had to physically rewire it.

The Challenge: Early computers like ENIAC required engineers to manually flip switches and move patch cables to "program" the machine. This took days or weeks for a single task. There was no "software" as we know it today.

2. The Stored Program Concept

In 1945, mathematician John von Neumann proposed a revolutionary idea: the Stored Program Concept.

The Core Idea

Both Data and the Instructions (the program) are stored together in the same Memory Unit (RAM).

This allowed a computer to be reprogrammed simply by loading a different set of instructions into memory, rather than changing the hardware.

3. Components of the Von Neumann Model

The model has a processor and a memory unit, joined by buses. Look carefully at where the boundary falls in the diagram: the Control Unit, the ALU and the registers are all inside the CPU, while memory sits outside it.

Control Unit (CU)

The "Manager" of the CPU. It directs the flow of data between the CPU and other devices. It manages the execution of instructions by sending control signals to the other components.

Arithmetic Logic Unit (ALU)

The "Calculator." It performs all Arithmetic calculations (addition, subtraction, etc.) and Logical operations (comparing values using AND, OR, NOT).

Registers

Inside the CPU. A handful of very small, very fast stores, each holding a single value the CPU is working with right now — an address, an instruction, or a result. Covered in detail in the next lesson.

Memory Unit (Main Memory)

Outside the CPU. This is RAM, also called the immediate access store. It holds the program's instructions and its data together, and the CPU fetches from it across the buses. It is much larger than the registers, and much slower.

Do not confuse registers with the memory unit. Registers are inside the processor and hold one value each; the memory unit is outside it and holds the whole running program. The stored program concept is a statement about the memory unit — that instructions and data live together in it — and it only makes sense once you keep the two apart.

4. The Instruction Set

A CPU cannot execute just any instruction. Every processor is built to recognise a fixed, finite list of machine-code operations, and that list is called its instruction set.

Each instruction in the set has two parts:

  • Opcodewhat to do: add, subtract, load a value, store a value, jump to another instruction.
  • Operandwhat to do it to: usually a value, or the address in memory where a value can be found.

This is why a program written in a high-level language has to be translated before it will run. The translator's job is to turn each high-level statement into a sequence of instructions drawn from that particular CPU's instruction set.

Why this matters: different processor designs have different instruction sets. Machine code compiled for one design will not run on a processor with a different set, because the second processor simply has no circuitry for those opcodes. That is why software is published for specific architectures rather than for computers in general.

5. Why the Von Neumann Architecture?

  • Flexibility: The same hardware can perform any task as long as the instructions are provided in memory.
  • Efficiency: It uses a single set of buses to access memory, simplifying the design of the computer.
  • Universal Design: Almost every modern computer, from your smartphone to your laptop, is based on this foundational model.

6. Embedded Systems

Not every computer looks like a computer. An embedded system is a computer system built into a larger device, dedicated to carrying out one specific task — rather than a general-purpose machine that runs whatever software you install on it.

It contains the same ingredients as any other computer: a microprocessor or microcontroller, memory holding a program that does not change, inputs (often from sensors), and outputs (often to actuators or a small display).

DeviceWhat the embedded system does
Washing machineRuns the selected wash programme: controls water valves, drum motor and heater from timer and temperature sensors.
Microwave ovenTimes the cooking, controls the magnetron, stops when the door opens.
Traffic lightsSequences the lights, responds to vehicle and pedestrian sensors.
Car engine managementAdjusts fuel and ignition continuously from engine sensor readings.
Central heating controllerCompares a temperature sensor with the set point and switches the boiler.
AdvantagesDisadvantages
Small and cheap to mass-produce, because the hardware only has to do one job Difficult or impossible for a user to upgrade or reprogram
Low power consumption Hard to troubleshoot — there is usually no screen or keyboard to diagnose it with
Dedicated to one task, so it is fast and reliable at that task A fault often means replacing the whole unit rather than repairing it
⚠️ Exam Alerts:
  • In a Von Neumann machine, instructions and data share the same memory and the same buses. This is often a 1-mark question.
  • The memory unit is not the registers. Registers are inside the CPU; the memory unit is RAM, outside it.
  • An instruction set is the complete list of machine-code operations one CPU can execute — not the program, and not the software.
  • Define an embedded system by what it is for — a computer dedicated to one specific function within a larger device — rather than by saying it is "a small computer".