ARM > Introduction to ARM > Logical Instructions

by David Thomas on —

Logical Instructions

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

<operation>

  • AND – logical AND
    • Rd := Rn AND Operand2
  • EOR – Exclusive OR
    • Rd := Rn EOR Operand2
  • ORR – logical OR
    • Rd := Rn OR Operand2
  • BIC – Bitwise 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