binary_xor()
Learn how to use the binary_xor() function to perform the bitwise xor operation on a pair of values.
Returns a result of the bitwise xor operation of the two values.
Syntax
binary_xor(value1,value2)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| value1 | int | ✔️ | The left-side value of the XOR operation. |
| value2 | int | ✔️ | The right-side value of the XOR operation. |
Returns
Returns logical XOR operation on a pair of numbers: value1 ^ value2.
Examples
binary_xor(1,1)
Output
| Result |
|---|
| 0 |
binary_xor(1,2)
Output
| Result |
|---|
| 3 |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.