Xor Operator
Performs the bitwise Xor operation (exclusive OR) on two expressions.
Syntax
result = expr1 Xor expr2
Parameters
- expr1, expr2
- Specify a numeric value or a variable name.
- result
- Returns an integer.
Result
Returns a result of bitwise Xor operation.
Description
The Xor operator performs the bitwise Xor operation on the values of the operands. Each bit of the result is the Xored value of the corresponding bits of the two operands.
If bit in expr1 is | And bit in expr2 is | The result is |
---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
See Also
And, LShift, Not, Or, Rshift
Xor Operator Example
>print 2 Xor 6
4
>
← X Xqt Statement →