Which of the following is/are true of the auto-increment addressing mode? It…
20092008
Which of the following is/are true of the auto-increment addressing mode?
It is useful in creating self-relocating code.
If it is included in an Instruction Set Architecture, then an additional ALU is required for effective address calculation.
The amount of increment depends on the size of the data item accessed.
Answer: C. III only — ConceptRegister-indirect auto-increment addressing treats an address register as a pointer: the processor uses the current register value as the effective…
- A.
I only
- B.
II only
- C.
III only
- D.
II and III only
Attempted by 260 students.
Show answer & explanation
Correct answer: C
Concept
Register-indirect auto-increment addressing treats an address register as a pointer: the processor uses the current register value as the effective address, accesses memory, and then advances the register by one operand width.
This makes the mode useful for traversing arrays or other sequential data. It is different from PC-relative relocation, and the post-access pointer update does not by itself require a separate effective-address ALU.
Application
Statement I: Self-relocating code normally relies on PC-relative addressing, because moving both the instruction and its target preserves their displacement. Advancing a data pointer after an access does not provide that relocation property.
Statement II: The register already contains the effective address, so the access uses EA ← R. The later pointer update R ← R + d can be scheduled on an existing arithmetic path; including the mode in an ISA does not inherently require an additional ALU for effective-address calculation.
Statement III: The pointer must advance to the next object. For a byte operand, d = 1 byte; for a 32-bit operand, d = 4 bytes. Therefore the increment depends on the size of the accessed data item.
Cross-check
Starting from address 100, two byte accesses use addresses 100 and 101, whereas two 32-bit accesses use 100 and 104. This pointer trace confirms the size-dependent stride while leaving relocation and datapath implementation as separate issues.
Therefore, Statement III alone is true.
A video solution is available for this question — log in and enroll to watch it.
Explore the full course: Iocl Engineers Officers Grade A Paper 2