Fetch-Decode-Execute cycle Flashcards
What are the 2 buses?
Address bus - takes the memory address to the RAM, finds the data that corresponds to the address and then the data is taken back on the data bus
Data bus - takes the data back to the memory address register from the RAM
What are the 5 steps of the fetch stage?
Step 1 - The program counter copies the address of the next instruction it contains into the memory address register
Step 2 - The memory address register places the address to be used on the address bus
Step 3 - The memory address register triggers a ‘read’ signal that causes main memory (RAM) to place the instruction being asked for onto the data bus
Step 4 - The instruction on the data bus is loaded into the memory data register (also called memory buffer register)
Step 5 - The memory data register copies the instruction into the instruction register
What happens during the decode stage?
The CPU decodes the instruction and prepares various areas within the chip in readiness of the next step
What happens during the execute stage?
Data processing takes place, The instruction is carried out upon the data (executed). The result of this processing is stored in yet another register.
What is the 1st step of the fetch stage?
Step 1 - The program counter copies the address of the next instruction it contains into the memory address register
What is the 2nd step of the fetch stage?
Step 2 - The memory address register places the address to be used on the address bus
What is the 3rd step of the fetch stage?
Step 3 - The memory address register triggers a ‘read’ signal that causes main memory (RAM) to place the instruction being asked for onto the data bus
What is the 4th step of the fetch stage?
Step 4 - The instruction on the data bus is loaded into the memory data register (also called memory buffer register)
What is the 5th step of the fetch stage?
Step 5 - The memory data register copies the instruction into the instruction register