OR
Instruction
OR
instruction performs a boolean OR
operation between each pair of matching bits in two operands and places the result in the destination.
OR — Inclusive Logical OR |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
OR
instruction is often used to set selected bits and preserve others. We can also use OR
a number with itself (or zero) to obtain certain information about its value. Therefore, you can use OR
instruction instead of CMP
instruction for finding whether or not the operand is zero or negative.
Zero Input Test | Negative Input Test |