GATE CSE 2008 | Question: 33, ISRO2009-80
in CO and Architecture retagged by
11,849 views
49 votes

Which of the following is/are true of the auto-increment addressing mode?

  1. It is useful in creating self-relocating code

  2. If it is included in an Instruction Set Architecture, then an additional ALU is required for effective address calculation

  3. The amount of increment depends on the size of the data item accessed

  1. I only
  2. II only
  3. III only
  4. II and III only
in CO and Architecture retagged by
11.8k views

2 Comments

size of the data item means char data takes 1B, integer takes 2B. so if stored data is in integer data type then auto-increment address will be 300 then 302 then 304...
if the base address is 300.
1
option C) is correct
0

4 Answers

80 votes
 
Best answer

In auto increment addressing mode, the base address is incremented after operand fetch. This is useful in fetching elements from an array. But this has no effect in self-relocating code (where code can be loaded to any address) as this works on the basis of an initial base address. 

An additional ALU is desirable for better execution especially with pipelining, but never a necessity. 

Amount of increment depends on the size of the data item accessed as there is no need to fetch a part of a data. 

So, answer must be C only. 

edited by
by

14 Comments

Sir, without ALU, how ++ or -- operations will be performed
2
it is said "additional ALU"
18
by using counter we can do ++ and -- so no additional circuit is necessary
we know control unit of CPU has both decoder and counter to provide the timing signal
10
but counter is also part of ALU operation in execution phase?
0
sir i think think additional ALU means caacity of alu to perform addition. so accordingly b should be true. How c is true?  

Amount of increment depends on the size of the data item accessed as there is no need to fetch a part of a data.
1

1.self reallocating code required for displacement addressing mode.

2.in auto increment/decrement addressing mode , Register will be automatically incremented or decremented So, ALU is required. But  additional ALU is not required.

31
Some people are saying that we can use counter for increment.

1.So will that counter increment with step size always?

2.We always increment by one or by step size in auto incr addressing mode?
0

rahul sharma 5 , in auto-increment/decrement mode the address of operand register is incremented/decremented by 1,2,4,8 or 16 depending on the opcode.

1
So counter can handle this?
1
"Autoincrement mode automatically increments the contents of a register by a value that corresponds to the size of the accessed operand. Thus , the increment is 1 for byte-sized operands, 2 for 16-bit operands, and 4 for 32-bit operands. The size of the operand is usually specified as part of the operation code of an instruction."

--Computer Organisation by Carl Hamacher
47
a register can be automatically incremented by control signal INC  hence no additional ALU is required
10
For  increment we need a ALU but with the same ALU we can calculate the EA as well
0
using INC control if register is incremented then how it will know the stepsize ??
0
When an operand is accessed, the size of the operand is already known thus the value is incremented by the step size.
0
8 votes
Correct answer (C)

Auto increment mode is used for incrementing and depends on size of data.
4 votes

From Hamcher,

so answer is (C).

0 votes
After determining the effective address, the value in the base register is incremented by the size of the data item that is to be accessed.
For example, (A7)+ would access the content of the address register A7, then increase the address pointer of A7 by 1 (usually 1 word). Within a loop, this addressing mode can be used to step through all the elements of an array or vector.

So, option (C) is right
Answer:

Related questions