Fetch+Execute+Cycle

The fetch-and-execute cycleis the basic operation cycle of a computer. It is the process by which a computer retrieves a program instruction from its memory, determines what actions the instruction requires, and carries out those actions. This cycle is repeated continuously by the central processing unit (CPU), from bootup to when the computer is shut down.

The next instruction is fetched from the memory address that is currently stored in the Program Counter (PC), and stored in the Instruction register (IR).
 * 1. Fetch the instruction **

2. Decode the instruction
The instruction decoder interprets the instruction. If the instruction has an indirect address, the effective address is read from main memory, and any required data is fetched from main memory to be processed and then placed into data registers. During this phase the instruction inside the IR (instruction register) gets decoded.

3. Execute the instruction
The CU passes the decoded information as a sequence of control signals to the relevant function units of the CPU to perform the actions required by the instruction such as reading values from registers, passing them to the ALU to perform mathematical or logic functions on them, and writing the result back to a register. If the ALU is involved, it sends a condition signal back to the CU.:)

4. Store results
The result generated by the operation is stored in the main memory, or sent to an output device. Based on the condition of any feedback from the ALU, Program Counter may be updated to a different address from which the next instruction will be fetched. The cycle is then repeated.



The 'Fetch Execute' Cycle is a cycle which a certain piece of information or alot of information goes around one cycle over and over again. Step 1 - The Fetch Execute cycle begins. Step 2 - The program counter copies the address of the next instruction it contains into the memory address register. Step 3 - The memory address register places the address to be used on the address bus. Step 4 - The memory data register copies the instruction into the 'Instruction Register'. Step 5 - The instruction on the data bus is loaded into the memory data register. Step 6 - The memory address register triggers a 'Read' signal that causes the main memory the (RAM) to place the instruction that is being asked for onto the data bus. Step 7 - The CPU examines the instruction in the current instruction register and decodes it; this means a special part of the CPU Called the 'Decode' unit will make the rest of the CPU ready to carry out for the instruction. It does this by issuing a series of micro-instructions. Step 8 - The instruction that is in the register is carried out (Executed) by the CPU. The part that executes instructions is more commonly known and the 'Execute Unit'. Step 9 - Finally after the CPU has executed the instruction, The program counter can now be reset to point to the next instruction.