Bitwise OR : Sets $t1 = $t2 | $t3. Each bit of $t1 is 1 if the corresponding bit is 1 in either $t2 or $t3 (or both). Commonly used to set specific bits in a value.
or
Operands
$reg, [$reg / imm], [$reg / imm]Variants
- Bitwise OR : Sets $t1 = $t2 | $t3. Each bit of $t1 is 1 if the corresponding bit is 1 in either $t2 or $t3 (or both). Commonly used to set specific bits in a value. or $t1,$t2,$t3
- OR : set $t1 to ($t2 bitwise-OR 16-bit unsigned immediate) or $t1,$t2,100
- OR : set $t1 to ($t1 bitwise-OR 16-bit unsigned immediate) or $t1,100
# Initialize both inputs, then execute or with initialized inputs. Inspect $t2: 7.
li $t0, 7
li $t1, 3
or $t2, $t0, $t1