Here is a bitwise xor calculator, for performing an xor (exclusive or) between the bits of two numbers converted to 32-bit binary. In a bitwise xor, a binary digit will only be set to 1 if one number has a 1 in a spot, but not if both do.
Bitwise Xor Calculator
Using the Bitwise Exclusive Or Calculator
To use the bitwise xor calculator, enter two numbers to xor in the "Number One" and "Number Two" fields in the tool. Once happy with the inputs, click the "Calculate Bitwise Xor" button.
The result of the bitwise xor will show up in the "Xor'd Number" field, converted to integer:
Bitwise Xor Example
Behind the scenes, the tool converts the numbers to 32-bit binary numbers, then goes digit by digit and xors the two numbers together – that is, only sets a 1 when a single digit in either number is 1.
Let's do an example together, xoring the numbers 4 and 5 as shown in the screenshot.
5\oplus4=4\\or\\ 101\oplus100=001\ (1)
Shown above, the tool converted the numbers 5 and 4 to the binary numbers 101 and 100. Moving in either direction, you can see the 4s digit and the 1s digit were both 1s for the 5, which is a 0 in an xor. The 5 gave us a 1 for the 1s digit that didn't exist in the 4, so we are left with 001, or 1 in binary.
Other Binary Calculator
Try our other binary math calculators: