Skip to main content

xor

Use xor to compute the bitwise exclusive OR (xor) operation between two integer arguments.

Basic syntax

To compute the bitwise XOR operation between two integers, use the following syntax:

(xor oper1 oper2)

Arguments

Use the following arguments to specify the integers for the bitwise XOR operation using the xor Pact function.

ArgumentTypeDescription
oper1integerSpecifies the first integer for the XOR operation.
oper2integerSpecifies the second integer for the XOR operation.

Return value

The xor function returns the result of the bitwise XOR operation as an integer.

Examples

The following examples demonstrate how to use the xor function to compute the bitwise XOR operation between two integers:

(xor 127 64)
63

(xor 5 -7)
-4