in CO and Architecture retagged by
1,531 views
0 votes
0 votes

The addressing mode used in an instruction of the form $ADD\:X\:Y$, is

  1. Direct
  2. Absolute
  3. Indirect
  4. Indexed
in CO and Architecture retagged by
1.5k views

3 Comments

It cannot be direct , absolute or indirect . Therefore and is D
0
0
A,B,C are not possible but i am not sure about D. but acc to question D should be the answer.
0
0
I think Either question is incomplete or Everyone is giving answer because of Official key…

because In question it is not mentioned that what is X and Y. It can be pointers also or it can be memory addresses also...Nothing is mentioned for X and Y…..
0
0

2 Answers

1 vote
1 vote

ADD X, Y is a register addressing mode

But there is no option of register addressing mode. So correct option is Index addressing mode. 

Now we will understand that why it is index addressing mode.

option(A) is direct addressing mode : In direct addressing mode there should me a memory location mention in the operand part of the instruction, but here there is no memory location in operand. So option (A) is wrong.

option (B) is absolute addressing mode: Absolute and direct addressing mode are same i.e direct addressing mode another name is absolute which is also refer memory location in operand part of instruction. So option (B) is also wrong.

option (C) is indirect addressing mode: indirect addressing mode represent pointer. there are register indirect and memory indirect i.e. in operand part of the instruction there should be a register which contain a memory location and the actual data store in that memory location it is also called register indirect addressing mode 

like this ADD @X  or ADD M[X]

and if a memory location contain another memory location and that memory location hold the actual data this is called memory indirect addressing mode. But in the qus there is only registers which directly hold the actual data. So option (C) also wrong.

option (D) is Index Addressing mode:

Here Effective Address = Content of Index Register + Address part of the instruction

and actual data store on this effective address. Index addressing mode represent by Array data structure. Where base address of the array store in the Index register and index of the array mention in the address part of the instruction

for example 

ADD 5(X)

means Effective Address = content of X + 5

if ADD 0(X)

then Effective Address = content of X +0 = content of X

and if we use X in place of (X) then the register contain actual data

also in register addressing mode we directly use the content of register as actual data. 

So here X and Y are index register so this is Index Addressing mode

So the correct answer is Index Addressing Mode i.e option (D)

 

0 votes
0 votes
It is Indexed  Addressing
edited by

1 comment

Give to proper explanation why it's correct or other option False.

Absolute address is wrong.
0
0
Answer:

Related questions