Suppose the hypothetical processor of (Fig 1.3) also has two I/O instructions: 0011 Load AC from I/O 0111 Store AC to I/O In these cases, the 12-bit address identifies a particular external device. Show the program execution (Fig 1.4) for the following program: 1. Load AC from device 5. 2. Add contents of memory location 940. 3. Store AC to device 6. Assume that the next value retrieved from device 5 is 3 and that location 940 contains a value of 2.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Task-1: 


Suppose the hypothetical processor of (Fig 1.3) also has two I/O instructions:
0011 Load AC from I/O
0111 Store AC to I/O
In these cases, the 12-bit address identifies a particular external device. Show the program execution (Fig 1.4) for the following program:
1. Load AC from device 5.
2. Add contents of memory location 940.
3. Store AC to device 6.
Assume that the next value retrieved from device 5 is 3 and that location 940 contains a value of 2.

Example of Program Execution
Fetch Stage
Execute Stage
Memory
30019 40
301 5 9 4 1
302 2 9 4
CPU Registers
300 PC
Memory
30019 40
|AC 301 5 9 41
1940 IR 302 2 9
CPU Registers
301 PC
0003 AC
1940 IR
9400 0 0 3
9410 0 0
9400 0 0 3
9410 0 0 2
Step 2
Memory
30019 40
0003 AC 3015 9 4 1
5941 IR 302 2 9 4 1
Step 1
CPU Registers
302 PC
0005 AC
5941R
CPU Registers
Memory
300I9 4 0
301 5 9 4 1
302 2 9 4 1
301 PC
940 0 0 0 3
9410 00 2
940 0 0 0 3
941 0 0 0 2
Step 3
Мешогy
30019 4 0
301 5 9 4 1
302 2 9 4
Step 4
CPU Registers
30 2 PC
0005 AC 301 5 9 4 1
2941 IR 302 2 9 4 1
CPU Registers
30 3 PC
0005AC
2 9 4 1 IR
Memory
300I 9 4 0
9400 0 0 3
941 0 0 0 2
940 0 00 3
941 0 005
Step 5
Step 6
Figure 1.4 Example of Program Execution
(contents of memory and registers in hexadecimal)
Transcribed Image Text:Example of Program Execution Fetch Stage Execute Stage Memory 30019 40 301 5 9 4 1 302 2 9 4 CPU Registers 300 PC Memory 30019 40 |AC 301 5 9 41 1940 IR 302 2 9 CPU Registers 301 PC 0003 AC 1940 IR 9400 0 0 3 9410 0 0 9400 0 0 3 9410 0 0 2 Step 2 Memory 30019 40 0003 AC 3015 9 4 1 5941 IR 302 2 9 4 1 Step 1 CPU Registers 302 PC 0005 AC 5941R CPU Registers Memory 300I9 4 0 301 5 9 4 1 302 2 9 4 1 301 PC 940 0 0 0 3 9410 00 2 940 0 0 0 3 941 0 0 0 2 Step 3 Мешогy 30019 4 0 301 5 9 4 1 302 2 9 4 Step 4 CPU Registers 30 2 PC 0005 AC 301 5 9 4 1 2941 IR 302 2 9 4 1 CPU Registers 30 3 PC 0005AC 2 9 4 1 IR Memory 300I 9 4 0 9400 0 0 3 941 0 0 0 2 940 0 00 3 941 0 005 Step 5 Step 6 Figure 1.4 Example of Program Execution (contents of memory and registers in hexadecimal)
3 4
15
Opcode
Address
(a) Instruction format
0 1
15
S
Magnitude
(b) Integer format
Program counter (PC) = Address of instruction
Instruction register (IR) = Instruction being executed
Accumulator (AC) = Temporary storage
(c) Internal CPU registers
0001 = Load AC from memory
0010 = Store AC to memory
0101 = Add to AC from memory
(d) Partial list of opcodes
Figure1.3 Characteristics of a Hypothetical Machine
Transcribed Image Text:3 4 15 Opcode Address (a) Instruction format 0 1 15 S Magnitude (b) Integer format Program counter (PC) = Address of instruction Instruction register (IR) = Instruction being executed Accumulator (AC) = Temporary storage (c) Internal CPU registers 0001 = Load AC from memory 0010 = Store AC to memory 0101 = Add to AC from memory (d) Partial list of opcodes Figure1.3 Characteristics of a Hypothetical Machine
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Analysis of Performance Measurement
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education