Introduction to Digital Logic Missouri S&T University CPE 2210 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 7 September 2016 rev. 16.0 2014 2016 Egemen K. Çetinkaya
Introduction Outline Boolean representations Summary 2
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 3
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 4
Also known as inverter Symbol: Truth table: x Logic Gates NOT Gate N O T F x F 0 1 1 0 5
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 6
Boolean Algebra Properties Understand the important Boolean algebra properties commutativity distributivity associativity identity complementery null elements idempotent law involution law DeMorgan s law absorption law 7
Equations Mappings allows simplification e.g. F = x Circuits using logic gates, represents actual physical implementation e.g. Truth tables represents all possible combinations of input values one function has only one truth table representation e.g. x x F 0 1 1 0 F 8
Mapping Conversion Equations to circuits Circuits to equations Equations to truth tables Truth tables to equations Circuits to truth tables Truth tables to circuits 9
Equation: Equations to Circuits mathematical statement Different equations can represent same function We have done previous examples 10
Circuits to Equations A circuit is interconnection of components Boolean functions can be represented via logic gates Different circuits can represent same function Conversion process: start from the circuit s inputs write the output of each gate as an expression We have done examples 11
Equations to Truth Tables Equations to truth tables Truth tables show all input variable combinations A Boolean function has only one truth table Conversion process: create truth table structure fill the output using Boolean algebra if necessary create intermediate columns E.g.: Find the truth table for F=a b+ac+bc 12
Truth Tables to Equations Conversion process: first create a product term for each 1 in the output column then OR all the product terms E.g.: What is the F function? x y F 0 0 0 0 1 0 1 0 1 1 1 1 13
Circuits to Truth Tables Conversion process: first convert circuit to an equation then convert equation to truth table E.g.: Convert the following circuit to truth table? a b F c 14
Truth Tables to Circuits Conversion process: first truth table to an equation then convert equation to circuit E.g.: Convert the truth table to circuit? x y z F 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 15
Terminology Example F(a,b,c)=ab+c+ac What are the variables? What are the literals? What are the product terms? 16
Terminology Example F(a,b,c)=ab+c+ac Variables: a, b, c Literals: a, b, c, a, c Product terms: ab, c, ac 17
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 18
Product-of-Sums Form Equation written as AND of sum terms Examples: Following are in product-of-sums form a (a + c) (a + b) a b (c + d + e) Following are not in sum-of-products form (a b)+c (a ) b variable should be complemented or uncomplemented form 19
Normal Term A product or a sum term no variable appears more than once A nonnormal term can be simplified to a constant or a normal term Nonnormal terms example: abbc, a+a+c, aa b Normal terms example: abc, a +b+c 20
Minterm A product term in which literals include every variable only once, either true or complemented form Example: What are the minterms of the function: F(a,b,c)=ab+abc +ac +c 21
Minterm A product term in which literals include every variable only once, either true or complemented form Example: What are the minterms of the function: F(a,b,c)=ab+abc +ac +c Answer: abc An equation is sum-of-minterms form if: every product term is a minterm Example: F(a,b,c)=abc+ab c+a b c 22
Maxterm A sum term in which literals include every variable only once, either true or complemented form Example: What are the maxterms of the function: F(a,b,c)=(a+b) (a+b+c ) (a+c ) c 23
Maxterm A sum term in which literals include every variable only once, either true or complemented form Example: What are the maxterms of the function: F(a,b,c)=(a+b) (a+b+c ) (a+c ) c Answer: a+b+c An equation is product-of-maxterms form if: every sum term is a maxterm Example: F(a,b,c)=(a+b+c) (a+b +c) (a +b +c ) 24
Minterms and Maxterms Minterm is a product term that is 1 Maxterm is a sum term that is 0 row x y z F minterm maxterm 0 0 0 0 F(0,0,0)?? 1 0 0 1 F(0,0,1)?? 2 0 1 0 F(0,1,0)?? 3 0 1 1 F(0,1,1)?? 4 1 0 0 F(1,0,0)?? 5 1 0 1 F(1,0,1)?? 6 1 1 0 F(1,1,0)?? 7 1 1 1 F(1,1,1)?? 25
Minterms and Maxterms Minterm is a product term that is 1 Maxterm is a sum term that is 0 row x y z F minterm maxterm 0 0 0 0 F(0,0,0) x y z x+y+z 1 0 0 1 F(0,0,1) x y z x+y+z 2 0 1 0 F(0,1,0) x yz x+y +z 3 0 1 1 F(0,1,1) x yz x+y +z 4 1 0 0 F(1,0,0) xy z x +y+z 5 1 0 1 F(1,0,1) xy z x +y+z 6 1 1 0 F(1,1,0) xyz x +y +z 7 1 1 1 F(1,1,1) xyz x +y +z 26
Minterms and Maxterms Example Minterm is a product term that is 1 Maxterm is a sum term that is 0 What is the canonical sum? What is the canonical product? What is the minterm list? What is the maxterm list? row x y F 0 0 0 1 1 0 1 1 2 1 0 0 3 1 1 0 27
Minterms and Maxterms Example Minterm is a product term that is 1 Maxterm is a sum term that is 0 Canonical sum: F=x y +x y Canonical product: F=(x +y) (x +y ) Minterm list: x,y (0,1) row x y F 0 0 0 1 1 0 1 1 2 1 0 0 3 1 1 0 note that book shows m Maxterm list: x,y (2,3) 28
Canonical Form Conversion How do you convert any equation to canonical form? E.g. F(a,b)=ab+b 29
Canonical Form Conversion How do you convert any equation to canonical form? E.g. F(a,b)=ab+b 1. Convert equation to its sum-of-products form 2. Expand each term until every term is a minterm F(a,b)=ab+b (a+a )=ab+ab +a b 30
Multiple Output Multiple output example: can you simplify it? Egemen K. Çetinkaya a b c F G 31
Example Egemen K. Çetinkaya 32
Summary Three Boolean representations: circuits equations truth tables Important terminology variables/literals product term/sum term/sum-of-products/product-of-sums normal term/minterm/maxterm canonical sum (sum-of-minterms) canonical product (product-of-maxterms) 33
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. 34
End of Foils 35