Section 13.2
Computer Architecture
13.2 The Fetch-Execute Cycle
13.2.1 CPU Architecture
The processor consists of:
- The Arithmetic Logic Unit (ALU)
- arithmetic and logic operations take place here.
- The Control Unit
- coordinates all the activities taking place in the CPU, memory and
peripherals.
- Circuitory to control the interpretation and execution of instructions
(including registers).
Registers
Registers are special storage locations to hold data whilst its been decoded or
manipulated.
- The Program Counter (PC)
- this holds the address of the next instruction to be executed.
- The General Purpose Registers
- used in performing arithmetic functions.
- The Current Instruction Register (CIR)
- holds the instruction been processed.
- The Memory Address Register (MAR)
- holds the address of the memory location which data is read
from/written to.
- The Memory Data Register (MDR)
- all transfers from memory to the CPU go here.
- The Status Register
- certain bits that are set or cleared based upon an instruction.
13.2.2 The Instruction Cycle
Before instructions can be executed they must be fetched.
Additionally, the CPU has to control all data transfer between peripherals and
main memory.
When there is a need to transfer data to an input/output (I/O) device an
interrupt is generated and the CPU deals with the transfer.
13.2.3 The Stack Pointer
Most computer systems have an extra register that points to the top of a set of
memory locations known as the stack. This is the stack pointer.