Computer Science, asked by rk8833251, 8 months ago

A two-word instruction is stored in memory at an address designated by the
symbol A. The address field of the instruction (stored at A + 1) is designated by
the symbol Y. The operand used during the execution of the instruction is stored
at an address symbolized by EA. An index register contains the value X. State
how EA is calculated from the other addresses if the addressing mode of the
instruction is ——
A- direct, B- indirect, C- indexed, D-Relative, E- Register indirect
(ii)— Convert the following arithmetic expressions into reverse polish notation:
(i) A+B+C
(ii) A*B/C+D.
Show the intermediate steps.

Answers

Answered by PriyanshuPattnaik
8

Answer:

Hope it helps

Explanation:

Step 1 of 4

The memory reference for the instructions and addresses are designated as shown in the below figure:

Picture 1

• A two-word instruction is stored in the symbol W.

• The address of the symbol is stored in W+1 and it is named as Y.

• W+2 is the address of the next instruction. PC is used to fetch the address of next instruction which is to be executed.

• The operands used by the instruction are addressed by a symbol Z.

• The value specified by the operand is stored in the index register which is named as X.

Now, to get the operands used for the execution, need to determine the symbol Z which is shown below with the addressing modes:

a.

In Direct addressing mode, address field of the instruction directly gives the address of the operand. Therefore Y directly gives the address of Z.

Therefore Z=Y is the direct addressing mode of instruction to calculate the Z.

Answered by steffiaspinno
0

The instruction is mentioned below and the correct addressing model of instruction is (ii)- A*B/C+D

  • So, it appears that X will remain the same in this case, and 2.5 will be the result. Let's take a look at why he'll be charged. As a result, it'll be 7.9. But that's for another post.
  • As a result, following the module, Oh, and we'll multiply that result to see what we get; we'll just end up with Let's see, we've got 69. And now we're going to sign something more.
  • Let's see if Y and Z are ever going to change. So, on 6.9, they'll still be a 10. I'm aware that this is incorrect.  As a result, we'll use an image to cast a why.
Similar questions