Sie sind auf Seite 1von 4

Roll #________________ Name ____________________________ Sec_________

Submission Deadline: Tuesday Sep 25,


2018 in class
Q1: The hypothetical machine of Figure. A also has two I/O
instructions:
 0000 --Load AC from Memory
 0001 --Store AC to Memory
 0010 --Load AC from I/O
 0011 --Store AC to I/O
 0100 --Add to AC from memory
In these cases, the 8-bit address identifies a particular I/O device. Show the program
execution in Figure A for the following program:
i. Load AC from Memory location 0400.
ii. Add AC and contents of memory location 0401.
iii. Store AC to device 2.
iv. Load AC from device 1.
v. Add AC and contents of memory location 0401
vi. Store AC to memory location 0401
Assume that the next value retrieved from device 1 is 17 and that location 0400 contains a
value of 3.
Figure A: The hypothetical machine

Worksheet-1-Instruction Execution Cycle Sec A,B,C,D,E,F COAL-FALL-2018


Roll #________________ Name ____________________________ Sec_________

Memory CPU Registers Memory CPU Registers

0A10 0400 0A10 PC 0A10 0400 PC


AC AC
0A11 4401 IR 0A11 4401 IR
MAR MAR
0A12 3002 MBR 0A12 3002 MBR
I/O AR I/O AR
0A13 2001 I/O BR 0A13 2001 I/O BR

0A14 4401 0A14 4401

0A15 1401 0A15 1401

. I/O Module . I/O Module


. 17 Device#1 . 17 Device#1
Device#2 Device#2

0400 0003 0400 0003

0401 0004 0401 0004


Step 1 Step 2
Memory CPU Registers Memory CPU Registers

0A10 0400 PC 0A10 0400 PC


AC AC
0A11 4401 IR 0A11 4401 IR
MAR MAR
0A12 3002 MBR 0A12 3002 MBR
I/O AR I/O AR
0A13 2001 I/O BR 0A13 2001 I/O BR

0A14 4401 0A14 4401

0A15 1401 0A15 1401

. I/O Module . I/O Module


. Device#1 . Device#1
Device#2 Device#2

0400 0003 0400 0003

0401 0004 0401 0004


Step 3 Step 4

Worksheet-1-Instruction Execution Cycle Sec A,B,C,D,E,F COAL-FALL-2018


Roll #________________ Name ____________________________ Sec_________

Memory CPU Registers Memory CPU Registers

0A10 0400 PC 0A10 0400 PC


AC AC
0A11 4401 IR 0A11 4401 IR
MAR MAR
0A12 3002 MBR 0A12 3002 MBR
I/O AR I/O AR
0A13 2001 I/O BR 0A13 2001 I/O BR

0A14 4401 0A14 4401

0A15 1401 0A15 1401

. I/O Module . I/O Module


. Device#1 . Device#1
Device#2 Device#2

0400 0003 0400 0003

0401 0004 0401 0004


Step 5 Step 6
CPU Registers Memory CPU Registers

0A10 0400 PC 0A10 0400 PC


AC AC
0A11 4401 IR 0A11 4401 IR
MAR MAR
0A12 3002 MBR 0A12 3002 MBR
I/O AR I/O AR
0A13 2001 I/O BR 0A13 2001 I/O BR

0A14 4401 0A14 4401

0A15 1401 0A15 1401

. I/O Module . I/O Module


. Device#1 . Device#1
Device#2 Device#2

0400 0003 0400 0003

0401 0004 0401 0004


Step 7 Step 8

Worksheet-1-Instruction Execution Cycle Sec A,B,C,D,E,F COAL-FALL-2018


Roll #________________ Name ____________________________ Sec_________

Memory CPU Registers Memory CPU Registers

0A10 0400 PC 0A10 0400 PC


AC AC
0A11 4401 IR 0A11 4401 IR
MAR MAR
0A12 3002 MBR 0A12 3002 MBR
I/O AR I/O AR
0A13 2001 I/O BR 0A13 2001 I/O BR

0A14 4401 0A14 4401

0A15 1401 0A15 1401

. I/O Module . I/O Module


. Device#1 . Device#1
Device#2 Device#2

0400 0003 0400 0003

0401 0004 0401 0004


Step 9 Step 10
Memory CPU Registers Memory CPU Registers

0A10 0400 PC 0A10 0400 PC


AC AC
0A11 4401 IR 0A11 4401 IR
MAR MAR
0A12 3002 MBR 0A12 3002 MBR
I/O AR I/O AR
0A13 2001 I/O BR 0A13 2001 I/O BR

0A14 4401 0A14 4401

0A15 1401 0A15 1401

. I/O Module . I/O Module


. Device#1 . Device#1
Device#2 Device#2

0400 0003 0400 0003

0401 0004 0401 0004


Step 11 Step 12
Q2:
Problems 3.1, 3.2 -Chapter 3 -- From Computer Organization and
Architecture by William Stallings

Worksheet-1-Instruction Execution Cycle Sec A,B,C,D,E,F COAL-FALL-2018

Das könnte Ihnen auch gefallen