UNPKG

900 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function bitNot
4
5Bitwise NOT value, `~x`.
6For matrices, the function is evaluated element wise.
7For units, the function is evaluated on the best prefix base.
8
9
10## Syntax
11
12```js
13math.bitNot(x)
14```
15
16### Parameters
17
18Parameter | Type | Description
19--------- | ---- | -----------
20`x` | number &#124; BigNumber &#124; Array &#124; Matrix | Value to not
21
22### Returns
23
24Type | Description
25---- | -----------
26number &#124; BigNumber &#124; Array &#124; Matrix | NOT of `x`
27
28
29## Examples
30
31```js
32math.bitNot(1) // returns number -2
33
34math.bitNot([2, -3, 4]) // returns Array [-3, 2, 5]
35```
36
37
38## See also
39
40[bitAnd](bitAnd.md),
41[bitOr](bitOr.md),
42[bitXor](bitXor.md),
43[leftShift](leftShift.md),
44[rightArithShift](rightArithShift.md),
45[rightLogShift](rightLogShift.md)