XOR Calculator

Perform bitwise exclusive OR (XOR) operations on binary, decimal, and octal numbers

Calculate XOR Operation

XOR Operation Results

00000000
Binary
0
Decimal
0
Octal

Operation: 0 ⊕ 0 = 0

Binary operation: 00000000 ⊕ 00000000 = 00000000

Step-by-Step Calculation

Bit PositionABA ⊕ BExplanation
70000 ⊕ 0 = 0
60000 ⊕ 0 = 0
50000 ⊕ 0 = 0
40000 ⊕ 0 = 0
30000 ⊕ 0 = 0
20000 ⊕ 0 = 0
10000 ⊕ 0 = 0
00000 ⊕ 0 = 0

Example Calculation

XOR of 80 and 100 (8-bit)

Number 1: 80 (decimal) = 01010000 (binary)

Number 2: 100 (decimal) = 01100100 (binary)

XOR Result: 52 (decimal) = 00110100 (binary)

Bit-by-bit XOR

0⊕0=0, 1⊕1=0, 0⊕1=1, 1⊕0=1, 0⊕0=0, 0⊕1=1, 0⊕0=0, 0⊕0=0

Result: 00110100

XOR Truth Table

2-Input XOR (A ⊕ B)

ABA ⊕ B
000
011
101
110

3-Input XOR (A ⊕ B ⊕ C)

ABCResult
0000
0011
0101
0110
1001
1010
1100
1111

XOR Properties

Commutative

A ⊕ B = B ⊕ A

Associative

(A ⊕ B) ⊕ C = A ⊕ (B ⊕ C)

Self-Inverse

A ⊕ A = 0

Identity

A ⊕ 0 = A

Understanding XOR (Exclusive OR) Operation

What is XOR?

XOR (exclusive OR) is a logical operation that compares input bits and produces an output. The result is 1 (true) when the input bits are different, and 0 (false) when they are the same.

XOR Logic Rule

  • If both bits are the same (0,0 or 1,1): output is 0
  • If bits are different (0,1 or 1,0): output is 1
  • For 3+ inputs: result is 1 if odd number of 1s

Boolean Expression

A ⊕ B = A·B̄ + Ā·B

Where Ā means NOT A, B̄ means NOT B

Applications of XOR

Cryptography

Used in encryption algorithms and one-time pads

Error Detection

Parity checking in data transmission

Data Storage

RAID systems for data protection

Computer Arithmetic

Binary addition without carry

XOR vs Other Operations

XOR vs OR: XOR excludes the case where both inputs are 1

XOR vs AND: XOR includes cases where only one input is 1

Also called: Exclusive OR, EXOR, EOR, mod-2 addition