BITNOT( ) Function

Example   See Also

Returns the result of a bitwise NOT operation performed on a numeric value.

Syntax

BITNOT(nExpression)

Returns

Numeric

Arguments

nExpression

Specifies the numeric value on which the bitwise NOT operation is performed. If nExpression is not an integer, it is converted to an integer before its bits are shifted.

Remarks

BITNOT( ) returns the bitwise complement of nExpression. The numeric value returned by BITNOT( ) represents nExpression with each bit of value 0 switched to 1 and each bit of value 1 switched to 0.

The following table shows the result of a bitwise NOT operation on nExpression:

nExpression bit Resulting bit
0 1
1 0