Sunteți pe pagina 1din 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 x xy x+y xy The precedence is AND (high), XOR (medium), OR (low). Examples: x + y z means x y z means x + y z means x + (y z) x (y z) x + (y z)

1 Basic laws
1.0 Constants
NOT: = 1 0 = 0 1 AND: 00 = 0 01 = 0 10 = 0 11 = 1 OR: 0+0 = 0 0+1 = 1 1+0 = 1 1+1 = 1 XOR: 00 = 0 01 = 1 10 = 1 11 = 0

1.1 Constant and variable


NOT: (None) AND: 0x = 0 1x = x OR: 0+x = x 1+x = 1 XOR: 0x = x 1x = x

1.2 One variable


NOT: x = x AND: xx = x xx = 0 OR: x+x = x x+x = 1 XOR: xx = 0 xx = 1

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

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) Distributivity x (y + z) = (x y) + (x z) x + (y z) = (x + y) (x + z) x (y z) = (x y) (x z)

1.5 De Morgans laws


NAND NOR = x + y xy + = x y x y

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 Proof: x+xy = x1+xy = x (1 + y) = x1 = x x (x + y) = x Proof: x (x + y) = (x + 0) (x + y) = x + (0 y) = x+0 = x

2.1 (No name)


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

2.2 Consensus
xy+xz+yz = xy+xz Proof: xy+xz+yz = xy+xz+1yz = x y + x z + (x + x) y z = xy+xz+xyz+xyz = xy+xyz+xz+xyz = xy1+xyz+x1z+xyz = x y (1 + z) + x z (1 + y) = xy1+xz1 = xy+xz (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)

S-ar putea să vă placă și