A-Level Computer Science / Unit 4: CPU Operation and Low-Level Processing

4.1.1 Stored Programs and the Von Neumann Model

🔒 Lesson slides are available to signed-in users. Sign in

4.1.1 Stored Programs and the Von Neumann Model

A modern computer can perform many different tasks without being rebuilt. The key idea is that the instructions controlling the machine are stored in memory and can be replaced by another program.

By the end of this section, you should be able to:

  • Identify the processor, memory and input/output as the main parts of a simple Von Neumann system.
  • Explain the stored-program concept in your own words.
  • Explain how program instructions and working data can occupy the same memory.
  • Describe how a processor normally works through instructions in sequence.

Changing the Task Without Rebuilding the Machine

Imagine a weather station that records a temperature every ten minutes. Later, its owner wants it to report only unusual readings. A hard-wired machine might require physical changes to its circuitry. A stored-program computer can instead be given a different sequence of instructions.

The hardware remains largely the same. What changes is the program held in memory. This is why one computer can run a spreadsheet, a simulation, a game or a control program at different times.

Stored-program concept: program instructions are encoded and kept in memory so that the processor can retrieve and execute them. Loading different instructions allows the same hardware to perform a different task.
Exam tip: do not stop at “the program is stored”. A strong explanation links three ideas: the instructions are held in memory, the processor fetches and executes them, and the program can be replaced without redesigning the processor.

The Von Neumann Model

The Von Neumann model is a simplified way of describing a general-purpose computer. It focuses on how the processor, memory and input/output work together rather than on the physical layout of a particular device.

Part of the model Contribution to the system
Processor (CPU) Retrieves instructions, interprets them and carries out the required operations.
Memory Holds the current program and the data being used by that program.
Input Supplies data or commands to the computer system.
Output Communicates processed information or controls another device.
Von Neumann architecture: a computer organisation in which a processor accesses memory containing both program instructions and data.

Registers, buses and the detailed instruction cycle make this model work in practice. They are introduced in the following Unit 4 sections; this page concentrates on the underlying stored-program idea.

Instructions and Data Share Memory

In a Von Neumann system, memory is not divided into one compulsory area for programs and another compulsory area for data. Both can be represented in binary and stored at addressable memory locations.

The table below is a human-readable view of one small memory region. Real memory stores binary patterns; the words are shown only to make the example easier to follow.

Address Stored content Used as
500 LOAD 740 Instruction
501 ADD 741 Instruction
502 STORE 742 Instruction
503 OUTPUT 742 Instruction
740 23 Data
741 9 Data
742 0 Working data

Following the example

  1. The first instruction obtains the value 23 from address 740.
  2. The second instruction adds the value 9 from address 741.
  3. The result, 32, is placed at address 742.
  4. The final instruction sends that stored result to an output device.
Common mistake: sharing memory does not mean that an instruction and a data value are “the same thing”. Both are stored as bit patterns, but the processor interprets a fetched instruction according to the processor's instruction format.

Working Through a Program

A stored program is made from separate instructions. In the simplest case, the processor starts at the first instruction and then continues with the next memory address.

Normal pattern:

fetch one instruction → interpret it → carry it out → move to the next instruction → repeat

This is called sequential execution. It describes the normal flow, not an unbreakable rule. A jump or branch instruction can direct the processor to continue from a different address, allowing selection and repetition.

Instruction: a binary-coded command that tells the processor which operation to perform and, where needed, which data or address to use.

Common Mistakes

  • “Stored program” means permanently fixed. No—the important advantage is that another program can be loaded.
  • Sequential execution means jumps are impossible. No—sequential order is the default, but control instructions can change it.
  • Only data is stored in memory. In this model, memory holds both data and program instructions.
  • The model is a picture of one exact processor. It is an abstract organisation that can be implemented in many ways.

Practice

  1. A ticket machine is updated so that it accepts a new type of travel card. Explain how the stored-program concept allows this change without replacing the processor.
  2. In the memory example above, state the value eventually stored at address 742 and explain how it is produced.
  3. Explain two features of the Von Neumann model.
  4. A student writes: “A Von Neumann processor must always execute every instruction in consecutive address order.” Explain why this statement is incomplete.
  5. Distinguish between a program instruction and program data, while also explaining what they have in common when held in memory.
Check your answers
  1. A revised sequence of instructions can be loaded into memory. The processor then fetches and executes the new program using the same general-purpose hardware.
  2. The value is 32: the program loads 23, adds 9 and stores the result.
  3. Suitable points include: one processor accesses memory; memory holds instructions and data; instructions are normally processed in sequence; input and output connect the system to its environment.
  4. Consecutive order is normal, but a jump or branch can replace the next address and redirect execution.
  5. An instruction encodes an operation; data is a value used or produced by the program. Both are represented as binary patterns in memory.

Review

Idea What you should remember
Stored program Instructions are held in memory and can be replaced.
Shared memory The same memory system can contain instructions and data.
Processor Fetches, interprets and carries out stored instructions.
Sequential execution Instructions normally follow address order unless control flow changes it.
General-purpose computer The machine changes task by loading another program rather than being rewired.
Next section: 4.1.2 examines the CPU components and registers that make this model operate.