Von Neumann architecture
In most computer systems, the CPU/processorCentral processing unit - the brain of the computer that processes program instructions. receives instructionA single action that can be performed by a computer processor. and dataUnits of information. In computing there can be different data types, including integers, characters and Boolean. Data is often acted on by instructions. from an inputData which is inserted into a system for processing and/or storage. or memoryThe part of a computer that stores data.. The instructions and data are processed by the CPU and the results are either sent to an outputData which is sent out of a system. or transferred to secondary storageNon-volatile memory external to the CPU and used for long-term storage of programs and data.. 'Architecture' is the design that enables the instructions and data to reach and be processed by the CPU.
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. The key elements of Von Neumann architecture are:
- data and instructions are both stored as binaryA number system that contains two symbols, 0 and 1. Also known as base 2..
- data and instructions are both stored in main memory.
- instructions are fetched from memory one at a time and in order - serially.
- the processor decodes and executes 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 (PC) - 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 buffer register (MBR) - holds the contents found at the address held in the MAR, or data which is to be transferred to main memory. It is also referred to as the memory data register (MDR).
- Current instruction register (CIR) - holds the instruction that is currently being decoded and executed.
- Accumulator (ACC) - holds the data being processed and the results of processing.
Using the registers and the key elements of the Von Neumann architecture, we can now look at how an instruction is processed in the fetch-execute cycle.