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
View worked solution
Answer: C
Let's analyze each statement regarding the auto-increment addressing mode:
- Statement I: "It is useful in creating self-relocating code"
False. Self-relocating code requires addresses to be specified relative to the Program Counter (PC-relative addressing mode), allowing the program to run correctly regardless of its physical memory location. Auto-increment mode is primarily used for sequential access of data structures (like arrays) and does not assist in code relocation. - Statement II: "If it is included in an Instruction Set Architecture, then an additional ALU is required for effective address calculation"
False. While an extra hardware adder/incrementer in the address generation unit can speed up the process, it is not a strict requirement. The main ALU can be reused during a separate clock cycle to perform the increment operation. - Statement III: "The amount of increment depends on the size of the data item accessed"
True. To point to the next consecutive element in memory, the register must be incremented by the size of the data item accessed. For example, if the operand size is 1 byte, the register is incremented by 1; if it is a 4-byte word, the register is incremented by 4.
Therefore, only statement III is true.
Free practice · Your answers on this page are not saved.
