Boolean algebra laws

Notation

The following notation is used for Boolean algebra on this page, which is the electrical engineering notation:

The precedence from high to low is AND, XOR, OR. Examples:

Basic laws

Constants

Constant and variable

One variable

XOR

XOR can be defined in terms of AND, OR, NOT:

Commutativity

Associativity

Distributivity

De Morgan’s laws

Redundancy laws

The following laws will be proved with the basic laws. Counter-intuitively, it is sometimes necessary to complicate the formula before simplifying it.

Absorption

x + x · y = x
Proof:
x + x · y
= x · 1 + x · y
= x · (1 + y)
= x · 1
= x
x · (x + y) = x
Proof:
x · (x + y)
= (x + 0) · (x + y)
= x + (0 · y)
= x + 0
= x

No name

x + x · y = x + y
Proof:
x + x · y
= (x + x) · (x + y)
= 1 · (x + y)
= x + y
x · (x + y) = x · y
Proof:
x · (x + y)
= x · x + x · y
= 0 + x · y
= x · y
x · y + x · y = x
Proof:
x · y + x · y
= x · (y + y)
= x · 1
= x
(x + y) · (x + y) = x
Proof:
(x + y) · (x + y)
= x + (y · y)
= x + 0
= x

Consensus

x · y + x · z + y · z = x · y + x · z
Proof:
x · y + x · z + y · z
= x · y + x · z + 1 · y · z
= x · y + x · z + (x + x) · y · z
= x · y + x · z + x · y · z + x · y · z
= x · y + x · y · z + x · z + x · y · z
= x · y · 1 + x · y · z + x · 1 · z + x · y · z
= x · y · (1 + z) + x · z · (1 + y)
= x · y · 1 + x · z · 1
= x · y + x · z
(x + y) · (x + z) · (y + z) = (x + y) · (x + z)
Proof:
(x + y) · (x + z) · (y + z)
= (x + y) · (x + z) · (0 + y + z)
= (x + y) · (x + z) · (x · x + y + z)
= (x + y) · (x + z) · (x + y + z) · (x + y + z)
= (x + y) · (x + y + z) · (x + z) · (x + y + z)
= (x + y + 0) · (x + y + z) · (x + 0 + z) · (x + y + z)
= (x + y + 0 · z) · (x + z + 0 · y)
= (x + y + 0) · (x + z + 0)
= (x + y) · (x + z)

More info



Feedback

Question? Comment? Contact me

ProjectNayuki: Like, comment, follow updates on Facebook