Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Step 

1 of 8
Program execution as per figure 3.5 from textbook:
Step 1: Instruction Register (IR)   3005.
Step 2: Accumulator (AC)  3
Step 3: Instruction Register (IR)   5940
Step 4: Accumulator (AC)   5 (3 +2)
Step 5: Instruction Register (IR)   7006
Step 6: Device 6   Accumulator (AC)
Step 2 of 8
Explanation:
• Instruction register (IR) is the one which stores instruction currently being executed or
decoded.
• Program counter (PC) is the one that holds address of the instruction being executed
at current time.
• 12 bits is used to specify the address and 4 bits in the IR indicates accumulator to be
loaded.
Let the contents of memory location be,
• 300 : 3005
• 301 : 5940
• 302 : 7006
Step 3 of 8
Step 1:
In step1 the “Program Counter” holds the value of “300” and “Instruction register” holds
contents of address “300” that is “3005”.

Step 4 of 8
Step 2 & Step 3:
The content of address location “005” is moved to the accumulator and Instruction
register holds the value “5940
Step 5 of 8
Step 4:
Add contents of Accumulator with contents of address “940” and stored back to
accumulator.

Step 6 of 8
Step 5:
The next instruction (7006) is fetched from location 302 and PC is incremented.

Step 7 of 8
Step 6:
The contents of the AC are stored in location 006
Step 8 of 8
Thus, execution steps for the given problem according to figure 3.5 from text book is
done

You might also like