Bird
Raised Fist0
ARM Architectureknowledge~5 mins

Addressing modes (immediate, register, offset) in ARM Architecture - Cheat Sheet & Quick Revision

Choose your learning style10 modes available
Recall & Review
beginner
What is the immediate addressing mode in ARM architecture?
Immediate addressing mode means the instruction contains the actual value (constant) to be used, not a memory address or register. The value is directly part of the instruction.
Click to reveal answer
beginner
Explain the register addressing mode.
Register addressing mode uses the value stored inside a CPU register as the operand. The instruction specifies which register to use.
Click to reveal answer
intermediate
What does offset addressing mode mean in ARM?
Offset addressing mode calculates the memory address by adding a base register value and an offset (which can be immediate or from another register). This address is then used to access memory.
Click to reveal answer
beginner
Give a real-life example of when you might use immediate addressing mode.
When you want to load a fixed number like 10 or 100 into a register quickly, you use immediate addressing. For example, setting a counter to 10 directly.
Click to reveal answer
intermediate
Why is register addressing mode faster than offset addressing mode?
Register addressing is faster because it uses values already inside the CPU registers, avoiding extra memory access. Offset addressing often requires calculating an address and accessing memory, which takes more time.
Click to reveal answer
In ARM, which addressing mode uses a constant value directly in the instruction?
AOffset addressing
BRegister addressing
CImmediate addressing
DIndirect addressing
Which addressing mode uses a CPU register to hold the operand?
AImmediate addressing
BDirect addressing
COffset addressing
DRegister addressing
Offset addressing mode calculates the memory address by:
AAdding a base register and an offset
BUsing a constant value only
CUsing a register value only
DUsing the program counter
Which addressing mode is generally fastest in ARM?
ARegister addressing
BImmediate addressing
COffset addressing
DMemory addressing
If you want to load the number 5 directly into a register, which addressing mode would you use?
ARegister addressing
BImmediate addressing
COffset addressing
DIndirect addressing
Describe the differences between immediate, register, and offset addressing modes in ARM architecture.
Think about where the operand value comes from in each mode.
You got /3 concepts.
    Explain why register addressing mode is generally faster than offset addressing mode.
    Consider the speed difference between CPU registers and memory.
    You got /3 concepts.

      Practice

      (1/5)
      1. Which addressing mode uses a fixed number directly inside the instruction to provide data?
      easy
      A. Immediate addressing mode
      B. Register addressing mode
      C. Offset addressing mode
      D. Indirect addressing mode

      Solution

      1. Step 1: Understand immediate addressing mode

        Immediate mode means the instruction contains the actual number (constant) to use.
      2. Step 2: Compare with other modes

        Register mode uses CPU registers, offset mode calculates address by adding offset to a register, indirect mode uses memory address stored in a register.
      3. Final Answer:

        Immediate addressing mode -> Option A
      4. Quick Check:

        Fixed number inside instruction = Immediate mode [OK]
      Hint: Immediate mode has the number right inside the instruction [OK]
      Common Mistakes:
      • Confusing immediate with register mode
      • Thinking offset mode uses fixed numbers directly
      • Mixing indirect addressing with immediate
      2. Which of the following is the correct syntax for using register addressing mode in ARM assembly to move data from register R1 to R0?
      easy
      A. MOV R0, [R1]
      B. MOV R0, #R1
      C. MOV R0, R1
      D. MOV [R0], R1

      Solution

      1. Step 1: Understand register addressing syntax

        Register addressing uses register names directly without # or brackets.
      2. Step 2: Analyze options

        MOV R0, R1 uses MOV R0, R1 which copies data from R1 to R0 correctly. MOV R0, #R1 wrongly uses # which means immediate. MOV R0, [R1] uses brackets which means memory access. MOV [R0], R1 tries to move to memory location incorrectly.
      3. Final Answer:

        MOV R0, R1 -> Option C
      4. Quick Check:

        Register names without # or [] = Register mode [OK]
      Hint: Register mode uses register names directly, no # or brackets [OK]
      Common Mistakes:
      • Using # before register name
      • Using brackets [] for register mode
      • Confusing immediate and register syntax
      3. Given the ARM instruction LDR R2, [R3, #4], what does this instruction do?
      medium
      A. Loads the immediate value 4 into R2
      B. Loads the value from memory address in R3 plus 4 into R2
      C. Moves the value from R3 to R2
      D. Stores the value of R2 into memory address R3 plus 4

      Solution

      1. Step 1: Identify addressing mode in LDR instruction

        The syntax [R3, #4] means offset addressing mode: base register R3 plus immediate offset 4.
      2. Step 2: Understand LDR operation

        LDR loads data from memory address calculated by R3 + 4 into register R2.
      3. Final Answer:

        Loads the value from memory address in R3 plus 4 into R2 -> Option B
      4. Quick Check:

        Offset mode loads from (R3 + 4) into R2 [OK]
      Hint: Brackets with # offset means load from memory address plus offset [OK]
      Common Mistakes:
      • Thinking #4 is immediate load into R2
      • Confusing load with store instruction
      • Ignoring the offset in brackets
      4. Identify the error in this ARM instruction using addressing modes: ADD R1, R2, #R3
      medium
      A. Incorrect use of # before register R3
      B. Missing brackets around R3
      C. Wrong destination register
      D. Immediate value cannot be used with ADD

      Solution

      1. Step 1: Analyze the use of # in ARM instructions

        The # symbol is used only before immediate (constant) values, not registers.
      2. Step 2: Check the instruction syntax

        Here #R3 is invalid because R3 is a register, not an immediate value. Correct syntax is ADD R1, R2, R3 without #.
      3. Final Answer:

        Incorrect use of # before register R3 -> Option A
      4. Quick Check:

        # only for constants, not registers [OK]
      Hint: # is only for numbers, never before register names [OK]
      Common Mistakes:
      • Using # before register names
      • Adding brackets unnecessarily
      • Confusing immediate and register operands
      5. You want to load a value from memory address calculated by adding 8 to the value in register R4, then add an immediate value 5 to it and store in R0. Which sequence of ARM instructions correctly uses addressing modes?
      hard
      A. LDR R1, [R4, R5] ADD R0, R1, #8
      B. LDR R0, [R4, #5] ADD R0, R0, #8
      C. LDR R0, [R4] ADD R0, R0, R5
      D. LDR R1, [R4, #8] ADD R0, R1, #5

      Solution

      1. Step 1: Load from memory address R4 + 8

        Use offset addressing mode: LDR R1, [R4, #8] loads from address R4 + 8 into R1.
      2. Step 2: Add immediate 5 to loaded value

        ADD R0, R1, #5 adds immediate 5 to R1 and stores result in R0.
      3. Final Answer:

        LDR R1, [R4, #8] ADD R0, R1, #5 -> Option D
      4. Quick Check:

        Offset load then immediate add = LDR R1, [R4, #8] ADD R0, R1, #5 [OK]
      Hint: Load with offset first, then add immediate value [OK]
      Common Mistakes:
      • Mixing immediate and offset values incorrectly
      • Using register instead of immediate for offset
      • Loading directly into R0 then adding wrong offset
      Recommended

      Ready to prove it?

      Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

      10 questions~5 mineasy hard