Consider the following statements: S1: Computer uses addressing mode technique…
Consider the following statements:
S1: Computer uses addressing mode technique for giving program versatility to user by providing facilities as a pointer to memory counters for loop control
S2: Computer uses addressing mode technique for specifying rules for modifying or interpreting address field of the instruction
Choose the correct option.
Answer: C. Both S1 and S2 are true — Answer: Both statements are true. Why the first statement is true: Addressing modes provide pointer-like facilities that programmers and compilers use for…
- A.
Only S1 is true
- B.
Only S2 is true
- C.
Both S1 and S2 are true
- D.
Both S1 and S2 are false
Attempted by 37 students.
Show answer & explanation
Correct answer: C
Answer: Both statements are true.
Why the first statement is true: Addressing modes provide pointer-like facilities that programmers and compilers use for loop control and iteration.
Register indirect and memory indirect addressing let an instruction use a register or memory location as a pointer to data.
Auto-increment/decrement modes update the pointer automatically, which is useful for stepping through array elements or loop counters.
Why the second statement is true: Addressing modes formally specify how to interpret or modify the address field of an instruction to produce the effective address used for memory access.
Immediate mode uses the operand value in the instruction itself.
Direct and indirect modes either use the address given or treat it as a pointer to the real address.
Indexed and base+offset modes combine registers and constants to compute the effective address.
Combined conclusion: Addressing modes both give practical pointer-like mechanisms used in programming (supporting the first statement) and define the formal rules for deriving effective addresses from instruction fields (supporting the second statement).