XOR Operation:
From: | To: |
The XOR (exclusive OR) operation is a logical operation that outputs true only when inputs differ. For binary numbers, it returns 1 if the bits are different and 0 if they are the same.
The XOR operation follows these rules:
For multi-bit binary numbers, XOR is performed bit by bit:
Details: XOR is widely used in cryptography, error detection, digital circuits, and computer graphics. It's fundamental in many encryption algorithms and parity checks.
Tips: Enter two binary numbers (containing only 0s and 1s). The calculator will perform bitwise XOR operation and display the result in binary.
Q1: What happens if inputs are different lengths?
A: The calculator automatically pads the shorter number with leading zeros to match lengths before performing XOR.
Q2: Can I XOR non-binary numbers?
A: No, this calculator only accepts binary inputs (0s and 1s). For decimal numbers, convert to binary first.
Q3: What's the difference between XOR and OR?
A: OR returns 1 if either or both bits are 1. XOR returns 1 only if exactly one bit is 1.
Q4: Is XOR reversible?
A: Yes, applying XOR twice with the same value returns the original number (A XOR B XOR B = A).
Q5: How is XOR used in cryptography?
A: XOR is used in stream ciphers where plaintext is XORed with a pseudorandom keystream to produce ciphertext.