XOR Calculator (Binary, Decimal, Hex)

Bitwise XOR two values in binary, decimal or hex — see results in all three bases.

Result appears here…

XOR (exclusive or) is a fundamental bitwise operation used constantly in programming, cryptography, and digital logic — this calculates it directly across binary, decimal, and hex representations.

What makes XOR different from AND and OR

XOR returns true only when its two inputs differ — 1 XOR 0 is 1, but 1 XOR 1 is 0. This "differs" property is exactly why XOR is so useful for tasks like toggling bits, detecting changes between two values, and certain lightweight encryption techniques.

Frequently asked questions

Why is XOR used in basic encryption?

XOR is reversible — applying the same XOR operation twice with the same key returns the original value, which makes it a simple (though not secure on its own) building block in some encryption schemes.

What's a practical everyday use of XOR for a developer?

Beyond cryptography, XOR is commonly used for toggling flags, swapping variables without a temporary variable, and detecting differences between binary states in low-level programming.