Instruction Cycle

The primary responsibility of a computer processor is to execute a sequential set of instructions that constitute a program. CPU executes each instruction in a series of steps, called instruction cycle.

An instruction cycle involves four steps

·         Fetching The processor fetches the instruction from the memory. The fetched instruction is placed in the Instruction Register. Program Counter holds the address of next instruction to be fetched and is incremented after each fetch.

·         Decoding The instruction that is fetched is broken down into parts or decoded. The instruction is translated into commands so that they correspond to those in the CPU’s instruction set. The instruction set architecture of the CPU defines the way in which an instruction is decoded.

·         Executing The decoded instruction or the command is executed. CPU performs the operation implied by the program instruction. For example, if it is an ADD instruction, addition is performed.

·         Storing CPU writes back the results of execution, to the computer’s memory

                     

                                                     Instruction cycle

                                Steps in instruction cycle

Instructions are of different categories. Some categories of instructions are

·         Memory access or transfer of data between registers.

·         Arithmetic operations like addition and subtraction.

·         Logic operations such as AND, OR and NOT.

·         Control the sequence, conditional connections, etc.

A CPU performance is measured by the number of instructions it executes in a second, i.e., MIPS (million instructions per second), or BIPS (billion instructions per second).