XOR Calculator

Compute the bitwise exclusive OR of two integers.

Result (decimal) 6
Result (binary) 110

Formula: result bit = 1 if the bits differ

Step-by-step with your numbers:
1. Values used:
2. a (decimal) = 12
3. b (decimal) = 10
4.
5. Result (decimal) = 6
6. Result (binary) = 110
Did we solve your problem today?

Bitwise XOR sets a 1 wherever the two inputs differ.

The math behind it

Each output bit is 1 only when the two input bits are different (one 0 and one 1).

Worked example

12 (1100) XOR 10 (1010) = 6 (0110).

FAQ

Why is XOR special?

Applying the same XOR twice restores the original value — the basis of simple ciphers and checksums.