The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
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]
asked in CO & Architecture by Boss (15.3k points)
edited by | 44 views

1 Answer

+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].
answered by Boss (15.3k points)
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
47,929 questions
52,326 answers
182,372 comments
67,797 users