An instruction is command given to computer to perform a specified on given data,to perform a particular task a programmer writes a sequence of instruction called a program.Program and data are store in the memory.the microprocessor fetches one instruction from the memory a time and executes.It executes all the instruction of a program.one by one to produce the final result.
The necessary steps that a microprocessor carry out to an instruction and necessary data from the memory and to executes if constitute an instruction cycle.A instruction cycle is composed of two cycle;one in fetch cycle and another in execute cycle.
Fetch cycle:
In fetch cycle,microprocessor fetch up code from the memory the necessary steps which are carried out to fetch an up code from the memory constitute of fetch cycle.
Execute cycle:
The necessary step that are carried out to get data if any from the memory and to perform the specific operation specified in an instruction constitute and execute cycle.
The time required to execute an instructions variable which depends on the type of instruction to be executed.The total time required to execute an instruction is given by:
IC = FC+EC
Where,IC=instruction cycle
FC=fetch cycle
EC=execute cycle