retagged by
1,571 views
1 votes
1 votes

A two-word instruction is stored in a location $A$. The operand part of instruction holds $B$. If the addressing mode is relative, the operand is available in location

  1. $A+B+2$
  2. $A+B+1$
  3. $B+1$
  4. $A+B$
retagged by

2 Answers

3 votes
3 votes

In relative addressing mode Effective address= Program counter+ Address specified.

Here Program counter= A+2, Address specified.=B

Effective address= A+2+B

Answer: A

edited by
1 votes
1 votes
It is given that instruction size is 2 words, and it’s starting address is A.
When executing the present instruction program counter gets incremented to the address of the next instruction.
So, latest value in PC=A+2.
In the instruction operand value is B, which is used as a offset for the effective address calculation.
So, Effective address= Program counter + Offset.
Here Program counter= A+2, Offset = B
Effective address= A+2+B
Answer:

Related questions

1 votes
1 votes
3 answers
1
admin asked Mar 30, 2020
4,480 views
Which of the following is/are not features of RISC processor?Large number of addressing modes.Uniform instruction set.(i) Only(ii) OnlyBoth (i) and (ii)None of the option...
2 votes
2 votes
4 answers
2
admin asked Mar 30, 2020
2,626 views
INCA(Increase register A by $1$) is an example of which of the following addressing mode?Immediate addressingIndirect addressingImplied addressingRelative addressing
0 votes
0 votes
4 answers
3
admin asked Mar 30, 2020
1,620 views
In a cache memory if total number of sets are ‘$s$’, then the set offset is:$2^8$$\log_2s$$s^2$$s$
3 votes
3 votes
5 answers
4
admin asked Mar 30, 2020
3,031 views
A stack organized computer has which of the following instructions?zero-addressone-addresstwo-addressthree-address