Bitwise Operations
Bitwise Instructions
Bitwise operations manipulate individual bits.
AND Operation
AND Rd, Rn, operandSets bits where both operands have 1:
MOV R0, #12 // 1100 in binary\nMOV R1, #10 // 1010 in binary\nAND R2, R0, R1 // R2 = 8 (1000 in binary)OR Operation
ORR Rd, Rn, operandSets bits where either operand has 1:
MOV R0, #12 // 1100\nMOV R1, #10 // 1010\nORR R2, R0, R1 // R2 = 14 (1110)XOR Operation
EOR Rd, Rn, operandSets bits where operands differ:
MOV R0, #12 // 1100\nMOV R1, #10 // 1010\nEOR R2, R0, R1 // R2 = 6 (0110)