Chapter 8 Writing Source Statements
Expressions 139
Logical operators
Logical operators perform calculation in bit units.
Formats: Example:
operand1 & operand2 ADDRESS & MASK
operand1 ^ operand2 CONST ^ 0b0011110000
operand1 | operand2 VECT | 0b0011110000
~operand -MAIN
Operator Meaning
& Logical AND
^ Exclusive OR
| Logical OR
- Unary negation (1’s complement)