The fetch decode execute cycle is the process the computer goes through when processing instructions. The cycle is performed constantly from boot up, until the computer is shutdown.
In this phase of the cycle, the processor:
Gets the memory address of the current instruction from the program counter PC
Passes the address to the memory address register
Sends the address along the address bus.
The RAM retrieves the data stored at that address and passes the data back along the data bus.
The data is the stored in the memory data register (MDR) ready for decoding.
In this phase the data in the MDR is passed to the control unit (CU) which then decodes the instruction and then signals to the ALU what instruction is to be completed.
In the final phase of the fetch decode execute cycle the instruction is executed.
This instruction could comprise of:
Reading operand data into the accumulator from the RAM
Performing arithmetic on operand data (see below)
Performing logical functions (conditionals / loops)
Writing data from the accumulator to the RAM
Once this step is complete the CPU moves on to the next instruction
Operands vs Opcodes
An opcode is a single instruction that tells the process what operation to perform. An operand is the data or location on which the operation will be performed.
ADD 4
Opcode = ADD Operand = 4 – This means add the number stored at memory location 4 to the number stored in the accumulator.
Full Example
LOAD 3 This example means that the contents of memory location 3 are loaded into the accumulator
SUB 4 This example means that the contents of location 4 are subtracted from the data in the accumulator
STORE 5 This example means that the result of the subtraction is stored to the memory location 5
Use the image and explain the FDE for the instructions stored in the ram (this could be an animation or presentation) (you will need to create your own copy)
Class quiz Kahoot.it https://kahoot.it/
Create your own Kahoot quiz about the FDE cycle and then test it out with a partner https://create.kahoot.it/kahoots/my-kahoots