Function bitNot
Bitwise NOT value, ~x.
For matrices, the function is evaluated element wise.
For units, the function is evaluated on the best prefix base.
Syntax
bitNot(x)
Parameters
| Parameter | Type | Description |
|---|---|---|
x |
number | BigNumber | Array | Matrix | Value to not |
Returns
| Type | Description |
|---|---|
| number | BigNumber | Array | Matrix | NOT of x |
Examples
bitNot(1); // returns number -2
bitNot([2, -3, 4]); // returns Array [-3, 2, 5]
See also
bitAnd, bitOr, bitXor, leftShift, rightArithShift, rightLogShift