What are the three main phases of the machine cycle?
Fetch, Decode, and Execute.
What happens in the Fetch phase
The CPU brings the instruction from store to the instruction register.
What happens in the Decode phase?
The instruction is interpreted (decoded) to determine what operation is to be performed and how the operands are to be accessed.
What happens in the Execute phase
Decoding the instruction, accessing the operands (if any) and carrying out the operation.
Which phase is the same for all instructions and why?
The Fetch phase is the same for all instructions because every instruction must first be retrieved from memory in exactly the same way.
Which phase varies from instruction to instruction?
The Execution phase varies, depending upon the operation.
How is a program stored in memory?
A program is a sequence of instructions stored in store/memory/RAM.
What are the two parts of an instruction?
An Operation and an Operand.
What does the Operand part specify?
It specifies what the operation acts on (e.g. a value, a register, or a memory address).
What are the control lines used for?
To carry control signals such as read and write between CPU and memory.
Which two registers are inside the Control Unit in the final model for instruction access?
IR and PC.
How does the Control Unit access an instruction?
The Program Counter (PC) holds the address of the next instruction
The Control Unit sends that address to memory
Memory returns the instruction stored at that address
The instruction is read into the Instruction Register (IR)
What is the role of the store in this model?
The store holds instructions and data and is accessed via read/write data operations.
List the four bullet points for “To carry out an instruction”.
it must first be fetched from store to the control unit.
then interpreted (or decoded) to determine what operation is to be performed and how the operands are to be accessed.
the operands must be fetched from store to the ALU
the operation upon them must be executed, using control signals supplied by the control unit.
What is the “instruction cycle”
Fetch phase: bringing the instruction from store to the instruction register.
Execution phase: decoding the instruction, accessing the operands (if any) and carrying out the operation.
What does PC do at the start of a fetch phase
“At the start of a fetch phase, PC points to the next instruction to be executed.”
What are the 4 stages of the fetch phase
Describe the stages of execution
The address part of the instruction is copied to the MA
The contents of the memory location at that address are copied into MB
The Control Unit performs the required operation
The result is stored in a register or memory location.
What does ADD R0, (20) mean
Add the contents of location (address) 20 to register R0.