|
Slide 11.3: Conditional jumps (cont.) Slide 11.5: AND instruction Home |
|
AND, OR, XOR, TEST, and NOT, all of which can be used to clear, set, and test bits.
The following table shows selected boolean instructions.
| Operation | Description |
|---|---|
AND
|
The Boolean function which is true only if all its arguments are true. |
OR
|
The Boolean function which is true if any of its arguments are true. |
XOR
|
Exclusive or. “A XOR B” means “A or B, but not both.”
|
NOT
|
The Boolean function which is true only if its input is false. |
TEST
|
TEST sets the flags as AND does, but does not change the bits referenced in the target operand.
|
AND Instruction
AND instruction performs a boolean (bitwise) AND operation between each pair of matching bits in two operands and places the result in the destination operand.
AND — Logical AND |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AND instruction is often used to clear selected bits and preserve others.