What Is an XOR Calculator?

An XOR calculator computes the bitwise exclusive OR of two numbers. XOR compares the binary digits of two values and returns 1 wherever the bits differ and 0 wherever they match. It is a fundamental operation in computer science, cryptography, error detection, and digital logic. Enter two numbers in decimal, binary, or hexadecimal, and the calculator returns the XOR result in each base.

How to Use the XOR Calculator

  1. Enter the first number.
  2. Enter the second number.
  3. Choose the base — decimal, binary, or hexadecimal.
  4. Calculate — see the XOR result with its binary representation.

The XOR Truth Table

Bit ABit BA XOR B
000
011
101
110

The result is 1 only when the two bits are different. For example, 5 XOR 3 = 6, because 101 XOR 011 = 110.

Key Properties of XOR

Where XOR Is Used

Frequently Asked Questions

What does XOR mean?

XOR stands for exclusive OR. It compares two bits and returns 1 if they differ and 0 if they are the same.

How do you calculate XOR of two numbers?

Convert both numbers to binary, compare each pair of bits, and output 1 where they differ. For example, 5 XOR 3 = 6 because 101 XOR 011 = 110.

Why is XOR used in encryption?

XOR is reversible: applying the same key twice returns the original data. This makes it the core of simple stream ciphers and key-mixing operations.

What is A XOR A?

Any value XORed with itself is 0, because every bit matches its own value. Likewise, A XOR 0 leaves A unchanged.

Is this XOR calculator free?

Yes — it is completely free, requires no signup, and works in decimal, binary, and hex.