Logic and Computer Design Fundamentals Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations 2-3 Standard Forms There are four types of standard form • • • • Sum of Minterm (SOM) Product of Maxterm (POM) Sum of Product (SOP) Product of Sum (POS) SOM and POM are useful to specify Boolean functions in a form that: • Allows comparison for equality. • Has a correspondence to the truth tables Chapter 2 - Part 1 2 Minterms Given a function: L( D, X , A) DX A Inputs D Outputs X L(D,X,A) A Input variables are D, X, and A Minterms are AND terms with every variable present in either true or complemented form. DXA D’XA’ A’XD DAX’ ….. DX D’A’ X’D A ….. These are NOT Minterm because ….. they are just called products This is still a products: A = A.1 Minterm examples Chapter 2 - Part 1 3 Minterms For function L(D,X,A) How many minterms do we have? Let us give a binary number to each minterm, such for each variable we use 0 or 1, depending on whether it is complemented or not: D X’A (1 0 1)2 = (5)10 D’X’A’ D’X’A D’X A’ D’X A D X’A’ D X’A D X A’ D XA In that case we can see that we will have 23 = 8 Minterms in total (see table) going from D’X’A’ (000) to DXA (111). Minterm examples Chapter 2 - Part 1 4 Minterms for three variables By convention, Minterms are named as m0, m1, …. m7 are named as shown in table below. Also note that m0 = 1 if and if x=0 and y=0 and z= 0 Similarly for all other Minterms Chapter 2 - Part 1 5 Maxterms L( D, X , A) DX A Maxterms are OR terms with every variable in true or complemented form. D’+X+A’ D+X+A D+A+X’ A’+X+D ….. D+X D’+A’ X’+D A ….. These are NOT Maxterm because ….. they are just called SUMs This is still a SUM : A = A+0 Maxterm examples Chapter 2 - Part 1 6 Maxterms for three variables Chapter 2 - Part 1 7 Minterm and Maxterm Relationship Review: DeMorgan's Theorem x · y x y and x y x ×y Two-variable example: M 2 x y and m 2 x·y Thus M2 is the complement of m2 and vice-versa. Since DeMorgan's Theorem holds for n variables, the above holds for terms of n variables giving: M i m i and m i M i Thus Mi is the complement of mi. Chapter 2 - Part 1 8 Functions in terms of Minterms Recall any function is defined by a truth table. From the table we can say that L=1 if (D=0 and X=0 and A=0) or (D=0 and X=0 and A=1) or (D=1 and X=0 and A=0) Any function can be expressed as a sum of Minterms from its truth table. L=1 if D’X’A’ D’X’A D’X A’ D’X A D X’A’ D X’A D X A’ D XA (D=0 and X=0 and A=0) or (D=0 and X=0 and A=1) or (D=1 and X=0 and A=0) Thus in Boolean L = (D’ . X’ . A’) + (D’ . X’ . A) + (D . X’ . A’) L= m0 + m1 + m4 Short hand notation: F1 =m (0,1,4) Chapter 2 - Part 1 9 Minterms and Maxterms L = m0 + m1 + m4 What about L’ ? Also L = (L’ ) ’ From the table we can say that L’ = m2+ m3+ m5+ m6 + m7 D’X’A’ D’X’A D’X A’ Thus L = (L’ ) ’ D’X A D X’A’ L = (m2 + m3+ m5 + m6+ m7 ) ’ D X’A D X A’ Using Demorgans Law: D XA L = m2 ’ . m3 ’ . m5 ’ . m6 ’ . m7 ’ Since mi ’ = Mi L = M2 . M3 . M5 . M6 . M7 L = m0 + m1 + m4 = M2 . M3 . M5 . M6 . M7 L = m (0,1,4) = ΠM(2,3,5,6,7) Chapter 2 - Part 1 10 Conversion of Minterm and Maxterm m(0, 2, 5, 7) = ΠM(1,3,4,6) m(1, 3, 4, 6) = ΠM(0,2,5,7) F XY Z XYZ XY Z XYZ m0 m2 m5 m7 F XY Z XYZ XY Z XYZ m1 m3 m4 m6 F = m (0,2,5,7) = ΠM(1,3,4,6) F = m (1,3,4,6) = ΠM(0,2,5,7) F = m (1,3,4,6) = ΠM(0,2,5,7) = m (0,2,5,7) = ΠM(1,3,4,6) Chapter 2 - Part 1 11 Alternatively: use Truth Table For the function table, the maxterms used are the terms corresponding to the 0's. F(A,B,C)= A+A’B’ ABC 000 001 010 011 100 101 110 111 F 1 1 0 0 1 1 1 1 m0 m1 M2 M3 m4 m5 m6 m7 F = m0. m1. m4. m5. m6. m7 F = M2.M3 = (A+B’+C)(A+B’+C’) 5 variable Example F(A, B, C, D, E) = m2 + m9 + m17 + m23 F(A, B, C, D, E) write in standard form: A’B’C’DE’ + A’BC’D’E + AB’C’D’E + AB’CDE m2 m9 m17 m23 Sum of Minterm(SOM) expression: • F = Σm(2, 9, 17, 23) F = DX + XA ΠM(0,2,3,5,6) Convert non-SOP expression to SOP or POS expression F = AB + C(D+E) = AB + CD + CE NOT in SOP form NOR SOP form IN in SOP form F = AB + C(D+E) = {A + C(D+E) } . {B + C(D+E) } F = {(A+C) . (A+(D+E)) } . {(B+C) . (B+(D+E)) } F = (A+C) . (A+D+E) . (B+C) . (B+D+E) IN in POS form Chapter 2 - Part 1 14 Convert non-SOP expression to SOP expression F AB C ( D E ) AB CD CE The decision whether to use a two-level or multiple-level implementation is complex. no. of gates No. of gate inputs amount of time delay Chapter 2 - Part 1 15 Converting a from SOP to SOM form: F(A,B,C) = A+B’C Write the function as a canonical SOM There are three variables, A, B, and C which we take to be the standard order. To add the missing variables: “ANDing” any term that has a missing variable with a term 1=( X + X’). F=A+B’C = A(B+B’)(C+C’) + B’C(A+A’) = ABC + ABC’ + AB’C + AB’C’ + AB’C + A’B’C = ABC + ABC’ + AB’C + AB’C’ + A’B’C = m7 + m6 + m5 + m4 + m1 = m1 + m4 + m5 + m6 + m7 Converting a from SOP to POM form: F(A,B,C) = A+B’C Any Boolean Function can be expressed as a Product of of Maxterms (POM). • For an expression, apply the second distributive law , then “ORing” terms missing variable x with a term equal to 0=(x.x’) and then applying the distributive law again. F(A,B,C)= A+A’B’ Apply the distributive law: F= A+A’B’ = (A+A’)(A+B’) = 1.(A+B’) Add missing variable C: F= A+B’+CC’ = (A+B’+C)(A+B’+C’) = M2.M3 A Simplification Example Simplify F F( A, B, C) m(1,4,5,6,7) Writing the minterm expression: F = A’ B’ C + A B’ C’ + A B C’ + AB’C + ABC Simplifying using Boolean algebra (add AB’C): F= Simplification of two-level implementation of SOP expression The two implementations for F are shown below – it is quite apparent which is simpler! A B C A B C A B C A B C A B C A F B C F Is there an easier way to simplify. Yes, using k-maps Chapter 2 - Part 1 19