122k views
0 votes
How many times does the processor need to refer to memory when it fetches and executes an indirect-address-mode instruction if the instruction is (a) a computation requiring a single operand (b) a branch?

User Melva
by
7.7k points

1 Answer

4 votes

Final answer:

For a computation with a single operand using indirect address mode, the processor requires 3 memory accesses, while an indirect branch instruction requires 2 memory accesses.

Step-by-step explanation:

The number of times a processor needs to refer to memory during the fetch and execution of an indirect-address-mode instruction depends on the type of instruction being executed. The indirect address mode requires multiple memory accesses.

For (a) a computation requiring a single operand, the processor needs to:

  1. Fetch the instruction from memory.
  2. Fetch the address of the operand from memory.
  3. Fetch the actual operand from memory.

So, there are 3 memory accesses required for a computation with a single operand using indirect addressing.

For (b) a branch instruction, the processor needs to:

  1. Fetch the instruction from memory.
  2. Fetch the target address from memory.

2 memory accesses are required for the indirect branch instruction execution.

User Otello
by
8.8k points