Boolean arithmetic

Boolean

Named after George Boole.

Boolean algebra properties

Associativity

Absorption

de Morgan's laws

Identity

Commutativity

Distributivity

Idempotency

Involution

aka 'double negation'.

Operations

AND

a b y
0 0 0
0 1 0
1 0 0
1 1 1

OR

a b y
0 0 0
0 1 1
1 0 1
1 1 1

XOR

Exclusive OR.

True only when inputs doesn't have the same value.

a b y
0 0 0
0 1 1
1 0 1
1 1 0

NAND

Inverted AND

a b y
0 0 1
0 1 1
1 0 1
1 1 0

NOR

Inverted OR

a b y
0 0 1
0 1 0
1 0 0
1 1 0

XNOR

Inverted XOR.

ie, True when both inputs are the same.

a b y
0 0 1
0 1 0
1 0 0
1 1 1

Universal gates

NAND

NOR

References