XOR Calculator
Use the XOR calculator to perform a bitwise XOR operation on two numbers. You can input data in binary, decimal, or octal representations. If you want to perform bitwise AND or bitwise OR operations, our bitwise calculator may be the right tool for you.
Continue reading to learn:
 What is XOR operation?
 How to calculate the XOR of two numbers?
 What are the applications of XOR logic operation?
What is the XOR operation?
XOR or eXclusive OR is a logical operation that compares the input values (bits) and generates the output value (bit). The exclusive OR logic is very simple. If the input values are the same, the output is 0
(or false). If the input values are different, the result is 1
(or true).
There are various symbols used for the XOR operation, for example ⊕, ^, XOR, or EXOR. The Boolean expression for the XOR operation is:

$A \cdot \overline{B} + \overline{A} \cdot B = Y$; or

$A\oplus B = Y$
To implement a binary XOR operation in electronic circuits, we use XOR gates. In the next section, we will see what an XOR gate is.
The XOR gate
The XOR (or exclusiveOR) gate is a combination of OR, AND, and NOT gates (see figure 1). The output of an XOR logic gate is high (1
) when either of the inputs is high (1
). If both the inputs are high (1
) or both the inputs are low (0
), the output is low (0
).
Figure 2 shows the logic symbol of the XOR gate.
To know more about other logic gates, check out the logic gate calculator.
Exclusive OR truth table
The following table shows the truth table of binary XOR (exclusive OR) operation between two inputs A and B (A XOR B).
A  B  Output (Y) 

0  0  0 
0  1  1 
1  0  1 
1  1  0 
You can see from the truth table that the XOR operation is binary addition if we neglect to take into account the carries. Therefore, the XOR operation is also called mod2 addition.
In the given truth table, we have only considered XOR operation on two single bits. However, we need to perform a bitwise XOR operation when dealing with bit vectors (e.g., a byte).
How to calculate the XOR of two numbers?
To understand the bitwise eXclusive OR logic operation, let us calculate the XOR of two numbers, 80
and 100
.

First, we will express both the numbers into the binary representation:
 The 8bit binary representation of
80
is0101 0000
.  The 8bit binary representation of
100
is0110 0100
.
It is imperative that both the numbers are of equal bit length.
 The 8bit binary representation of

Now, we will find the XOR of each pair of corresponding bits, from the first to the last, using the rule:
 If both bits are the same, i.e.,
1
(or0
), the output bit is0
.  If both bits are different, the output is
1
.
 If both bits are the same, i.e.,

For example, the first bit pair is
0⊕0
, the output bit will be0
. Similarly, we can determine the output bit for all the pairs.
XOR operation:  

0101 0000  
0110 0100  
=  0011 0100 
 Hence, the result of XOR operation on
80
and100
is0011 0100
.
If you are interested in more complex logical operations like bit shift, we recommend checking out the bit shift calculator.
How to use the XOR calculator?
Now let us see how we can use the XOR calculator to calculate the XOR of two numbers:

Using the dropdown menu, choose the number of bits in the binary representation. We will choose 8 bits, as it allows the decimal numbers between 128 and 127.

Choose the input data type as decimal. The bitwise XOR calculator allows you to enter numbers in the binary, decimal, and octal systems.

Now enter the numbers
80
and100
in the fields Number 1 and Number 2, respectively. 
The bitwise XOR calculator will give the result of XOR operation in the binary (
0011 0100
), decimal (52
), and octal systems (64
).
Applications of XOR logic operation
The XOR logic operation is widely used in digital electronic circuits and computer programming. Some of the common applications of XOR logic are:

Cryptography: XOR logic is extensively implemented in encryption methods.

Error detection: The XOR logic gives the output
0
if an even number of input bits are1
(even parity), and it gives the result1
if an odd number of input bits are1
(odd parity). Therefore, we use the XOR logic to detect the parity of transmitted data. This technic helps to determine if the data has been corrupted while sending digital information. 
RAID data protection: By arranging the hard drives in such a way that one of the drives contains the XOR of all the others, RAID (redundant arrays of inexpensive disks) systems restore corrupted drives.

Adder circuit: XOR logic gates are widely used in computer circuits to perform basic arithmetic operations like addition and subtraction.
FAQ
What does bitwise XOR mean?
In bitwise XOR operation on two binary numbers, we compare a pair of individual bits in corresponding positions. The output bit is 1 if only one of the input bits is 1. Otherwise, it is zero.
How do I find the XOR of two numbers?
To find the XOR of two numbers, follow these instructions:
 Convert the numbers into the binary representation.
 Compare the corresponding bits of the two numbers.
 If only one of the input bits is true (1), the output is true (1). Otherwise, the output is false (0).
How do I find the XOR of three binary numbers?
To find the XOR of three or more binary numbers, compare their corresponding bits according to the given rule:
 If an odd number of input bits is true (1), the XOR output is true (1).
 If an even number of input bits is true (1), the XOR output is false (0).
What is the truth table for 3 input XOR operation?
The truth table for 3input XOR operation, i.e., A XOR B XOR C is given below:
A  B  C  A XOR B XOR C 

1  1  1  1 
1  1  0  0 
1  0  1  0 
1  0  0  1 
0  1  1  0 
0  1  0  1 
0  0  1  1 
0  0  0  0 