xor

Name

xor — bitwise xor

Syntax

expression xor expression

Domain

xor : Z x Z -> Z

Example

2 xor 4 = 6

Description

Logical xor yields the following bitwise combinations: 0 xor 0 = 0, 0 xor 1 = 1, 1 xor 0 = 1 and 1 xor 1 = 0. If the expressions are not in Z, they are truncated before the bitwise xor is performed.