# Not operator
{: .no_toc }

Used to perform bitwise negation on an expression.

Syntax:
> *result* **=** **Not** *expression*

*result*
: Any numeric variable.

*expression*
: Any expression.

The following table illustrates how *result* is determined:

| If *expression* is | Then *result* is |
|:-----|:-----|
| **True**  | **False** |
| **False** | **True**  |
| **Null**  | **Null**  |

The **Not** operator inverts the bit values of its operand and sets the corresponding bit in *result* according to the following table:

| If bit in *expression* is | Then bit in *result* is |
|:-----:|:-----:|
| 0 | 1 |
| 1 | 0 |

### Example

This example uses the **Not** operator to perform logical negation on an expression.

```tb check_build
Dim A, B, C, D, MyCheck
A = 10: B = 8: C = 6: D = Null    ' Initialize variables.
MyCheck = Not (A > B)    ' Returns False.
MyCheck = Not (B > A)    ' Returns True.
MyCheck = Not (C > D)    ' Returns Null.
MyCheck = Not A          ' Returns -11 (bitwise comparison).
```

### See Also

- [**And** operator](/tB/Core/And.md)
- [**Or** operator](/tB/Core/Or.md)
- [**Xor** operator](/tB/Core/Xor.md)
- [**Eqv** operator](/tB/Core/Eqv.md)
- [**Imp** operator](/tB/Core/Imp.md)
- [**IsNot** operator](/tB/Core/IsNot.md)
- [Operators](/Reference/Operators.md)
