xori
Exclusive OR Immediate - 68 00 00 00
xori
Instruction Syntax
Mnemonic | Format | Flags |
xori | rA,rS,UIMM | None |
Instruction Encoding
0
1
1
0
1
0
S
S
S
S
S
A
A
A
A
A
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
Field | Bits | Description |
Primary Opcode | 0-5 | 011010 (0x1A) |
rS | 6-10 | Source register |
rA | 11-15 | Destination register |
UIMM | 16-31 | Unsigned immediate value |
Operation
rA ← (rS) ⊕ UIMM
The exclusive OR of the value in register rS and the unsigned immediate value is placed into register rA.
Note: The xori instruction performs bitwise exclusive OR operation with an immediate value.
Affected Registers
General Purpose Registers (GPRs)
- rA (Destination register)
Examples
Basic Exclusive OR Immediate
xori r3, r1, 0xFF # r3 = r1 ⊕ 0xFF
Bit Manipulation
# Toggle specific bits xori r3, r3, 0x80 # Toggle bit 7 in r3
Register Clearing
# Clear register using XOR with itself xori r3, r3, 0 # r3 = r3 ⊕ 0 (no change)