2 3.1 DEFINITION OF COMBINATIONAL LOGIC Logic circuits without feedback from output to the input, constructed from a functionally complete gate set, are said to be combinational.Combinational Logic FunctionsInputsOutputs
3 3.1.1 PROBLEM STATEMENTS TO TRUTH TABLES E.g : Conveyor system(P85, Ex. 3.1)M=a’bms+ab’ms+abms
4 3.1.1 PROBLEM STATEMENTS TO TRUTH TABLES E.g. A NASA system(P87, Ex. 3.2)C2C3C1
5 3.1.1 PROBLEM STATEMENTS TO TRUTH TABLES E.g. Conveyor system(P88, ex. 3.4)S3m3S2m2m4S1m1
6 3.1.1 PROBLEM STATEMENTS TO TRUTH TABLES The process of converting a verbal problem statement into a truth table :Determine the input variables and output variables that are involvedAssign mnemonic or letter or number symbols to each variabledetermine the size of the truth table; how many input combinations exist: 2x=y where x=number of input variables and y=number of combinations.Construct a truth table containing all of the input variable combinationsBy careful reading of the problem statement determine the combinations of inputs that cause a given output to be true
7 3.1.1 PROBLEM STATEMENTS TO TRUTH TABLES Exe: Design a truth table to indicate a majority of three inputs is trueI3 I2 I1 O1
8 3.1.2 Deriving Switching Equations DefinitionsProduct term: literals connected by •Sum term: literals connected by +Minterm: a product term in which all the variables appear exactly once, either complemented or uncomplementedMaxterm: a sum term in which all the variables appear exactly once, either complemented or uncomplemented
9 Minterm Represents exactly one combination in the truth table. Denoted by mj, where j is the decimal equivalent of the minterm’s corresponding binary combination (bj).A variable in mj is complemented if its value in bj is 0, otherwise is uncomplemented.M(a,b,m,s)=a’bms+ab’ms+abms(m7) (m11) (m15)
10 Maxterm Represents exactly one combination in the truth table. Denoted by Mj, where j is the decimal equivalent of the maxterm’s corresponding binary combination (bj).A variable in Mj is complemented if its value in bj is 1, otherwise is uncomplemented.F(a,b,c)=(a’+b+c’)(a+b+c’)(a+b’+c’)M M M3
11 Truth Table notation for Minterms and Maxterms 3 variables x,y,z (order is fixed)
12 3.2 Canonical(规范) FormsAny Boolean function F( ) can be expressed as a unique sum of minterms and a unique product of maxterms (under a fixed variable ordering).every function F() has two canonical forms:Canonical Sum-Of-Products (sum of minterms)Canonical Product-Of-Sums (product of maxterms)
13 Convert switching equations to canonical form Expand non-canonical terms by inserting equivalent of 1 in each missing variable x: (x + x’) = 1Remove duplicate mintermsf1(a,b,c) = a’b’c + bc’ + ac’ = a’b’c + (a+a’)bc’ + a(b+b’)c’ = a’b’c + abc’ + a’bc’ + abc’ + ab’c’ = a’b’c + abc’ + a’bc + ab’c’
14 Convert switching equations to canonical form SOPE.g P=f(a,b,c)=ab’+ac’+bc=ab’(c+c’)+ac’ (b+b’)+bc(a+a’)=ab’c+ab’c’+abc’+ab’c’+abc+a’bc=ab’c+ab’c’+abc’+abc+a’bc
15 Convert switching equations to canonical form Expand noncanonical terms by adding 0 in terms of missing variables (e.g., xx’ = 0) and using the distributive lawRemove duplicate maxtermsf1(a,b,c) = (a+b+c)•(b’+c’)•(a’+c’) = (a+b+c)•(aa’+b’+c’)•(a’+bb’+c’) = (a+b+c)•(a+b’+c’)•(a’+b’+c’)• (a’+b+c’)•(a’+b’+c’) = (a+b+c)•(a+b’+c’)•(a’+b’+c’)•(a’+b+c’)
16 Convert switching equations to canonical form POSE.g T=f(a,b,c)=(a+b’)(b’+c)=(a+b’+cc’)(b’+c+aa’)=(a+b’+c) (a+b’+c’)(a+b’+c)(a’+b’+c) =(a+b’+c) (a+b’+c’)(a’+b’+c)
17 Convert switching equations to canonical form Exe:P=f(w,x,y,z)=w’x+yz’T=f(a,b,c,d)=(a+b’+c)(a’+d)Ans:P=f(w,x,y,z)=wxyz’+wx’yz’+w’xyz+w’xyz’+w’xy’z +w’xy’z’+w’x’yz’T=f(a,b,c,d)= (a+b’+c+d) (a+b’+c+d’) (a’+b+c+d) (a’+b’+c+d) (a’+b+c’+d) (a’+b’+c’+d)
18 3.3 GENERATION OF SWITCHING EQUATIONS FROM TRUTH TABLES Canonical Sum-Of-Products: The minterms included are those mj such that F( ) = 1 in row j of the truth table for F( ).Canonical Product-Of-Sums: The maxterms included are those Mj such that F( ) = 0 in row j of the truth table for F( ).
19 ExampleTruth table for f1(a,b,c) at rightThe canonical sum-of-products form for f1 is f1(a,b,c) = m1 + m2 + m4 + m = a’b’c + a’bc’ + ab’c’ + abc’The canonical product-of-sums form for f1 is f1(a,b,c) = M0 • M3 • M5 • M = (a+b+c)•(a+b’+c’)• (a’+b+c’)•(a’+b’+c’).Observe that: mj = Mj’abcf11111111111111111
20 CSE221: Logic Design, Spring 2003 2017/4/24Shorthand: ∑ and ∏f1(a,b,c) = ∑ m(1,2,4,6), where ∑ indicates that this is a sum-of-products form, and m(1,2,4,6) indicates that the minterms to be included are m1, m2, m4, and m6.f1(a,b,c) = ∏ M(0,3,5,7), where ∏ indicates that this is a product-of-sums form, and M(0,3,5,7) indicates that the maxterms to be included are M0, M3, M5, and M7.∑ m(1,2,4,6) = ∏ M(0,3,5,7) = f1(a,b,c)最大项、最小项的十进制简化形式Chapter 2-i: Combinational Logic Circuits (Sections )
21 Conversion Between Canonical Forms Replace ∑ with ∏ (or vice versa) and replace those j’s that appeared in the original form with those that do not.Example: f1(a,b,c) = a’b’c + a’bc’ + ab’c’ + abc’ = m1 + m2 + m4 + m6 = ∑(1,2,4,6) = ∏(0,3,5,7) = (a+b+c)•(a+b’+c’)•(a’+b+c’)•(a’+b’+c’)
22 Karnaugh Maps Why Karnaugh maps？ to simplify boolean equations Karnaugh maps (K-maps) are graphical representations of boolean functions.One map cell corresponds to a row in the truth table.one map cell corresponds to a minterm or a maxterm in the boolean expression
23 CSE221: Logic Design, Spring 2003 Karnaugh Maps2017/4/24m0m1m3m7m5m2m6m4000111101ABm0m3m1m21ABCm0m1m3m5m13m9m4m12m8m6m14m10m7m15m11m2ABCD00011110Logic adjacency : Any two adjacent cells in the map differ by ONLY one.Example: m0 (=x1’x2’) is adjacent to m1 (=x1’x2) and m2 (=x1x2’) but NOT m3 (=x1x2)把真值表中的最小项重新排列成矩阵形式，并且使矩阵的横方向和纵方向的逻辑变量的取值按格雷码的顺序排列相邻是指两个最小项只有一个变量互补，其他变量都相同Chapter 2-i: Combinational Logic Circuits (Sections )
24 2-Variable Map -- Example CSE221: Logic Design, Spring 20032017/4/242-Variable Map -- ExampleE.g.f(x1,x2) = x1’x2’+ x1’x2 + x1x2’ = m0 + m1 + m2What (simpler) function is represented by each dashed rectangle?x1’x2’+ x1’x2 =x1’(x2’+x2)=x1’x1’x2’+ x1x2’=x2’(x1’+x1) =x2’f(x1,x2) =x1’+x2’x2x111211s placed in K-map for specified minterms m0, m1, m2Grouping (ORing) of 1s allows simplification1113Chapter 2-i: Combinational Logic Circuits (Sections )
25 Minimization as SOP using K-map Enter 1s in the K-map for each product term in the functionGroup adjacent K-map cells containing 1s to obtain a product with fewer variables. Groups must be in power of 2 (2, 4, 8, …)Handle “boundary wrap” for K-maps of 3 or more variables.
26 Three-Variable Mapyz00011110xm0m1m3m21321m44m55m776m6-Note: variable ordering is (x,y,z); yz specifies column, x specifies row.-Each cell is adjacent to three other cells (left or right or top or bottom or edge wrap)
27 Three-Variable Map (cont.) mintermThe types of structures that are either minterms or are generated by repeated application of the minimization theorem on a three variable map are shown at right. Groups of 1, 2, 4, 8 are possible.group of 2 termsgroup of 4 terms
29 More Examples f1(x, y, z) = ∑ m(2,3,5,7) f1(x, y, z) = x’y + xz 00011110f1(x, y, z) = ∑ m(2,3,5,7)f2(x, y, z) = ∑ m (0,1,2,3,6)11111f1(x, y, z) = x’y + xzxyz00011110111f2(x, y, z) = x’+yz’111
30 Four-Variable MapsYZWX00011110m0m1m3m200m4m5m7m601m12m13m15m1411m8m9m11m1010Top cells are adjacent to bottom cells. Left-edge cells are adjacent to right-edge cells.Note variable ordering (WXYZ).
31 Four-variable Map Simplification One square represents a minterm of 4 literals.A rectangle of 2 adjacent squares represents a product term of 3 literals.A rectangle of 4 squares represents a product term of 2 literals.A rectangle of 8 squares represents a product term of 1 literal.A rectangle of 16 squares produces a function that is equal to logic 1.
32 ExampleSimplify the following Boolean function (A,B,C,D) = ∑m(0,1,2,3,4,5,6,7,8,10,13).First put the function g( ) into the map, and then group as many 1s as possible.cdab00011110001111110111111111111111111110g(A,B,C,D) = a’+b’d’+bc’d
33 Implicants ,Prime Implicants (PIs) and Essential Prime Implicant (EPI) Implicant: any single mintermPrime Implicant (PI): a group of minterms that cannot be combined with any other minterms or groupsEssential Prime Implicant (EPI): a PI in which one or more miniterms are uniqueHow to find PI and EPI?ABCD000111100011011111111?10BCDABC’A’BC’DAC’D’BD
34 Example a’b’ is not a prime implicant because it is contained in b’. acd is not a prime implicant because it is contained in ad.b’, ad, and a’cd’ are prime implicants.b’, ad, and a’cd’ are essential prime implicants.b’adcd ab11111111a’b’111acda’cd’
35 Another Example Consider f2(a,b,c,d), whose K-map is shown below. The only essential PI is b’d.abcd111111111
36 Systematic Procedure for Simplifying Boolean Functions Load the minterms into the K-map by placing a 1 in the appropriate square.Look for groups of minterms (PI)The group size must be a power of 2Find the largest groups of minterms first, then smaller collections until all groups are found.Find all essential PIs.For remaining min-terms not included in the essential PIs, select a set of other PIs to cover them.The resulting simplified function is the logical OR of the product terms selected above.