what is Machine Cycle - Basic Programming Knowledge

what is Machine Cycle

February 21, 2019

Machine Cycle
CPU performs following steps to execute an instruction:
  1. Fetch
  2. instruction
  3. Execute Instruction
  4. Storing


                                                                   


1. Fetch
Instruction fetch is a process of getting an instruction from the memory to execute it.
This process is performed by the control unit.
2. Decode instruction
The control unit decodes the Instruction. This process examines the nature of
instruction to determine what further operations should be taken. CU directs to move the
required data from memory to ALU.
3. Execute Instruction
After decoding the Instruction and getting the required data, CPU finally executes that
Instruction. The instruction is executed by ALU.
4. Storing
The process of writing the result to the memory IS called storing
These four operations collectively are called a machine cycle or instruction cycle The
time required to fetch and decode instruction is called Instruction time or i-time The time
required to execute and store is called Execution time or e-time