BITNOT function
The BITNOT numeric function performs a bitwise complement on the binary representation of a number.
Syntax
BITNOT takes an integer value and returns the result of performing the bitwise complement on the binary representation of the number. The result is INTEGER unless either parameter is NULL, in which case the result is NULL.
For example:
BITNOT(7)
returns -8
,
as shown by this worked example: Binary Decimal
00...0111 7
NOT
_________
11...1000 -8