UNPKG

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