For a Boolean expression, returns the opposite value. For an integer expression, does a bitwise NOT operation.
- A Boolean or integer expression.
For Boolean expressions, the table that follows shows how to calculate the result.
||Then the result is|
For numeric expressions, the result of the operator
NOT is the opposite value of each bit.
See the table that follows.
|If the bit in
||Then the bit in the result is|
Note: The logical and bitwise operators have lower precedence than the arithmetic and relational operators. Thus, we recommend that you put parentheses around bitwise operations to make sure they give correct results.
Var pattern As UInt8 = &B11110000 Var inverse = Not pattern