instruction cycle

14

Upload: hafiz-hamza

Post on 14-Jan-2017

87 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Instruction cycle
Page 2: Instruction cycle

Hafiz Hamza [email protected]

Page 3: Instruction cycle
Page 4: Instruction cycle

INSTRUCTION

Instruction is command which is given by the user to computer.

Page 5: Instruction cycle

Instruction cycle The time period during which one

instruction is fetched from memory and execute when a computer given an instruction in machine language.

Each instruction is further divided into sequence of phases.

After the execution the program counter is incremented to point to the next instruction.

Page 6: Instruction cycle

Phases

Fetch an instruction from memory Decode the instruction Execute the instruction

Page 7: Instruction cycle

Fetch cycle In this phase the sequence counter

is initialized to 0. The address of first instruction

from PC is loaded into address register during the first clock cycle.

Page 8: Instruction cycle

Fetch cycle

0002

Mov AC, 0

Mov AC, 0

0000000100020003

IRDecodeunit

Execute unit

PC

AC

Page 9: Instruction cycle

Decode cycle The instruction is decoded by the

instruction decoder of a processor. All the bits of the instruction under

execution stored in IR are analyzed and decode in third clock cycle.

Page 10: Instruction cycle

Decode cycle

0002

Mov AC,0

Mov AC, 0

0000000100020003

IRDecodeunit

Execute unit

PC

AC

Page 11: Instruction cycle

Execute cycle

In the last phase, the processor execute the instruction.

This involves setting the contents of the internal register AC to constant value 0.

Page 12: Instruction cycle

Execute cycle

0003

AC 0

Mov AC,0

Mov AC, 0

0000000100020003

IRDecodeunit

Execute unit

PC

AC

Page 13: Instruction cycle

No Questions?

Page 14: Instruction cycle

Thank You