in CO and Architecture retagged by
14,722 views
56 votes
56 votes

Which of the following statements about relative addressing mode is FALSE?

  1. It enables reduced instruction size
  2. It allows indexing of array element with same instruction
  3. It enables easy relocation of data
  4. It enables faster address calculation than absolute addressing
in CO and Architecture retagged by
14.7k views

3 Comments

can any one give  an example for option A?
0
0
Option (B) is true because Indexed Addressing Mode could be used for accessing array.
3
3
reshown by
@hem Chandra Joshi,

Consider an example of a 6 digit integer variable being represented in actual value form (like int i= 123456) and the same being represented as an element of the array(int i= array[j]).
0
0

3 Answers

84 votes
84 votes
Best answer
  1. is true as instead of absolute address we can use a much smaller relative address in instructions which results in smaller instruction size.
     
  2. By using the base address of array as displacement and index in a base register (base relative addressing mode) we can index array elements using relative addressing. Ref: http://service.scs.carleton.ca/sivarama/asm_book_web/Instructor_copies/ch5_addrmodes.pdf
  3. is true as we only need to change the base address in case of relocation- instructions remain the same.
     
  4. is false. Relative addressing cannot be faster than absolute addressing as absolute address must be calculated from relative address. With specialized hardware unit, this can perform equally as good as absolute addressing but not faster.

Correct Answer: $D$

selected by
by

4 Comments

How can Option B is true. It is written that "It allows indexing of array element with same instruction". We need to change the displacement value/Offset in each instruction whereas in Indexed addressing mode, we pass Offset in Index Register.

0
0
R(1000) is same as 1000(R) -> we can make the base address as the offset and put index in the base register.
1
1

@Arjun sir so that means here relative addressing mode and base register addressing mode are behaving same?
https://www.gatevidyalay.com/addressing-modes/      at this link it says in relative addressing mode we add displacement with Program counter. What is correct?

2
2
9 votes
9 votes

(A) is true as instead of absolute address we can use a much smaller relative address in instructions which results in smaller instruction size.

(B) By using the base address of array we can index array elements using relative addressing.

(C) is true as we only need to change the base address in case of relocation- instructions remain the same.

(D) is false. Relative addressing cannot be faster than absolute addressing as absolute address must be calculated from relative address. With specialized hardware unit, this can perform equally as good as absolute addressing but not faster. 

3 Comments

nice ...
1
1

@Bikram sir kindly write the instruction for B point .How relative addressing used here 

 

0
0
Which of the following statements about relative addressing mode is FALSE ?

D. is false.

Relative addressing cannot be faster than absolute addressing as absolute address must be calculated from relative address. With specialized hardware unit, this can perform equally as good as absolute addressing but not faster.

Correct Answer: D
0
0
1 vote
1 vote
Relative address means an address specified by indicating its distance from another address, called the base address.
In absolute addressing, you specify the actual address (called the absolute address) of a memory location.
Answer:

Related questions