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
this page, which is the electrical engineering notation:
False
True
NOT x
x AND y
x OR y
x XOR y

0
1

The precedence is
AND (high), XOR (medium), OR (low).
Examples:
x + y z means
x y z means
x + y z means

xy
x+y
xy

1 Basic laws
1.0 Constants
NOT:

AND:

OR:

XOR:

0 = 1
1 = 0

00 = 0
01 = 0

0+0 = 0
0+1 = 1

00 = 0
01 = 1

10 = 0
11 = 1

1+0 = 1
1+1 = 1

10 = 1
11 = 0

1.1 Constant and variable


NOT:

AND:

OR:

XOR:

(None)

0x = 0
1x = x

0+x = x
1+x = 1

0x = x

1x = x

x + (y z)
x (y z)
x + (y z)

1.2 One variable


NOT:
= x
x

AND:

OR:

XOR:

xx = x
= 0
xx

x+x = x
= 1
x+x

xx = 0
= 1
xx

1.3 XOR
XOR can be defined in terms of AND, OR, NOT:
y)
x y = (x y) + (x
+ y)
x y = (x + y) (x

x y = (x + y) (x
y)

1.4 Various
AND
OR
XOR

Commutativity
xy = yx
x+y = y+x
xy = yx

Associativity
(x y) z = x (y z)
(x + y) + z = x + (y + z)
(x y) z = x (y z)

1.5 De Morgans laws


NAND
NOR

xy = x
+ y
x+
y = x
y

Distributivity
x (y + z) = (x y) + (x z)
x + (y z) = (x + y) (x + z)
x (y z) = (x y) (x z)

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+xy = x

x (x + y) = x

Proof:
x+xy

Proof:
x (x + y)

= x1+xy
= x (1 + y)

= (x + 0) (x + y)
= x + (0 y)

= x1
= x

= x+0
= x

2.1 (No name)


y = x+y
x+x

+ y) = x y
x (x

x y + x y = x

(x + y) (x + y) = x

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

Proof:
+ y)
x (x
+xy
= xx
= 0+xy
= xy

Proof:
x y + x y
= x (y + y)
= x1
= x

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

2.2 Consensus
z+yz = xy+x
z
xy+x

+ z) (y + z) = (x + y) (x
+ z)
(x + y) (x

Proof:

Proof:

z+yz
xy+x
z+1yz
= xy+x
z + (x + x
) y z
= xy+x
z+xyz+x
yz
= xy+x
z+x
yz
= xy+xyz+x
1z+x
yz
= xy1+xyz+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
+ z) (x
+ y + z)
= (x + y) (x + y + z) (x
+ 0 + z) (x
+ y + z)
= (x + y + 0) (x + y + z) (x

z (1 + y)
= x y (1 + z) + x
z1
= xy1+x
z
= xy+x

+ z + 0 y)
= (x + y + 0 z) (x
+ z + 0)
= (x + y + 0) (x
+ z)
= (x + y) (x

You might also like