The Von Neumann stored program concept
Von Neumann architectureA description of the processing architecture that all CPUs use. John von Neumann invented the processor architecture which stores a program in memory as instructions and executes them sequentially using the ALU, control unit and registers. This is known as the stored program concept. is the design upon which many general purpose computerA computer designed to be able to carry out a wide range of instructions. are based. This architecture uses the stored program conceptBoth data and program instructions are stored temporarily in main memory, and then fetched, decoded and executed by the processor..The key elements of Von Neumann architecture are:
- dataUnits of information. In computing there can be different data types, including integers, characters and Boolean. Data is often acted on by instructions. and instructionA single action that can be performed by a computer processor. are both stored as binaryA number system that contains two symbols, 0 and 1. Also known as base 2. digits
- data and instructions are both stored together in the same RAMRandom access memory. This is volatile memory that is constantly being written to and read from. It does not retain its contents without a constant supply of power. When a computer is turned off, everything stored in its RAM is lost.
- instructions are fetchRetrieve data from memory. from memoryThe part of a computer that stores data. one at a time and in order - serially
- the CPU/processorCentral processing unit - the brain of the computer that processes program instructions. decodes and executeCarry out an instruction. an instruction, before cycling around to fetch the next instruction
- the cycle continues until no more instructions are available
A processor based on Von Neumann architecture has five special registerThe section of high speed memory within the CPU that stores data to be processed. which it uses for processing:
- program counter - holds the memory address of the next instruction to be fetched from main memory
- memory address register (MAR) - holds the address of the current instruction that is to be fetched from memory, or the address in memory to which data is to be transferred
- memory data register (MDR) - holds the contents found at the address held in the MAR, or data which is to be transferred to main memory
- current instruction register (CIR) - holds the instruction that is currently being decodeInterpret an instruction. and executed
- accumulator (ACC) - holds the results of processing
The registers and key elements of the Von Neumann architecture all play a part in how an instruction is processed in the fetch-decode-execute cycle.
The fetch-decode-execute cycle
The fetch-decode-execute cycle is followed by a CPU/processorCentral processing unit - the brain of the computer that processes program instructions. to process an instruction. The cycle consists of several steps:
- The memoryThe part of a computer that stores data. address held in the program counter is copied into the MAR.
- The address in the program counter is then incremented - or increased - by one. The program counter now holds the address of the next instruction to be fetched.
- The processor sends a signal containing the address of the instruction to be fetched along the address busThe wires through which data travels from one part of a computer to another on the motherboard. to the computer’s memory.
- The instruction held in that memory address is sent along the data bus to the MDR.
- The instruction held in the MDR is copied into the CIR.
- The instruction held in the CIR is decoded and then executed. The results of processing are stored in the ACC.
- The cycle then returns to step one.
Depending on the type of instruction, additional steps may be taken:
- If the instruction is to transfer data held in the ACC back to RAM, the intended memory address is copied into the MAR. The data to be transferred is copied into the MDR and then transferred to the specified address using the address bus and data bus.
- The executed instruction may require the program to jump to a different place in the program. In this case, the memory address of the new next instruction to be fetched is copied into the program counter. The process then restarts at step one.
The principles of the fetch-decode-execute cycle
More guides on this topic
- Decomposition and abstraction - Edexcel
- Algorithms - Edexcel
- Further algorithms - Edexcel
- Truth tables - Edexcel
- Binary and data representation - Edexcel
- Programming languages - Edexcel
- Networks - Edexcel
- Network security and cybersecurity - Edexcel
- Encryption - Edexcel
- Environmental, ethical and legal concerns - Edexcel