Chapter 3 Combinational Logic Circuits 12 Hours 24 Marks 3.1 Standard representation for logical functions Boolean expressions / logic expressions / logical functions are expressed in terms of logical variables. Logical variables can have value either 0 or 1. The logical functions can be represented in one of the following forms. - Sum of Products form (SOP form) - Product of Sums form (POS form) 3.1.1 Sum of Products (SOP) form In this form, Boolean expression is defined by sum of product terms. Various AND terms are ORed together. Each AND term may be a single variable or a product of multiple variables (each variable may be either in complemented or un-complemented form). Y = AC + A BC + B Here, Y is represented in SOP form with three terms. First AND term contains two variables, second contains three variables and third contains a single variable. We can obtain sum of products expression from a truth table by considering the input combinations those produce logic 1 output as shown below. Table 3.1: Example Truth table i/p o/p A B C Y 0 0 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 1 0 First logic 1 output in the truth table is for A=0, B=0 and C=1. This is possible when A, B and C are ANDed. So, first term is A. B. C and other terms can be obtained similarly to get the expression for the truth table 3.1 in sum of products form as, 3-1
Y = A. B. C + A. B. C + A. B. C + A. B. C As this expression is a function of three variables, it can be expressed as f(a, B, C). It cans also be represented as. Y = f(a, B, C) = A. B. C + A. B. C + A. B. C + A. B. C Both the examples shown above are in sum of products form. But in first example, even though the expression is function of three variables, first term is containing only two variables whereas third term is containing only one variable. Y = A. C + A. B. C + B We may write each such incomplete term of the above expression in expanded form as, A. C = A. C. (B + B ) = A. B. C + A. B. C B = B. (A + A ) = A. B + A. B = A. B. (C + C ) + A. B. (C + C ) = A. B. C + A. B. C + A. B. C + A. B. C Therefore, the expanded sum of product expression can be written as, Y = A. B. C + A. B. C + A. B. C + A. B. C + A. B. C + A. B. C + A. B. C Y = A. B. C + A. B. C + A. B. C + A. B. C + A. B. C Expanded form of Boolean expression in which each term contains all the Boolean variables in it is called as canonical form. It is also called as standard sum of products form. Convert following Boolean expression into standard SOP form. AC + BD The above expression is a function of four variables A, B, C and D. As each term is not containing all the variables, it is not standard SOP. The terms can be expanded to make it standard SOP as, Y(A, B, C, D) Y(A, B, C, D) = A. C + B. D = A. (B + B ). C + B. D = A. B. C + A. B. C + B. D = A. B. C. (D + D ) + A. B. C. (D + D ) + B. D = A. B. C. D + A. B. C. D + A. B. C. D + A. B. C. D + B. D = A. B. C. D + A. B. C. D + A. B. C. D + A. B. C. D + (A + A ). B. D = A. B. C. D + A. B. C. D + A. B. C. D + A. B. C. D + A. B. D + A. B. D = A. B. C. D + A. B. C. D + A. B. C. D + A. B. C. D + A. B. (C + C ). D + A. B. (C + 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 + A. B. C. D + A. B. C. D As, A + A = A = A. B. C. D + A. B. C. D + A. B. C. D + A. B. C. D + A. B. C. D + A. B. C. D Standardize following Boolean expression. Y = AC + B C 3-2
The above expression is a function of three variables A, B and C. As each term is not containing all the variables, it is not standard SOP. The terms can be expanded to make it standard SOP as, = A. C + B. C = A. (B + B ). C + B. C = A. B. C + A. B. C + B. C = A. B. C + A. B. C + (A + A ). B. C = A. B. C + A. B. C + A. B. C + A. B. C As, A + A = A = A. B. C + A. B. C + A. B. C Single term in standard sum of products is called as minterm. Each expression can be represented using minterms. Some examples are shown below. Y = A. B. C + A. B. C + A. B. C + A. B. C + A. B. C As the above expression in standard sum of products, all terms in it are minterms. They are, A. B. C A. B. C A. B. C m7 m5 1 1 1 1 1 A. B. C A. B. C m6 1 1 0 0 m2 Therefore the expression can be represented as, = m(2,3,5,6,7) Y = A. B. C. D + A. B. C. D + A. B. C. D + A. B. C. D + A. B. C. D + A. B. C. D As the above expression in standard sum of products, all terms in it are minterms. They are, A. B. C. D A. B. C. D A. B. C. D m13 m12 1 1 1 1 0 0 m3 m9 A. B. C. D A. B. C. D A. B. C. D m8 m15 1 0 0 1 1 1 1 1 1 0 Therefore the expression can be represented as, m14 Y(A, B, C, D) = m(8,9,12,13,14,15) 3.1.2 Product of Sums (POS) form In this form, Boolean expression is defined by product of sum terms. Various OR terms are ANDed together. Each OR term may be a single variable 3-3
or a sum of multiple variables (each variable may be either in complemented or un-complemented form). Y = (A + C). (B + C). A Here, Y is represented in POS form with three terms. First OR term contains two variables, second contains two variables and third contains a single variable. We can obtain product of sums expression from a truth table by considering the input combinations those produce logic 0 output as shown below. Table 3.2: Example Truth table i/p o/p A B C Y 0 0 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 1 0 First logic 0 output in the truth table is for A=0, B=0 and C=0. This is possible when A, B and C are ORed. So, first term is (A + B + C) and other terms can be obtained similarly to get the expression for the truth table 3.2 in product of sums form as, Y = (A + B + C). (A + B + C). (A + B + C ). (A + B + C ) As this expression is a function of three variables, it can be expressed as f(a, B, C). It cans also be represented as. Y = f(a, B, C) = (A + B + C). (A + B + C). (A + B + C ). (A + B + C ) Both the examples shown above are in product of sums form. But in first example, even though the expression is function of three variables, first term is containing only two variables, second term is also containing only two variables and third term is containing only one variable. Y = (A + C). (B + C). A We may write each such incomplete term of the above expression in expanded form as, (A + C) = (A + B. B + C) = (A + B + C). (A + B + C) (B + C) = (A. A + B + C) = (A + B + C). (A + B + C) A = (A + B. B ) = (A + B). (A + B ) = (A + B + C. C ). (A + B + C. C ) = (A + B + C). (A + B + C ). (A + B + C). (A + B + C ) 3-4
Therefore, the expanded sum of product expression can be written as, Y = (A + B + C). (A + B + C). (A + B + C). (A + B + C). (A + B + C). (A + B + C ). (A + B + C). (A + B + C ) Y = (A + B + C). (A + B + C). (A + B + C). (A + B + C ). (A + B + C ) Expanded form of Boolean expression in which each term contains all the Boolean variables in it is called as canonical form. It is also called as standard product of sums form. Convert following Boolean expression into standard POS form. (A + C ). (B + D) The above expression is a function of four variables A, B, C and D. As each term is not containing all the variables, it is not standard POS. The terms can be expanded to make it standard POS as, Y(A, B, C, D) Y(A, B, C, D) = (A + C ). (B + D) = (A + B. B + C ). (B + D) = (A + B + C ). (A + B + C ). (B + D) = (A + B + C + D. D ). (A + B + C + D. D ). (B + D) + D ). (B + D) + D ). (A. A + B + D) + D ). (A + B + D). (A + B + D) + D ). (A + B + C. C + D). (A + B + C. C + D) + D ). (A + B + C + D). (A + B + C + D). (A + B + C + D). (A + B + C + D) As, A. A = A + D ). (A + B + C + D). (A + B + C + D). (A + B + C + D) Standardize following Boolean expression. Y = (A + B)(A + C) The above expression is a function of three variables A, B and C. As each term is not containing all the variables, it is not standard POS. The terms can be expanded to make it standard POS as, = (A + B). (A + C) = (A + B + C. C ). (A + C) = (A + B + C). (A + B + C ). (A + C) = (A + B + C). (A + B + C ). (A + B. B + C) = (A + B + C). (A + B + C ). (A + B + C). (A + B + C) As, A + A = A = (A + B + C). (A + B + C ). (A + B + C). (A + B + C) 3-5
Single term in standard product of sumss is called as maxterm. Each expression can be represented using maxterms. Some examples are shown below. Y = (A + B + C). (A + B + C). (A + B + C). (A + B + C ). (A + B + C ) As the above expression in standard product of sums form, all terms in it are maxterms. They are, A + B + C A + B + C A + B + C M0 M2 0 0 0 0 0 A + B + C A + B + C M1 0 1 M5 Therefore the expression can be represented as, = M(0,1,2,4,5) Y = (A + B + C + D). (A + B + C + D ). (A + B + C + D) As the above expression in standard product of sums form, all terms in it are maxterms. They are, A + B + C + D A + B + C + D A + B + C + D M2 M3 0 0 0 1 1 0 Therefore the expression can be represented as, Y(A, B, C, D) = M(2,3,6) M4 M6 3.2 Karnaugh Map In the last chapter, we have simplified Boolean expression using Boolean laws. That was algebraic simplification method. In that method, it is hard to guess whether the simplified expression is in its simplest form or not (i.e. whether simplification is to be continued or not).this drawback has been overcome in Karnaugh map simplification. Karnaugh map (also called K-map) is graphical representation of a logic system. It can be drawn from minterm or maxterm Boolean expressions. Number of cells in a K-map depends on number of variables in the Boolean expression. Karnaugh map of a Boolean expression with n variables contain 2 n cells (squares). Each cell in the K-map corresponds with one input combination. Each row and each column of K-map is assigned by 0s and 1s. A two-variable K-map can be drawn with various possibilities. Two possibilities are shown in figure 3.1. In these notes we will use pattern shown in figure 3.1a. 3-6
B A 0 1 2 3 A B 0 0 2 1 1 3 a. b. Figure 3.1: Two ways of representing a 2-variable K-map As discussed previously, each square (or cell) in K-map corresponds to one input combination. In figure 3.1a, cell 0 corresponds to input combination 00 (i.e. A. B ), cell 1 corresponds to input combination 01 (i.e. A. B), cell 2 corresponds to input combination 10 (i.e. A. B ) and cell 3 corresponds to input combination 11 (i.e. A. B). A three-variable K-map can be drawn with various possibilities. Four possibilities are shown in figure 3.2. In these notes we will use pattern shown in figure 3.2a. BC A 0 3 2 1 4 5 7 6 AB C 0 0 2 6 4 1 1 3 7 5 a. b. C AB 00 01 2 3 11 6 7 10 4 5 A BC 00 0 4 01 1 5 11 3 7 10 2 6 c. d. Figure 3.2: Four ways of representing a 3-variable K-map A four-variable K-map can be drawn with various possibilities. Two possibilities are shown in figure 3.3. In these notes we will use pattern shown in figure 3.3a. 3-7
CD AB 00 3 2 01 4 5 7 6 11 12 13 15 14 10 8 9 11 10 AB CD 00 0 4 12 8 01 1 5 13 9 11 3 7 15 11 10 2 6 14 10 a. b. Figure 3.3: Two ways of representing a 4-variable K-map We can represent any expression which is in standard SOP (minterms) form or standard POS (maxterms) form in a K-map. 3.2.1 Representation SOP on K-map If the given Boolean expression is not in standard SOP form, it should be first converted to standard SOP form. Then its minterms are written. For each minterm in the expression, 1 is written in the corresponding cell in the K-map and the remaining cells are marked as 0. Represent following Boolean expression by K-map. Y = BC + A B C + ABC The above expression is in SOP form. It is a function of three variables A, B and C. As each term is not containing all the variables, it is not in standard SOP form. So, converting it into standard SOP form, = B. C + A. B. C + A. B. C = (A + A ). B. C + A. B. C + A. B. C = A. B. C + A. B. C + A. B. C + A. B. C 1 1 1 1 0 0 1 0 m7 m3 m0 m6 = m(0,3,6,7) The above minterms can be represented in K-map. All the present terms are marked as 1 and remaining cells are marked as 0. As the function is of three variables, a three-variable K-map is used for representation. BC A 0 1 0 3 1 2 0 1 4 0 5 0 7 1 6 1 Represent following expression using K-map. f(a, B, C, D) = m(0,1,2,5,13,15) The above minterms can be represented in K-map. All the present terms are marked as 1 and remaining cells are marked as 0. As the function is of four-variables, a four-variable K-map is used for representation. 3-8
CD AB 00 1 1 3 0 2 1 01 4 0 5 1 7 0 6 0 11 12 3 1 15 1 14 0 10 8 0 9 1 0 0 Example 3: Represent following expression using K-map. Y = m(0,1,3) The above minterms can be represented in K-map. All the present terms are marked as 1 and remaining cells are marked as 0. As the function is of two-variables, a two-variable K-map is used for representation. B A 0 1 1 1 2 0 3 1 3.2.2 Representation POS on K-map If the given Boolean expression is not in standard POS form, it should be first converted to standard POS form. Then its maxterms are written. For each maxterm in the expression, 0 is written in the corresponding cell in the K-map and the remaining cells are marked as 1. Represent following Boolean expression by K-map. Y = (A + B) + (A + B + C ) + (A + B + C ) The above expression is in POS form. It is a function of three variables A, B and C. As each term is not containing all the variables, it is not in standard POS form. So, converting it into standard POS form, = (A + B) + (A + B + C ) + (A + B + C ) = (A + B + C. 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 ) 0 0 0 0 1 1 1 = M(0,1,7) M0 M1 M7 The above maxterms can be represented in K-map. All the present terms are marked as 0 and remaining cells are marked as 1. As the function is of three variables, a three-variable K-map is used for representation. BC A 0 0 0 3 1 2 1 1 4 1 5 1 7 0 6 1 3-9
Represent following expression using K-map. f(a, B, C, D) = M(1,3,5,7,9,11,13,15) The above maxterms can be represented in K-map. All the present terms are marked as 0 and remaining cells are marked as 1. As the function is of four-variables, a four-variable K-map is used for representation. CD AB 00 1 0 3 0 2 1 01 4 1 5 0 7 0 6 1 11 12 1 13 5 4 1 10 8 1 9 1 Example 3: Represent following expression using K-map. Y = M(0,2) The above maxterms can be represented in K-map. All the present terms are marked as 0 and remaining cells are marked as 1. As the function is of two-variables, a two-variable K-map is used for representation. B A 0 0 1 1 2 0 3 1 3.2.3 Grouping of adjacent cells K-maps are used for simplification of Boolean expressions. The simplification is based on grouping of the terms in adjacent cells. Important aspects of grouping are discussed below. - Number of cells in a group must always be a power of 2. (i.e. 1, 2, 4, 8, 16 etc.) - Two cells are said to be adjacent if they differ in only one variable. Four cells are said to be adjacent if they differ in two variables. Eight cells are said to be adjacent if they differ in three variables and so on. - If K-map is represented for a SOP, grouping is done for adjacent 1 s and if K-map is represented for a POS, grouping is done for adjacent 0 s. - While grouping, each cell containing 1 in case of SOP ( 0 in case of POS) must be considered at least once. - We should try to make minimum number of groups (i.e. each group of maximum possible size). - Don t care entries may be considered in any group. 3-10