You are on page 1of 2

Name: Wayne Hans Camacho IT150-8

FOPI01
ASS 2.2
1. Suppose we have the instruction Load 1000. Given that memory and register R1 contain
the values below:
Memory
1000
1400
… R1 200

1100 400

1200 1000


1100
1300

1300
1400

Assuming R1 is implied in the indexed addressing mode, determine the actual value loaded into
the accumulator and fill in the table below:

Mode Value Loaded into AC


Immediate
Direct
Indirect
Indexed

Answer:
Immediate Addressing Mode: is so-named because the value to be referenced immediately
follows the operation code in the instruction.
Direct Addressing Mode: Mode: is so-named because the value to be referenced is obtained by
specifying its memory address directly in the instruction.
Indirect Addressing mode: In this mode, the bits in the address field specify a memory address
that is to be used as a pointer. The effective address of the operand is found by going to this
address.
Indexed Addressing mode: A index register (either explicitly or implicitly designated) is used to
store an offset, which is added to the operand resulting in the effective address of the data.
From the given information, the following results have generated:

Mode Value Loaded into AC


Immediate 1000
Direct 1400
Indirect 1300
Indexed 1000

2. Convert The Following Expressions from Reverse Polish Notation to Infix Notation.

a. W X Y Z – + x

Answer: W x (X+(Y-Z))

b. U V W X Y Z + x + x +

Answer: U + (V x (W + (X x (Y + Z))))

c. X Y Z + V W – x Z + +

Answer: X + {[(Y + Z) x (V – W)] + Z} or X + (Y + Z) x (V – W) + Z

You might also like