Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume that memory cells 101 and 102 and ALU register R currently have values 10, 478, and -15, respectively. Using the instruction set in Figure

Assume that memory cells 101 and 102 and ALU register R currently have values 10, 478, and -15, respectively. Using the instruction set in Figure 6.5, give the contents of memory cells 101 and 102 and ALU register R after completion of each of the following operations. We assume that these operations are executed sequentially starting with (a) and that each subsequent operation starts with the memory-state left at the end of the execution of its immediately preceding operation.

(a) LOAD 102

(b) LOAD 101

(c) STORE 101

(d) INCREMENT 102

(e) SUBTRACT 101

image text in transcribed

FIGURE 6.5 Binary Op CodeOperation Meaning CON(X) R R-CON(X) 0-CON(X) 0001 0010 0011 0100 0101 0110 0111 LOADX STORE X CLEARX ADD X INCREMENT X SUBTRACTX DECREMENT X COMPAREX CON(X) + 1 CON(X) R-CON(X) R if CONX)>R then GT-1 ese0 ifCOn(X) = R then EQ 1 else 0 1000 1001 1010 1011 1100 1101 JUMP X JUMPGT X JUMPEQX JUMPLT X JUMPNEQX Get the next instruction from memory ocationX Get the next instruction from memory location X if G-1 Get the next instruction from memory location X if EQ 1 Get the next instruction from memory location X if LT 1 Get the next instruction from memory location X if EQ 0 Input an integervalue from the standard input device and store into memory cell X Output, in decimal notation, the value stored in memory cell X Stop program execution. INX 1110 OUT X FIGURE 6.5 Binary Op CodeOperation Meaning CON(X) R R-CON(X) 0-CON(X) 0001 0010 0011 0100 0101 0110 0111 LOADX STORE X CLEARX ADD X INCREMENT X SUBTRACTX DECREMENT X COMPAREX CON(X) + 1 CON(X) R-CON(X) R if CONX)>R then GT-1 ese0 ifCOn(X) = R then EQ 1 else 0 1000 1001 1010 1011 1100 1101 JUMP X JUMPGT X JUMPEQX JUMPLT X JUMPNEQX Get the next instruction from memory ocationX Get the next instruction from memory location X if G-1 Get the next instruction from memory location X if EQ 1 Get the next instruction from memory location X if LT 1 Get the next instruction from memory location X if EQ 0 Input an integervalue from the standard input device and store into memory cell X Output, in decimal notation, the value stored in memory cell X Stop program execution. INX 1110 OUT X

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions

Question

2. Identify the purpose of your speech

Answered: 1 week ago