ITPEC FE Morning October 2018 Question 11

Which of the following is the addressing mode that references data in main memory as shown in the figure below?

Instruction partAddress partAddressMain memory20202525Data

Explanation

Indirect addressing — the address part points to a memory word that holds the address of the data, not the data itself.

Follow the arrows in the figure:

  • •The address part of the instruction holds 20
  • •Main memory at address 20 holds 25, which is the effective address
  • •Main memory at address 25 holds the data

Reaching the operand takes two memory accesses, first for the address and then for the data.

Answer (c)

Why not others:

  • •(a) Direct addressing — the address part is itself the effective address, so the operand would be the value 25 stored at address 20
  • •(b) Indexed addressing — the effective address is the address part plus the contents of an index register; no register appears in the figure
  • •(d) Relative addressing — the effective address is the address part plus the program counter, used for position-independent jumps

Key rule: Count the memory lookups: direct uses the address part as the address, indirect reads an address from memory first, and indexed or relative add a register (index or program counter) to it.

Computer Component · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.