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