Complete Computer Knowledge Portal

Monday, May 20, 2013

Instruction Cycle

Before knowing instruction set we have to know two things i.e. opcode and operand. Operand is the data on which operation is to be performed and opcode is the operation which has to be performed. Thus the time taken to fetch the opcode from the memory and execute the operation on operand is a complete Instruction Cycle. Instruction cycles consist of fetch cycle and execute cycle.

IC (Instruction Cycle) = FC (Fetch Cycle) + EC (Execute Cycle)

Fetch Cycle: First byte of instruction contains opcode and others are operand or address of operands depending upon the addressing mode used. An instruction can be more than one byte long. The Program counter contains the address of next instruction to be executed. This address is the address of first byte of instruction i.e. opcode. First of all opcode in brought into memory .

Execute Cycle:
when Fetch Operation is complete opcode goes to data register and then to instruction register. From there opcode is transferred to decoder circuitry where it is decoded and execution cycle is started. Now if the operand is in general purpose registers the instruction is executed immediately otherwise CPU has to perform read operations form memory. This read operation is like fetch operation but only operands are read in spite of opcode.



No comments:

Post a Comment