# Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Combinational Logic Part 2 Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 860-7554 Office:

## Presentation on theme: "Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Combinational Logic Part 2 Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 860-7554 Office:"— Presentation transcript:

Ahmad Almulhem, KFUPM 2009 COE 202: Digital Logic Design Combinational Logic Part 2 Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 860-7554 Office: 22-324

Objectives Standard Forms Deriving Boolean functions from truth tables Sum of Min Terms Product of Max Terms SOP vs POS Mapping of these expressions into logic circuit implementations Ahmad Almulhem, KFUPM 2009

Standard Forms Ahmad Almulhem, KFUPM 2009 A Boolean function can be written algebraically in a variety of ways Standard form: is a standard algebraic expression of the function: Help simplification procedures and frequently results in more desirable logic circuits (e.g. less number of gates) Standard form: contains product terms and sum terms Product term: X’Y’Z (logical product with AND) Sum term: X + Y + Z’ (logical sum with OR)

Minterms and Maxterms A minterm: a product term in which all variables (or literals) of the function appear exactly once (complemented or not complemented) A maxterm: a sum term in which all the variables (or literals) of the function appear exactly once (complemented or not complemented) A function of n variables – have 2 n possible minterms and 2 n possible maxterms Example: for the function F(X,Y,Z), the term X’Y is not a minterm, but XYZ’ is a minterm The term X’+Z is not a maxterm, but X+Y’+Z’ is maxterm Ahmad Almulhem, KFUPM 2009

Minterms Ahmad Almulhem, KFUPM 2009 Minterms for two variables F(X,Y) XY Product Terms Symbolm0m0 m1m1 m2m2 m3m3 00X’Y’m0m0 1000 01X’Ym1m1 0100 10XY’m2m2 0010 11XYm3m3 0001 Variable complemented if 0 Variable uncomplemented if 1 m i indicated the i th minterm For each binary combination of X and Y there is a minterm The index of the minterm is specified by the binary combination m i is equal to 1 for ONLY THAT combination

Maxterms Ahmad Almulhem, KFUPM 2009 Maxterms for two variables F(X,Y) XYSum TermsSymbolM0M0 M1M1 M2M2 M3M3 00X+YM0M0 0111 01X+Y’M1M1 1011 10X’+YM2M2 1101 11X’+Y’M3M3 1110 Variable complemented if 1 Variable not complemented if 0 M i indicated the i th maxterm For each binary combination of X and Y there is a maxterm The index of the maxterm is specified by the binary combination M i is equal to 0 for ONLY THAT combination

Minterms and Maxterms In general, a function of n variables has 2 n minterms: m 0, m 1, …, m 2 n -1 2 n maxterms: M 0, M 1, …, M 2 n -1 m i ’ = M i or M i ’ = m i Example: for F(X,Y): m 2 = XY’  m 2 ’ = X’+Y = M 2 Ahmad Almulhem, KFUPM 2009

Example Ahmad Almulhem, KFUPM 2009 A Boolean function can be expressed algebraically from a give truth table by forming the logical sum of ALL the minterms that produce 1 in the function Example: XYZmF 000m0m0 1 001m1m1 0 010m2m2 1 011m3m3 0 100m4m4 0 101m5m5 1 110m6m6 0 111m7m7 1 Consider the function defined by the truth table F(X,Y,Z)  3 variables  8 minterms F can be written as F = X’Y’Z’ + X’YZ’ + XY’Z + XYZ, or = m 0 + m 2 + m 5 + m 7 =  m(0,2,5,7)

Example (Cont.) Ahmad Almulhem, KFUPM 2009 A Boolean function can be expressed algebraically from a give truth table by forming the logical product of ALL the maxterms that produce 0 in the function XYZMFF’ 000M0M0 10 001M1M1 01 010M2M2 10 011M3M3 01 100M401 101M5M5 10 110M6M6 01 111M7M7 10 Example: Consider the function defined by the truth table F(X,Y,Z)  in a manner similar to the previous example, F’ can be written as F’ = m 1 + m 3 + m 4 + m 6 =  m(1,3,4,6) Now apply DeMorgan’s rule F = F’’ = [m 1 + m 3 + m 4 + m 6 ]’ = m 1 ’.m 3 ’.m 4 ’.m 6 ’ = M 1.M 3.M 4.M 6 =  M(1,3,4,6) Note the indices in this list are those that are missing from the previous list in  m(0,2,5,7)

Expressing Functions with Minterms and Maxterms F = X. ( Y’ + Z) XYZ 0000 0010 0100 0110 1001 1011 1100 1111 Ahmad Almulhem, KFUPM 2009 F = XY’Z’ + XY’Z + XYZ = m 4 + m 5 + m 7 =  m(4,5,7) F=  M(0,1,2,3,6)

Summary A Boolean function can be expressed algebraically as: The logical sum of minterms The logical product of maxterms Given the truth table, writing F as  m i – for all minterms that produce 1 in the table, or  M i – for all maxterms that produce 0 in the table Another way to obtain the  m i or  M i is to use ALGEBRA – see next example Ahmad Almulhem, KFUPM 2009

Example Ahmad Almulhem, KFUPM 2009 Write E = Y’ + X’Z’ in the form of  m i and  M i ? Solution: Method1 First construct the Truth Table as shown Second: E =  m(0,1,2,4,5), and E =  M(3,6,7) XYZmME 000m0m0 M0M0 1 001m1m1 M1M1 1 010m2m2 M2M2 1 011m3m3 M3M3 0 100m4m4 M41 101m5m5 M5M5 1 110m6m6 M6M6 0 111m7m7 M7M7 0

Example (Cont.) Ahmad Almulhem, KFUPM 2009 Solution: Method2_a E = Y’ + X’Z’ = Y’(X+X’)(Z+Z’) + X’Z’(Y+Y’) = (XY’+X’Y’)(Z+Z’) + X’YZ’+X’Z’Y’ = XY’Z+X’Y’Z+XY’Z’+X’Y’Z’+ X’YZ’+X’Z’Y’ = m 5 + m 1 + m 4 + m 0 + m 2 + m 0 = m 0 + m 1 + m 2 + m 4 + m 5 =  m(0,1,2,4,5) To find the form  Mi, consider the remaining indices E =  M(3,6,7) Solution: Method2_b E = Y’ + X’Z’ E’ = Y(X+Z) = YX + YZ = YX(Z+Z’) + YZ(X+X’) = XYZ+XYZ’+X’YZ E= (X’+Y’+Z’)(X’+Y’+Z)(X+Y’+Z’) = M 7. M 6. M 3 =  M(3,6,7) To find the form  m i, consider the remaining indices E =  m(0,1,2,4,5)

SOP vs POS Boolean function can be represented as Sum of Products (SOP) or as Product of Sums (POS) of their input variables AB+CD = (A+C)(B+C)(A+D)(B+D) The sum of minterms is a special case of the SOP form, where all product terms are minterms The product of maxterms is a special case of the POS form, where all sum terms are maxterms SOP and POS are referred to as the standard forms for representing Boolean functions Ahmad Almulhem, KFUPM 2009

SOP vs POS SOP  POS F = AB + CD = (AB+C)(AB+D) = (A+C)(B+C)(AB+D) = (A+C)(B+C)(A+D)(B+D) Hint 1: Use id15: X+YZ=(X+Y)(X+Z) Hint 2: Factor Ahmad Almulhem, KFUPM 2009 POS  SOP F = (A’+B)(A’+C)(C+D) = (A’+BC)(C+D) = A’C+A’D+BCC+BCD = A’C+A’D+BC+BCD = A’C+A’D+BC Hint 1: Use id15 (X+Y)(X+Z)=X+YZ Hint 2: Multiply

Implementation of SOP Any SOP expression can be implemented using 2- levels of gates The 1 st level consists of AND gates, and the 2 nd level consists of a single OR gate Also called 2-level Circuit Ahmad Almulhem, KFUPM 2009

Implementation of POS Any POS expression can be implemented using 2- levels of gates The 1 st level consists of OR gates, and the 2 nd level consists of a single AND gate Also called 2-level Circuit Ahmad Almulhem, KFUPM 2009

Implementation of SOP Consider F = AB + C(D+E) This expression is NOT in the sum-of-products form Use the identities/algebraic manipulation to convert to a standard form (sum of products), as in F = AB + CD + CE Logic Diagrams: F E C D C B A F C B A E D 3-level circuit2-level circuit Ahmad Almulhem, KFUPM 2009