exclusiveOR
exclusiveOR, also known as XOR (exclusive or) or logical exclusive or, is a binary operation that returns true only when its two input operands differ. In Boolean algebra it is often denoted by the symbol ⊕ or by "!=" in programming languages. For values A and B, the result is true if exactly one of A or B is true, otherwise it is false. The truth table for exclusiveOR lists the following outcomes: when A=0 and B=0 the result is 0; when A=0 and B=1 it is 1; when A=1 and B=0 it is 1; and when A=1 and B=1 it is 0.
Everyday applications of exclusiveOR include error detection and correction schemes, such as parity checks, where the
Mathematically, exclusiveOR is associative and commutative, behaves like addition modulo two, and blends nicely with other