in CO and Architecture edited by
397 views
1 vote
1 vote

Which of the following is displacement addressing mode?

  1. Relative
  2. Indexed
  3. Base
  4. Immediate
in CO and Architecture edited by
by
397 views

4 Answers

3 votes
3 votes
Best answer
Answer of this question should be (C) Base Register Addressing Mode
selected by

4 Comments

@rahul sharma 5

Relative address means an address specified by indicating its distance from another address, called the base address.

example: a relative address might be B+15, B being the base address and 15 the distance (called the offset).

see the diagram http://www.webopedia.com/TERM/R/relative_address.html

This qstn is about displacement addressing mode , Displacement Mode is similar to index mode, except instead of a index register a base register will be used.  So thats why the answer is base register addr mode.

2
2

"Relative address means an address specified by indicating its distance from another address, called the base address.

Displacement Mode is similar to index mode, except instead of a index register a base register will be used.  So that's why the answer is base register addr mode."

Sir, is it about the base address in one case and base register in another? Have I highlighted the correct words above which differentiate both the modes and make index mode similar to displacement mode?
 

A register is used in index mode similar to displacement mode, so index mode is the answer,am I right?

1
1

shraddha priya

you should read all the comments before and after .

Because of base register  Base Register Addressing Mode is the answer.

Displacement is done by base register address + constant ( that offset value ) 

The difference between index mode and displacement mode is in the number of bits used to represent the constant. When the constant is represented a number of bits to access the memory, then we have index mode. Index mode is more appropriate for array accessing; displacement mode is more appropriate for structure (records) accessing.

2
2
1 vote
1 vote

Displacement Addressing are

  1. Indexed Addressing
  2. Base Indexed Addressing
  3. Relative Addressing
0 votes
0 votes
CAN U COMMENT ABOUT RELATIVE ONE . WHY IT NOT B ?

4 Comments

Relative address means an address specified by indicating its distance from the Base address. There is a base address and we add offset to it.

But in  displacement addressing mode - Base register contains a pointer to a memory location. An integer value or constant is indicating as a displacement. The address of the operand is obtained by adding the contents of the base register plus the constant . So there is a base register.

This base register is missing in Relative mode.

0
0
so sir what is base index mode?
0
0

hem chandra

The based indexed addressing modes are  combinations of the register indirect addressing modes.

These addressing modes form the offset by  a base register (bx or bp) or an index register (si or di).

Example :

MOV BX, 100H
MOV SI, 200H

so we can say base index mode is a kind of register indirect addressing mode, which is option C here .

0
0
0 votes
0 votes

Displacement Mode

Similar to index mode, except instead of an index register a base register will be used. Base register contains a pointer to a memory location. An integer (constant) is also referred to as a displacement. The address of the operand is obtained by adding the contents of the base register plus the constant. The difference between index mode and displacement mode is in the number of bits used to represent the constant. When the constant is represented a number of bits to access the memory, then we have index mode. Index mode is more appropriate for array accessing; displacement mode is more appropriate for structure (records) accessing.

Source: http://www.cs.iit.edu/~cs561/cs350/addressing/addsclm.html


I have bolded up the important text.

As per that, displacement mode is when you use a base register instead of an index register.

=> In Indexed mode, the index (ie the shift) is stored in the register, while base is constant.

But in Displacement mode, the index (ie the shift) is a constant, while the base is present in the register.

Something like this:

The upper one is Indexed mode (Register acts as index) the lower one is Base Register mode (Register acts as base address) — also called the displacement mode.

Answer:

Related questions