Fetch-execute cycle
Processors operate in defined stages that are used to carry out program instructions
The program is repeated over and over again for each instruction in a program
Step 1. The address of the next instruction is copied from the PC to the Memory Adderss Register (MAR)
Step 2. The instruction held at that address is copied to the Memory Data Register (MDR)
Step 3. Simultaneously, the contents of the Program Counter (PC) are incremented
Step 4. The contents of the MDR are copied to the current Instruction Register (CIR)
Step 5. The instruction held in the CIR is decoded
Step 6. It is split into OPERAND and OPCODE to determine the instruction type.
Step 7. Additional data can be fetched from the memory and is passed to the accumulator
OPCODE - specifies the operation that is carried out
OPERAND - either holds the address of the data to be used, which is then copied to MAR
Or
it holds the actual data to be operated on, which is passed onto the MDR
Step 8. Instructions are executed and the result is either held in accumulator or stored in memory.