You are on page 1of 3

Boolean algebra laws

Nayuki Minase 2012-05-10


http://nayuki.eigenstate.org/page/boolean- algebra- laws

0 Notation
The following notation is used for Boolean algebra on The precedence is
this page, which is the electrical engineering notation: AND (high), XOR (medium), OR (low).
False 0
Examples:
True 1
x + y ⋅ z means x + (y ⋅ z)
NOT x x̄
x ⊕ y ⋅ z means x ⊕ (y ⋅ z)
x AND y x⋅y
x + y ⊕ z means x + (y ⊕ z)
x OR y x+y
x XOR y x⊕y

1 Basic laws

1.0 Constants
NOT: AND: OR: XOR:
0̄ = 1 0⋅0 = 0 0+0 = 0 0⊕0 = 0
1̄ = 0 0⋅1 = 0 0+1 = 1 0⊕1 = 1
1⋅0 = 0 1+0 = 1 1⊕0 = 1
1⋅1 = 1 1+1 = 1 1⊕1 = 0

1.1 Constant and variable


NOT: AND: OR: XOR:
(None) 0⋅x = 0 0+x = x 0⊕x = x
1⋅x = x 1+x = 1 1 ⊕ x = x̄
1.2 One variable
NOT: AND: OR: XOR:
¯ = x
x̄ x⋅x = x x+x = x x⊕x = 0
x ⋅ x̄ = 0 x + x̄ = 1 x ⊕ x̄ = 1

1.3 XOR
XOR can be defined in terms of AND, OR, NOT:
x ⊕ y = (x ⋅ ȳ ) + (x̄ ⋅ y)
x ⊕ y = (x + y) ⋅ (x̄ + ȳ )
x ⊕ y = (x + y) ⋅ ¯(x
¯¯¯¯¯¯
⋅ y)¯

1.4 Various
Commutativity Associativity Distributivity
AND x⋅y = y⋅x (x ⋅ y) ⋅ z = x ⋅ (y ⋅ z) x ⋅ (y + z) = (x ⋅ y) + (x ⋅ z)
OR x+y = y+x (x + y) + z = x + (y + z) x + (y ⋅ z) = (x + y) ⋅ (x + z)
XOR x⊕y = y⊕x (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z) x ⋅ (y ⊕ z) = (x ⋅ y) ⊕ (x ⋅ z)

1.5 De Morgan’s laws


NAND ¯x¯¯¯⋅¯y¯ = x̄ + ȳ
NOR ¯x¯¯¯+¯¯¯y¯ = x̄ ⋅ ȳ
2 Redundancy laws
The following laws will be proved with the basic laws.
Counterintuitively, it is sometimes necessary to complicate the formula before simplifying it.

2.0 Absorption
x+x⋅y = x x ⋅ (x + y) = x
Proof: Proof:
x+x⋅y x ⋅ (x + y)
= x⋅1+x⋅y = (x + 0) ⋅ (x + y)
= x ⋅ (1 + y) = x + (0 ⋅ y)
= x⋅1 = x+0
= x = x

2.1 (No name)


x + x̄ ⋅ y = x + y x ⋅ (x̄ + y) = x ⋅ y x ⋅ y + x ⋅ ȳ = x (x + y) ⋅ (x + ȳ ) = x
Proof: Proof: Proof: Proof:
x + x̄ ⋅ y x ⋅ (x̄ + y) x ⋅ y + x ⋅ ȳ (x + y) ⋅ (x + ȳ )
= (x + x̄) ⋅ (x + y) = x ⋅ x̄ + x ⋅ y = x ⋅ (y + ȳ ) = x + (y ⋅ ȳ )
= 1 ⋅ (x + y) = 0+x⋅y = x⋅1 = x+0
= x+y = x⋅y = x = x

2.2 Consensus
x ⋅ y + x̄ ⋅ z + y ⋅ z = x ⋅ y + x̄ ⋅ z (x + y) ⋅ (x̄ + z) ⋅ (y + z) = (x + y) ⋅ (x̄ + z)
Proof: Proof:
x ⋅ y + x̄ ⋅ z + y ⋅ z (x + y) ⋅ (x̄ + z) ⋅ (y + z)
= x ⋅ y + x̄ ⋅ z + 1 ⋅ y ⋅ z = (x + y) ⋅ (x̄ + z) ⋅ (0 + y + z)
= x ⋅ y + x̄ ⋅ z + (x + x̄) ⋅ y ⋅ z = (x + y) ⋅ (x̄ + z) ⋅ (x ⋅ x̄ + y + z)
= x ⋅ y + x̄ ⋅ z + x ⋅ y ⋅ z + 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) ⋅ (x + y + z) ⋅ (x̄ + z) ⋅ (x̄ + y + z)
= x ⋅ y ⋅ 1 + x ⋅ y ⋅ z + x̄ ⋅ 1 ⋅ z + x̄ ⋅ y ⋅ z = (x + y + 0) ⋅ (x + y + z) ⋅ (x̄ + 0 + z) ⋅ (x̄ + y + z)
= x ⋅ y ⋅ (1 + z) + x̄ ⋅ z ⋅ (1 + y) = (x + y + 0 ⋅ z) ⋅ (x̄ + z + 0 ⋅ y)
= x ⋅ y ⋅ 1 + x̄ ⋅ z ⋅ 1 = (x + y + 0) ⋅ (x̄ + z + 0)
= x ⋅ y + x̄ ⋅ z = (x + y) ⋅ (x̄ + z)

You might also like