+ All Categories
Home > Technology > Instruction Execution Cycle

Instruction Execution Cycle

Date post: 21-Jan-2018
Category:
Upload: utsavshah
View: 1,757 times
Download: 0 times
Share this document with a friend
14
Instruction Execution 15MCA043
Transcript
Page 1: Instruction Execution Cycle

Instruction Execution

15MCA043

Page 2: Instruction Execution Cycle

Instruction Execution

Instruction is command which is given by the

user to computer.

Execution is the process by which a computer

performs instruction.

Instruction Execution means a program to be

executed by a processor consists of a set of

instructions stored in memory.

Page 3: Instruction Execution Cycle

Terminologies

Program Counter is a register in a computer

processor that contains the address of the next

instruction which will be executed.

Memory Address Register (MAR) holds the

Memory Location of data that needs to be

accessed.

Page 4: Instruction Execution Cycle

Instruction Register (IR) is a part of CPU control

unit that stores the instruction currently being

executed or decoded.

Memory Buffer Register (MBR) stores the data

being transferred to and from immediate access

store also known as Memory Data Register

(MDR).

Page 5: Instruction Execution Cycle

Control Unit (CU) decodes the program

instruction in the IR, selecting machine

resources such as a data source register and a

particular arithmetic operation.

Arithmetic Logic Unit (ALU) performs

mathematical and logical operations.

Accumulator (AC) means the processor contains

the single data register.

Page 6: Instruction Execution Cycle

Instruction Register

Fetched instruction is placed in the instruction register

Categories

– Processor-memory• Transfer data between processor and memory

– Processor-I/O• Data transferred to or from a peripheral device

– Data processing• Arithmetic or logic operation on data

– Control• Alter sequence of execution

Page 7: Instruction Execution Cycle

Instruction Execution Cycle

The time period during which one instruction is

fetched from memory and execute when computer

given an instruction in machine language.

Each instruction is further divided into sequence of

phases.

After the execution of program counter is

incremented to point to the next instruction.

Page 8: Instruction Execution Cycle

Process

I. Processor reads instruction from

memory time .

II. Decodes the instruction.

III. Execute the instruction.

Page 9: Instruction Execution Cycle

Fetch Cycle

The Program Counter (PC) contains the address

of the next instruction to be fetched.

The address contained in the PC is copied to the

Memory Address Register (MAR).

Page 10: Instruction Execution Cycle

The instruction is copied from the memory

location contained in the MAR and placed in the

Memory Buffer Register (MBR).

The entire instruction is copied from the MBR

and placed in the Current Instruction Register

(CIR)

Page 11: Instruction Execution Cycle

Execute Cycle

The address part of the instruction is placed in

the MAR

The instruction is decoded and executed.

The processor checks for interrupts and either

branches to the relevant interrupt service routine

or starts the cycle again.

Page 12: Instruction Execution Cycle

Start

Fetch Instruction

Decode Instruction

Execute Instruction

Halt

Page 13: Instruction Execution Cycle

Example

Page 14: Instruction Execution Cycle

Recommended