XOR Calculator

Binary XOR Operation Calculator

Calculate XOR (exclusive OR) operations with support for binary, decimal, and hexadecimal formats.

Input Values

XOR Truth Table:
A
B
A XOR B
0
0
0
0
1
1
1
0
1
1
1
0

What is XOR?

XOR (exclusive OR) is a logical operation that outputs true only when inputs differ.

Rule:

0 XOR 0 = 0

0 XOR 1 = 1

1 XOR 0 = 1

1 XOR 1 = 0

Properties:

β€’ Commutative: A XOR B = B XOR A

β€’ Associative: (A XOR B) XOR C = A XOR (B XOR C)

β€’ Self-inverse: A XOR A = 0

β€’ Identity: A XOR 0 = A

Features

  • Binary, decimal, hex support
  • Step-by-step calculation
  • Bit-by-bit XOR operation
  • Multiple output formats
  • XOR truth table
  • Auto-padding for different lengths
  • Copy results
  • Quick examples
  • Input validation

XOR Properties

Commutative:

A βŠ• B = B βŠ• A

Associative:

(A βŠ• B) βŠ• C = A βŠ• (B βŠ• C)

Self-Inverse:

A βŠ• A = 0

Identity:

A βŠ• 0 = A

Common Uses

Encryption:

Simple cipher operations

Error Detection:

Parity checks and checksums

Data Manipulation:

Toggle bits, swap values

Networking:

IP address calculations

Use Cases

  • Cryptography and encryption
  • Error detection and correction
  • Data compression
  • Computer graphics
  • Network protocols
  • Digital circuit design
  • Programming and algorithms
  • Data integrity checks

Applications

Real-World Applications:

Cryptography:

One-time pad encryption, stream ciphers

Networking:

Checksum calculations, RAID systems

Programming:

Swap variables without temp, toggle flags

Hardware:

Digital logic circuits, parity generators