Introduction to Digital Logic Missouri S&T University CPE 2210 Boolean Algebra Egemen K. Çetinkaya Egemen K. Çetinkaya Department of Electrical & Computer Engineering Missouri University of Science and Technology cetinkayae@mst.edu http://web.mst.edu/~cetinkayae/teaching/cpe2210fall2016 2 September 2016 rev. 16.0 2014 2016 Egemen K. Çetinkaya
Introduction Boolean algebra Summary Boolean Algebra Outline 2
Logic Gates Motivation Switches are fine to build simple circuits Gates help design of complex logic circuits Three basic gates: 3
Logic Gates Basic Gates Switches are fine to build simple circuits Gates help design of complex logic circuits Three basic gates: AND OR NOT 4
Logic Gates AND Gate Output is 1 if only both inputs are 1 Symbol: Truth table: x y AND F x y F???????????? 5
Logic Gates AND Gate Output is 1 if only both inputs are 1 Symbol: Truth table: x y AND F x y F 0 0 0 0 1 0 1 0 0 1 1 1 6
Logic Gates OR Gate Output is 1 if one input is 1 Symbol: Truth table: x y OR F x y F???????????? 7
Logic Gates OR Gate Output is 1 if one input is 1 Symbol: Truth table: x y OR F x y F 0 0 0 0 1 1 1 0 1 1 1 1 8
Also known as inverter Symbol: Truth table: x Logic Gates NOT Gate N O T F x F???? 9
Also known as inverter Symbol: Truth table: x Logic Gates NOT Gate N O T F x F 0 1 1 0 10
Boolean Algebra Operators Basic operators (more later) Name Symbol Example How to say not or a or ā a prime complement of a inverse of a and or a b a b product of a and b ab or + a + b sum of a and b a or b Note that expression in () must be done first 11
F(a,b,c)=ab+c+ac What are the variables? What are the literals? Boolean Algebra Operators Example What are the product terms? 12
F(a,b,c)=ab+c+ac Variables: a, b, c Literals: a, b, c, a, c Product terms: ab, c, ac Boolean Algebra Operators Example 13
Boolean Algebra Sum-of-Products Form Equation written as OR of product terms Examples: Following are in sum-of-products form ab + a c a + b + cde Following are not in sum-of-products form (a+b)c (a ) + b variable should be complemented or uncomplemented form 14
Properties of Boolean Algebra Commutativity Commutative a + b = b + a a b = a b Remember order to the logic gates does not matter 15
Properties of Boolean Algebra Distributivity Distributive a (b + c) = a b + a c a + (b c) = (a + b) (a + c) Remember has precedence over + Second one is tricky 16
Properties of Boolean Algebra Associativity Associative a (b c) = (a b) c a + (b + c) = (a + b) + c 17
Properties of Boolean Algebra Identity Identity a + 0 = 0 + a = a a 1 = 1 a = a Result of (a OR 0) depends on value of a Result of (a AND 1) depends on value of a 18
Properties of Boolean Algebra Complementery Complement a + a = 1 a a = 0 Result of (a OR a ) is always 1 Result of (a AND a ) is always 0 19
Properties of Boolean Algebra Null Elements Null elements a + 1 = 1 a 0 = 0 Result of (a OR 1) is always 1 Result of (a AND 0) is always 0 20
Properties of Boolean Algebra Idempotent Law Idempotent law a + a = a a a = a Result of (a OR a) depends on a Result of (a AND a) depends on a 21
Properties of Boolean Algebra Involution Law Involution law (a ) = a Double negation result itself 22
Properties of Boolean Algebra DeMorgan s Law DeMorgan s law (a + b) = a b (ab) = a + b Complement of sum equals product of complements Complement of product equals sum of complements DeMorgan s law applies to any number of variables (a+b+c) = a b c (abcd) = a + b + c + d 23
Properties of Boolean Algebra Absorption Law Absorption law a + ab = a a (a + b) = a Proof of first equation a + ab = a 1 + a b = a (1 + b) = a 1 = a Proof of second equation a (a + b) = a a + a b = a + (ab) = a 24
Theorem Properties of Boolean Algebra Theorem a + a b = a + b a (a + b) = ab Proof of first equation a + a b = (a + a ) (a + b) = 1 (a + b) = a + b first part via distributive property Proof of second equation a (a + b) = a a + a b = 0 + ab = ab 25
F=x yz+x yz +xz Boolean Algebra Example 1 Draw the corresponding circuit with logic gates Simplify the equation and redraw 26
F=xy +x zy Boolean Algebra Example 2 Draw the corresponding circuit with logic gates Simplify the equation and redraw 27
F=(x+y)(x +z)(y+z) Boolean Algebra Example 3 Draw the corresponding circuit with logic gates Simplify the equation and redraw 28
Boolean Algebra Example 29
Boolean Algebra Example 30
Boolean Algebra Example 31
Boolean Algebra Summary Understand the important Boolean algebra properties commutativity distributivity associativity identity complementery null elements idempotent law involution law DeMorgan s law absorption law 32
References and Further Reading [V2011] Frank Vahid, Digital Design with RTL Design, VHDL, and Verilog, 2nd edition, Wiley, 2011. [BV2009] Stephen Brown and Zvonko Vranesic, Fundamentals of Digital Logic with VHDL Design, 3rd edition, McGraw-Hill, 2009. [MKM2016] M. Morris Mano, Charles R. Kime, Tom Martin, Logic and Computer Design Fundamentals, 5th edition, Pearson, 2016. [W2006] John F. Wakerly, Digital Design Principles and Practices, 4th edition, Prentice Hall, 2006. 33
End of Foils 34