
8/7/2018 Lect 07 Outline • Boolean Functions Boolean Functions: Canonical Form and Minimization –Truth Table Conversion and Vice Versa • Canonical form of Function CS221: Digital Design –SOP and POS Dr. A. Sahu • Gray Code and Hamming Distances Dept of Comp. Sc. & Engg. • K‐Maps Indian Institute of Technology Guwahati 1 2 Converting among Representations Converting among Representations Q: Convert to equation Q: Convert to equation abcFTerm 0000 abFTerm 0010 001a’b’ 0100 011a’b 0110 100 1000 110 1011 ab’c 1101 abc’ F = ab’c + abc’ + abc F = a’b’ + a’b 1111abc Converting among Representations Standard Representation Q: Convert to truth table: F = a’b’ + a’b • How to determine two functions are Inputs Output the same? • Use algebraic methods a b a’b’ a’b F • But if we failed, does that prove not 00101 equal? No. 01011 • Solution: Convert to truth tables 10000 –Only ONE truth table representation of given same functions: Standard 11000 representation 1 8/7/2018 Standard Representation: Truth Table Only ONE truth table representation of given Represent TT in efficiently/elegantly? same functions: Standard representation • Truth tables too big for numerous inputs // F=ab+a’ F=a’b’+a’b+ab • Use standard form of equation instead abF abF – Known as canonical form – English meaning of “Canonical” : simplest 0 0 1 0 0 1 a or standard in mathematics 011 011 • Regular algebra: group terms of polynomial by 100 100 power 111 111 – ax2 + bx + c – (3x2 + 4x + 2x2 + 3 + 1 Î 5x2 + 4x + 4) Boolean Algebra Canonical Form Canonical Form ‐‐ Sum of Minterms • Truth tables too big for numerous inputs Determine if F(a,b)=ab+a’ is same function as • Use standard form of equation instead: F(a,b) = a’b’+a’b+ab by to canonical form. Canonical • Boolean algebra: create sum of minterms F = ab+a’ (already sum of products) – Minterm: product term with every function a literal appearing exactly once, in true or F = ab + a’(b+b’) (expanding term) complemented form – Just multiply‐out equation until sum of product terms F = ab + a’b + a’b’ (it is canonical form) – Then expand each term until all terms are Minterm: product term with every function literal minterms appearing exactly once, in true or complemented form Canonical form and Standard Form Canonical Forms • Canonical forms • It is useful to specify Boolean functions – Sum of minterms (SOM) – Product of maxterms (POM) in a form that: • Standard forms (may use less gates) – Allows comparison for equality. – Sum of products ()(SOP) – Has a correspondence to the truth tables – Product of sums (POS) • Canonical Forms in common usage: • SOP form may not be in Canonical Form – Sum of Minterms (SOM) F = ab+a’ (already sum of products:SOP) – Product of Maxterms (POM) F = ab + a’(b+b’) (expanding term) F = ab + a’b + a’b’ (it is canonical form:SOM) 2 8/7/2018 Minterms in SOP Minterms • Product term is a term where literals are • Function with n variables has 2n minterms ANDed • A minterm equals 1 at exactly one input – Example: x’y’, xz, xyz, … combination and is equal to 0 otherwise • minterm : A product term in which all – Example: x’y’z’ = 1 only when x=0, y=0, z=0 • variables appear exactly once, in normal Minterm is denoted as mi where i corresponds or complemented form the input combination at which this minterm is equal to 1 – Example: F(x,y,z) has 8 minterms x’y’z’, x’y’z, x’yz’, … Example: 2 Variable Minterms Maxterms • Maxterms are OR terms with every variable in • Two variables (X and Y) produce 2x2=4 true or complemented form. combinations X+Y (both normal) XY (both normal) X+Y’ (x normal, y complemented) XY’ (X normal, Y complemented) X’+Y (x complemented, y normal) X’Y (X complemented, Y normal) X’+Y’ (both complemented) X’Y’ (both complemented) Maxterms and Minterms Minterms : three variables XY Z Term Symbol m0 m1 m2 m3 m4 m5 m6 m7 • Two variable minterms and maxterms. 000x’y’z’m0 10000000 Index Minterm Maxterm 001x’y’zm1 01000000 0x’ y’ x + y 010x’yz’m2 00100000 011x’yzm 00010000 1 x ‘y x + y’ 3 100xy’z’ m4 00001000 2x y’ x’ + y 101xy’zm5 00000100 3x yx’ + y’ 110xyz’m6 00000010 • The index above is important for describing which 111xyzm7 00000001 variables in the terms are true and which are th complemented. mi indicated the i minterm i indicates the binary combination Variable complemented if 0 m is equal to 1 for ONLY THAT combination Variable uncomplemented if 1 i 3 8/7/2018 Maxterms in POS Maxterms • Sum term : A term where literals are ORed. • Function with n variables has 2n maxterms • Example: x’+y’, x+z, x+y+z, … • A maxterm equals 0 at exactly one input • Maxterm : a sum term in which all variables combination and is equal to 1 otherwize appear exactly once, in normal or • Example: (x+y+z) = 0 only when x=0, y=0, complemented form z=0 • Example: F(x,y,z) has 8 maxterms • A maxterm is denoted as Mi where i (x+y+z), (x+y+z’), (x+y’+z), … corresponds the input combination at which this maxterm is equal to 0 Maxterms : three variable XY ZTerm Sym Expressing Functions with Minterms M0 M1 M2 M3 M4 M5 M6 M7 • Boolean function can be expressed algebraically from 0 0 0 X+Y+Z M0 0 1111111 a give truth table 0 0 1 X+Y+Z’ M1 1 0 111111 • Forming sum of ALL the minterms that produce 1 01 0X+Y’+Z M 110 11111 2 in the function XY ZmF 01 1X+Y’+Z’M3 1110 1111 EElxample : CCidhfionsider the function 0 0 0 m0 1 10 0X’+Y+Z M4 11110 111 defined by the truth table 001m1 0 10 1X’+Y+Z’M5 111110 11 010m2 1 11 0X’+Y’+ZM6 1111110 1 F(X,Y,Z)= X’Y’Z’ + X’YZ’ + XY’Z + 011m3 0 XYZ 100m 0 11 1X’+Y’+Z’M7 11111110 4 = m0 + m2 + m5 + m7 101m 1 M indicated the ith maxterm i indicates 5 i = ∑m(0, 2, 5, 7) the binary combination Mi is equal to 0 110m6 0 Variable complemented if 1 for ONLY THAT combination 111m 1 Variable not complemented if 0 7 Expressing Functions with Maxterms Sum of Minterms vs Product of • Boolean function : Expressed algebraically from a Maxterms give truth table • A function can be expressed algebraically as: • By forming logical product (AND) of ALL the maxterms that produce 0 in the function • The sum of minterms Example: XY ZMFF’ • The product of maxterms Consider the function defined by the 000M0 1 0 • Given the truth table, writing F as 0 0 1 M1 0 1 truth table 010M 1 0 2 • ∑mi –for all minterms that produce 1 in the table, F(X,Y,Z) = Π M(1,3,4,6) 011M 0 1 3 or Applying DeMorgan 100M4 01 101M5 10 • ΠMi –for all maxterms that produce 0 in the table F’ = m1 + m3 + m4 + m6= ∑ m(1,3,4,6) 110M6 01 • Minterms and Maxterms are complement of F = F’’ = [m1 + m3 + m4 + m6]’ 111M7 10 = m ’.m ’.m ’.m ’ each other. 1 3 4 6 Note the indices in this list are those that = M1.M3.M4.M6 are missing from the previous list in = Π M(1,3,4,6) Σm(0,2,5,7) 4 8/7/2018 Example: minterm & maxterm Example (Cont.) Solution: Method2_a Solution: Method2_b E = Y’ + X’Z’ E = Y’ + X’Z’ • Write E = Y’ + X’Z’ in the = Y’(X+X’)(Z+Z’) + ’Z’(Y+Y’) E’ = Y(X+Z) XY ZmME = (XY’+X’Y’)(Z+Z’) + X’YZ’+ = YX + YZ form of ∑mi and ΠMi? 000m M 1 0 0 X’Z’Y’ = YX(Z+Z’) + YZ(X+X’) • Method1 0 0 1 m M 1 1 1 = Y’Z+ X’Y’Z+ XY’Z’+ X’Y’Z’+ = XYZ+XYZ’+X’YZ 010m M 1 First construct the Truth Table 2 2 X’YZ’+X’Z’Y’ E = 011m M 0 as shown 3 3 = m5 + m1 + m4 + m0 + m2 + m0 (X’+Y’+Z’)(X’+Y’+Z)(X+Y’+Z’) 100m4 M4 1 = m + m + m + m + m = M . M . M E = ∑m(0,1,2,4,5), and 0 1 2 4 5 7 6 3 101m5 M5 1 = ∑ m(0,1,2,4,5) = ΠM(3,6,7) E = M(3,6,7) 110m6 M6 0 Π To find the form ΠMi, consider the To find the form Smi, consider 111m7 M7 0 remaining indices the remaining indices E = ΠM(3,6,7) E = ∑ m(0,1,2,4,5) Canonical Forms Standard Forms • The sum of minterms and the product of • Sum of Products (SOP) and Product of Sums maxterms forms are known as the canonical (POS) are also standard forms forms of a function. • AB+CD = (A+C)(B+C)(A+D)(B+D) • The sum of min‐terms is a specia l case of ttehe SOP form, where all product terms are min‐ terms • The product of max‐terms is a special case of the POS form, where all sum terms are max‐ terms SOP and POS Conversion Implementation of SOP F(X,Y,Z) = XZ+Y’Z+X’YZ SOP Æ POS POS Æ SOP • Any SOP expression can be implemented using 2- levels of gates F = AB + CD F = (A’+B)(A’+C)(C+D) • The 1st level consists of = (AB+C)(AB+D) = (A’+BC)(C+D) AND gates, and the 2nd = (A+C)(B+C)(AB+D) = A’C+A’D+BCC+BCD level consists of a single = (A+C)(B+C)(A+D)(B+D) = A’C+A’D+BC+BCD OR gate = A’C+A’D+BC • Also called 2-level Hint 1: Use id15: X+YZ=(X+Y)(X+Z) Circuit Hint 1: Use id15 (X+Y)(X+Z)=X+YZ Hint 2: Factor Hint 2: Multiply 5 8/7/2018 Implementation of SOP Implementation of POS • Consider F = AB + C(D+E) F(X,Y,Z) = (X+Z)(Y’+Z)(X’+Y+Z) • This expression is NOT in the sum-of-products form • Any POS expression can • Use the identities/algebraic manipulation to convert to a be implemented using 2- standard form (sum of products), as in F = AB + CD + CE levels of gates • Logic Diagrams: • The 1st level consists of nd A OR gates, and the 2 A B level consists of a single B C F F AND gate C D C • Also called 2-level D E Circuit E 3‐level circuit 2‐level circuit Canonical Forms Simplification: Theorem method E = ∑ m(0,1,2,4,5) • It is useful to specify Boolean functions = m + m + m + m + m in a form that: 0 1 2 4 5 = m5 + m1 + m4 + m0 + m2 + m0 – Allows comparison for equality.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages9 Page
-
File Size-