XOR Calculator
Bitwise XOR two hexadecimal values and get the hex result.
Developer Tools Runs in your browser
What does an XOR calculator do?
XOR sets an output bit where the two input bits disagree. Feed the calculator 0xFF and 0x0F and you get 0xF0; the low nibble matches and cancels while the high nibble differs. Because a value XORed with itself is zero and XORing twice restores the original, the operation shows up in checksums, RAID parity and toggle tricks. Both operands accept plain or 0x-prefixed hex.
How to use the XOR Calculator
- 1 Drop the first value into operand A.
- 2 Add the value to XOR against in operand B.
- 3 The exclusive-or shows up in hex below the fields.
- 4 Copy the output for your checksum or mask.
What you can use it for
- Computing quick XOR checksums or parity bits.
- Toggling selected bits in a register value.
- Demonstrating one-time-pad style encryption.
- Diffing two bit fields to spot changes.
Frequently asked questions
What does XOR return?
A 1 wherever the inputs differ, a 0 wherever they match. That makes X XOR X equal 0x0 and X XOR 0x0 equal X, two identities worth memorising.
Why is XOR useful?
It is its own inverse: applying the same key twice returns the original value. Stream ciphers, parity calculations and bit-toggling all lean on that property.
Can I XOR values of different sizes?
Yes. The shorter operand is effectively zero-extended, so 0xF XOR 0x1F0 evaluates cleanly to 0x1FF.
Related tools
More Developer Tools
More tools like this:
All Developer Tools