๐Ÿ‡ฆ๐Ÿ‡บ Free Australian calculators โ€” rates updated for FY2026โ€“27
Maths & Education

XOR (Exclusive OR) Calculator

Work out the bitwise XOR of two binary or decimal values, with the full truth table explained.

๐Ÿ•’ Updated October 2026๐Ÿ‡ฆ๐Ÿ‡บ Australia-specific๐Ÿ’ฏ Free, no signup

๐Ÿงฎ Calculate A XOR B

XOR, short for 'exclusive OR', is a logical/bitwise operation that returns true (or 1) only when its two inputs differ โ€” if both bits are the same (both 0 or both 1), XOR returns 0. This XOR calculator lets you enter two numbers, either in decimal or binary, and instantly computes the bitwise XOR result along with the binary expansion of each value so you can see exactly which bits flipped. It's built for computer science students learning boolean logic and bitwise operators, programmers who need a quick sanity check while debugging bit-manipulation code, and electronics students studying logic gates.

XOR shows up constantly in real applications: simple data encryption (XOR ciphers), error-checking and parity bits, swapping two variables without a temporary variable, toggling bits/flags in low-level programming, and as a fundamental logic gate in digital circuit design. Because it's easy to get confused between XOR, OR, and AND when working by hand, this tool is also useful simply to double-check your own bitwise arithmetic before using it in code or coursework.

How bitwise XOR works

XOR compares two binary numbers bit by bit. For each pair of corresponding bits, the XOR result bit is 1 if exactly one of the two bits is 1, and 0 if the bits are the same (both 0 or both 1). For example, comparing the binary numbers 1100 (12) and 1010 (10) bit by bit: 1โŠ•1=0, 1โŠ•0=1, 0โŠ•1=1, 0โŠ•0=0, giving 0110, which is 6 in decimal. This calculator converts your decimal inputs to binary automatically (or accepts binary directly), pads them to equal length, and applies this bit-by-bit comparison.

The XOR truth table

Because XOR only has two possible input bits (0 or 1), its entire behaviour can be summarised in a short truth table: 0 XOR 0 = 0, 0 XOR 1 = 1, 1 XOR 0 = 1, and 1 XOR 1 = 0. Notice the pattern: the result is 1 exactly when the two inputs are different, which is where the name 'exclusive OR' comes from โ€” unlike plain OR, XOR excludes the case where both inputs are 1.

Frequently asked questions

What is the difference between XOR and OR?+

Plain OR returns 1 if at least one input is 1 (including when both are 1). XOR returns 1 only when the inputs differ โ€” it returns 0 when both inputs are 1, which is the key difference.

How do you calculate XOR by hand?+

Convert both numbers to binary, line up the bits, and for each column write 1 if the two bits differ and 0 if they're the same. Then convert the resulting binary string back to decimal if needed.

Why is XOR used in encryption?+

XOR is reversible: applying the same key twice with XOR returns the original value (A XOR B XOR B = A). This makes it a simple, fast building block for basic ciphers and checksums.

What is 0 XOR 0 and 1 XOR 1?+

Both equal 0, because XOR only returns 1 when the two input bits are different from each other.

General information only. This calculator provides estimates for planning purposes and does not constitute financial, tax, legal or medical advice. Figures are based on publicly available Australian rates and rules current as of October 2026; always confirm specifics with the ATO, a licensed adviser, or the relevant government body before making a decision.

Related calculators