How does CPU execute instructions?

CPU stands for Central Processing Unit. It is the brain of a computer. CPU can execute instructions on it only. But at first, the CPU loads the program in the main memory (RAM) and then fetches instructions one by one from the memory to the CPU registers and executes them. In general, the CPU performs the following steps to execute one instruction:

How does CPU execute instructions

CPU executes instruction steps:

1. Fetch instruction (F): It moves Instruction from memory to CPU.

2. Decode instruction (D): It determines types of instruction such as ADD, AND, OR, and stores operands into registers if needed.

3. Execute instruction (E): It executes the instruction such as addition.

4. Write results (R): It Stores the result of execution into the register or memory.