44 views

Consider a $32$-bit system with an instruction of size of four words. The first half of the instruction contains the OPCODE and second half contains an address-field. The instruction is stored in memory with base-address B. The address-field contains a value A. The operand is stored at memory location P. The addressing mode employed is Relative-addressing mode. What is the relation between P and B?

1. P=(B+1)+M[A]
2. P=(B+2)+M[A]
3. P=(B+3)+M[A]
4. P=(B+4)+M[A]
edited | 44 views

+1 vote
Since the relative addressing mode is used this means content of PC is to be added to the address field. Since the PC is incremented to the instruction and since each instruction is of length 4 words, PC points instruction at position $[B+4]$ and this content is added to memory address $A$, i.e. M[A].

1
2