X or (operator)

If both expressions are either Boolean, Boolean variants, or NULL variants, then
a logical exclusion is performed as follows:

If the first
expression is

and the second
expression is

then the
result is

TRUE

TRUE

FALSE

TRUE

FALSE

TRUE

FALSE

TRUE

TRUE

FALSE

FALSE

FALSE

If either expression is Null, then Null is returned.

Binary
Exclusion

If the two expressions are Integer,
then a binary exclusion is performed, returning an Integer
result. All other numeric types (including Empty
variants) are converted to Long, and a
binary exclusion is then performed, returning a Long
result.

Binary exclusion forms a new value based on a
bit-by-bit comparison of the binary representations of the two
expressions according to the following table:

1

Xor

1

=

0

Example

0

Xor

1

=

1

5 01101001

1

Xor

0

=

1

6 10101010

0

Xor

0

=

0

Xor 11000011

Example

This example builds a logic table for the XOR
function and displays it.