Effective Address Calculation for 20(R1) and -(R2) Addressing Modes

Effective Address Calculation for 20(R1) and -(R2) Addressing Modes

Verified Sources
Nov 3, 2026

To find an effective address (EA), you apply the rule for each addressing mode to the contents of the specified register.

Key idea: the displacement (e.g., 20) is added to (or used with) a base register, while pre-decrement (e.g., -(R2)) first modifies the register and then uses the updated value as the EA.

We’ll compute:

  • (i) Load 20(R1), R5
  • (ii) Add –(R2), R5

Let:

  • R1=1200R1 = 1200
  • R2=4600R2 = 4600

Addressing modes involved:

  • Register-Relative Addressing d(Rbase)
  • Displacement d
  • Predecrement Addressing -(R)
  • Effective Address EA

Effective Addressing Modes (Displacement and Predecrement) — Example Walkthrough

(i) Load 20(R1), R5 → EA calculation

For register-relative (base + displacement) addressing of the form d(R1), the effective address is:

EA=R1+dEA = R1 + d

Here, d = 20 and R1 = 1200, so:

EA=1200+20=1220EA = 1200 + 20 = 1220

Therefore, the memory operand in (i) is located at effective address 1220.

Register-Relative Addressing is exactly what this form represents: base register value plus displacement.

(ii) Add –(R2), R5 → EA calculation

The notation -(R2) indicates pre-decrement addressing:

EA=(decremented value of) R2\text{EA} = \text{(decremented value of)}\ R2

So the effective address depends on the decrement amount, which is typically the size of the operand (e.g., 1, 2, 4 bytes) in the target architecture / instruction set.

Most textbook problems implicitly assume a decrement of 1 memory unit when the operand-size detail is not provided. Under that common assumption:

  1. Decrement R2R2 first: R2←4600−1=4599R2 \leftarrow 4600 - 1 = 4599
  2. Use the updated R2R2 as the effective address: EA = 4599 $$

Therefore, under the standard assumption of decrement-by-1: the memory operand in (ii) is located at effective address 4599.

If your course specifies operand size (e.g., byte/word/long), replace the “1” with the architecture’s unit decrement (e.g., 2 or 4). The process stays the same; only the decrement amount changes.

Step-by-step: Compute EA for each instruction

  1. 1
    Step 1

    For (i) use register-relative EA rule EA=R1+dEA=R1+d. For (ii) use predecrement: decrement first, then EAEA equals the updated register.

  2. 2
    Step 2

    Apply EA=1200+20=1220EA = 1200 + 20 = 1220.

  3. 3
    Step 3

    Predecrement first: R2←4600−1=4599R2 \leftarrow 4600 - 1 = 4599 (assuming decrement-by-1), then EA=4599EA = 4599.

Most common assumption in problems like this

When the instruction set’s operand size (byte/word/long) isn’t specified, many architecture homework problems assume predecrement decrements by 1 memory unit. If your course states otherwise, adjust the decrement amount accordingly.

Predecrement requires the decrement amount

The EA for -(R2) is not a single numeric value unless you know how much R2 is decremented (operand size/unit). The base rule is fixed: decrement then use the new register value as EA.

Effective addresses for the two instructions

Computed using R1=1200, R2=4600; (ii) assumes decrement-by-1.

Quick checks & common variants

EA Computation Flashcards

1 / 4
Question · Term

EA for `d(R1)`?

Click to reveal
Answer · Definition

EA=R1+dEA = R1 + d (register-relative/base+displacement).

Knowledge Check

Question 1 of 3
Q1Single choice

For Load 20(R1), R5 with R1=1200R1=1200, what is the effective address?