Philadelphia University Faculty of Information Technology Department of Computer Science Computer Logic Design By Dareen Hamoudeh Dareen Hamoudeh 1 Canonical Forms (Standard Forms of Expression) Minterms and Maxterms Dareen Hamoudeh 2 1
Why STANDARD FORMS? All Boolean expressions, regardless of their form, can be converted into either of two standard forms: the sum-of-products form or the product-of-sums form. Standardization makes the evaluation, simplification, and implementation of Boolean expressions much more systematic and easier. Dareen Hamoudeh 3 Examples Product Terms : Terms that are ANDed together. XYZ (A+B)(C+D)(A+D) Sum Terms: Terms that are ORed together. X+Y+Z XYZ + VX Dareen Hamoudeh 4 2
Minterms So, if we have two literals (x,y) with AND operation then we have 4 combinations: X Y X Y XY XY Each combination is called minterm. Now,For 3 variables we have 2 3 = 8 minterms: X Y Z X Y Z XYZ In general, if a function has n variables there are 2 n minterms. Dareen Hamoudeh 5 Minterms Dareen Hamoudeh 6 3
Minterms If we have the function When does it =1? After implementing its truth table: We notice that f1 =1 in the terms m1, m4, m7 so: Dareen Hamoudeh 7 Minterms Also called sum of products (SOP) or Standard Product expression contains: Only OR (sum) operations at the outermost level. Each term that is summed must be a product of literals: f(x,y,z) = y + x yz + xz Every function can be written as a sum of minterms, which is a special kind of sum of products form. The sum of minterms form for any function is unique. If you have a truth table for a function, you can write a sum of minterms expression just by picking out the rows of the table where the function output is 1. And can be expressed in the following notation: f = x y z + xy z + xyz = m 1 + m 4 + m 7 = f(x,y,z) = m(1,4,7) = f(x,y,z) = (1,4,7) Dareen Hamoudeh 8 4
sum of products (SOP) Now, if we have the following truth table, can you extract the sum of minterms for the function F2. Dareen Hamoudeh sum of products (SOP) The advantage is that any sum of products expression can be implemented using a two-level circuit literals and their complements at the 0th level AND gates at the first level a single OR gate at the second level Dareen Hamoudeh 10 5
sum of products (SOP) complement f = x y z + x y z + x yz + x yz + xyz = m 0 + m 1 + m 2 + m 3 + m 6 = m(0,1,2,3,6) f = xy z + xy z + xyz = m 4 + m 5 + m 7 = m(4,5,7) f contains all the minterms not in f x y z f(x,y,z) f (x,y,z) 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 Dareen Hamoudeh 11 Maxterms if we have two literals (x,y) with OR operation then we have 4 combinations: X +Y X +Y X+Y X+Y Each combination is called maxterm. Now,For 3 variables we have 2 3 = 8 minterms: X +Y +Z X +Y +Z X+Y+Z In general, if a function has n variables there are 2 n maxterms. Dareen Hamoudeh 12 6
Maxterms Dareen Hamoudeh 13 If we have the function Maxterms When does it =0? We notice that f1 =0 in the terms M0, M2, M3, M5,M6 so: F1= (X+Y+Z)(X+Y +Z)(X+Y +Z )(X +Y+Z )(X +Y +Z) = M0. M2. M3. M5. M6 Dareen Hamoudeh 14 7
Maxterms Also called Product of sums (POS) or Standard Sums expression contains: Only AND(product) operations at the outermost level. Each term must be a Sum of literals: f(x,y,z) = y (x + y + z ) (x + z) Every function can be written as a product of maxterms, which is a special kind of products of sums form. The product of maxterms form for any function is unique. If you have a truth table for a function, you can write a product of maxterms expression by picking out the rows of the table where the function output is 0. And can be expressed in the following notation: F = (X+Y+Z)(X+Y +Z)(X+Y +Z )(X +Y+Z )(X +Y +Z) = M0. M2. M3. M5. M6 = F(x,y,z) = ΠM(0,2,3,5,6) = F(x,y,z) = Π(0,2,3,5,6) Dareen Hamoudeh 15 Product of sums (POS) Now, if we have the following truth table, can you extract the Product of maxterms for the function F2. Dareen Hamoudeh 16 8
Product of sums (POS) complement f = (x + y + z)(x + y + z )(x + y + z ) = M 4 M 5 M 7 = ΠM(4,5,7) f = (x + y + z)(x + y + z )(x + y + z) (x + y + z )(x + y + z) = M 0 M 1 M 2 M 3 M 6 = ΠM(0,1,2,3,6) f contains all the maxterms not in f x y z f(x,y,z) f (x,y,z) 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 Dareen Hamoudeh 17 Minterms and maxterms are related Any minterm m i is the complement of the corresponding maxterm M i For example, m 4 = M 4 because (xy z ) = x + y + z Dareen Hamoudeh 18 9
Converting between standard forms We can convert a sum of minterms to a product of maxterms From before f = m(0,1,2,3,6) and f = m(4,5,7) = m 4 + m 5 + m 7 complementing (f ) = (m 4 + m 5 + m 7 ) so f = m 4 m 5 m 7 [ DeMorgan s law ] = M 4 M 5 M 7 [ By the previous page ] = ΠM(4,5,7) In general, just replace the minterms with maxterms, using maxterm numbers that don t appear in the sum of minterms: f = m(0,1,2,3,6) = ΠM(4,5,7) The same thing works for converting from a product of maxterms to a sum of minterms. Dareen Hamoudeh 19 Product of Sums If f(x, y, z) = sum of minterms (0, 1, 4, 5), represent f as a product of maxterms A: product of maxterms(2, 3) B: product of maxterms(2, 3, 6, 7) C: product of maxterms(0, 1, 4, 5) D: product of maxterms(5, 6, 7) Dareen Hamoudeh 20 10
Sum Of Minterms Dareen Hamoudeh 21 Example 1 Express the function F(A,B,C) = AB+A C in minterm notation First term AB misses the variable C, so AND term with (C+C ): AB= AB(C+C ) = ABC + ABC Second term A C misses the variable B so, AND term with (B+B ): A C= A C(B+B )= A BC + A B C Now we combine the terms: F(A,B,C)=ABC + ABC + A BC + A B C = m 7 + m 6 + m 3 + m 1 Dareen Hamoudeh 22 11
Example 2 Express E = Y + X Z in minterm notation. E = (X+X )Y + X Z (Y+Y ) = XY (Z+Z ) + X Y (Z+Z )+X YZ +X Y Z = XY Z+XY Z +X Y Z+X Y Z +X YZ = m 5 + m 4 + m 1 + m 0 + m 2 = m 5 + m 4 + m 2 + m 1 + m 0 Dareen Hamoudeh 23 Product of maxterms Dareen Hamoudeh 24 12
Example 1 Dareen Hamoudeh 25 Example 1 cont. Dareen Hamoudeh 26 13
Note Dareen Hamoudeh 27 14