ARM > Introduction to ARM > Logical Instructions

by David Thomas on

Logical Instructions

<operation>{cond}{S} Rd,Rn,Operand2

<operation>

  • ANDlogical AND
    • Rd := Rn AND Operand2
  • EORExclusive OR
    • Rd := Rn EOR Operand2
  • ORRlogical OR
    • Rd := Rn OR Operand2
  • BICBitwise Clear
    • Rd := Rn AND NOT Operand2

Examples of Logical Instructions

  • AND r8, r7, r2
    • R8 = R7 & R2
  • ORR r11, r11, #1
    • R11 |= 1
  • BIC r11, r11, #1
    • R11 &= ~1
  • EOR r11, r11, #1
    • R11 ^= 1