Combinational Logic Design Principles
Combinational Logic Design Principles
Module - 1
Page 1
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
x0 y0
Combinational logic
function (F)
xn yn
Fig.1.1: Combinational Logic Model
For any combinational logic system can be designed it must be defined. The fig.1.2
illustrates the sequence of design tasks in general way.
Switching
Problem Truth
equations
Statement table
written
Page 2
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Let first number be AB (A is MSB (Most Significant Bit) and B is LSB (Least Significant Bit))
and second number be CD (C is MSB and D is LSB). Let X, Y, Z be the outputs. The truth table
is represented as
Inputs Outputs
A B C D X Y Z
0 0 0 0 0 1 0
0 0 0 1 0 0 0
0 0 1 0 1 0 0
0 0 1 1 1 0 0
0 1 0 0 0 0 1
0 1 0 1 0 1 0
0 1 1 0 0 0 0
0 1 1 1 1 0 0
1 0 0 0 1 0 1
1 0 0 1 0 0 1
1 0 1 0 0 1 0
1 0 1 1 0 0 0
1 1 0 0 1 0 1
1 1 0 1 1 0 1
1 1 1 0 0 0 1
1 1 1 1 0 1 0
2. Give the truth table representation of a system which takes two 2-bit binary number
as its inputs and generates an output to indicate when the sum of the two numbers is
odd.
Let first number be AB (A is MSB (Most Significant Bit) and B is LSB (Least Significant Bit))
and second number be CD (C is MSB and D is LSB). Let Y be the output. The truth table is
represented as
Inputs Output
Page 3
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
A B C D Y
0 0 0 0 0
0 0 0 1 1
0 0 1 0 0
0 0 1 1 1
0 1 0 0 1
0 1 0 1 0
0 1 1 0 1
0 1 1 1 0
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
1 0 1 1 1
1 1 0 0 1
1 1 0 1 0
1 1 1 0 1
1 1 1 1 0
3. Write a truth table for a four input system indicating when majority of inputs are
true.
Let A, B, C, D be inputs and let Y be the output. The truth table is represented as
Inputs Output
A B C D Y
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
Page 4
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
0 1 1 0 0
0 1 1 1 1
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
Literal:
A literal is a Boolean variable or its complement.
For example: If X is a Boolean variable then both X and X̅ are literal.
Product term:
A product term is a literal or logical product (AND) of multiple literals.
For example: If X, Y and Z are Boolean variables then X, XY, X̅YZ are some of the
product terms
Sum term:
A sum term is a literal or logical OR of multiple literals.
For example: If X, Y and Z are Boolean variables then X, X + Y, X̅ + Y + Z are some
of the sum terms
Sum of products (SOP):
It is logical OR of multiple product terms.
For example: If X, Y and Z are Boolean variables then F(X, Y, Z) = XY + X̅ Y̅ + YZ is a
sum of product expression.
Product of Sum (POS):
It is logical AND of multiple sum terms.
Page 5
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Canonical Forms
Canonical form or standard form of Boolean function will contain all the variables in
either true form or complemented form
Canonical form or standard form can be expressed as either Sum of minterms or Product
of maxterms.
Page 6
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Problems:
1. Convert the following SOP equation into proper or standard canonical form
� = �(�, �, �) = ��� + �� + ���
In the first term ab̅ the missing variable is c, so AND (c + c�) with first term.
i.e. ab̅(c + c�) = ab̅c + abc�
In the second term bc the missing variable is a, so we AND (a + a�) with second term.
i.e. bc(a + a�) = bca + bca�
In the third term ac� the missing variable is b, so AND (b + b̅) with third term.
i.e. ac�(b + b̅) = ac�b + ac�b̅
Therefore, the standard canonical form is,
Y = ab̅c + abc� + abc + a�bc + abc� + ab̅c�
Y = ab̅c + abc� + abc + a�bc + ab̅c�
2. Convert the following POS equation into proper or standard canonical form
� = �(�, �, �) = (� + ��)(�� + �)
In the first term a + b̅ the missing variable is c, so OR (cc�) with first term.
i.e. a + b̅ + cc� = (a + b̅ + c)(a + b̅ + c�) [x + yz = (x + y)(x + z)]
In the second term b̅ + c the missing variable is a, so OR (aa�) with second term.
i.e. b̅ + c + aa� = (b̅ + c + a)(b̅ + c + a�)
Therefore, the standard canonical form is,
Y = (a + b̅ + c) (a + b̅ + c�)(a� + b̅ + c)
Page 7
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
0 0 0 A̅ B̅ C̅ = m0 A + B + C = M0
0 0 1 A̅ B̅ C = m1 A + B + C̅ = M1
0 1 0 A̅ B C̅ = m2 A + B̅ + C = M2
0 1 1 A̅ B C = m3 A + B̅ + C̅ = M3
1 0 0 A B̅ C̅ = m4 A̅ + B + C = M4
1 0 1 A B̅ C = m5 A̅ + B + C̅ = M5
1 1 0 A B C̅ = m6 A̅ + B̅ + C = M6
1 1 1 A B C = m7 A̅ + B̅ + C̅ = M7
Each minterm is represented by mi and each maxterm by Mi where i is the decimal
equivalent of the binary number.
The logic expression in standard sum of product form can be written for the
corresponding truth table by writing one product term for each input that produces an
output of 1.
Page 8
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
1 1 0 1
1 1 1 0
Sum of product form for the above truth table can be expressed as,
Y = f(A, B, C) = A̅BC̅ + A̅BC + ABC̅
or
Y = f(A, B, C) = ∑ m(2, 3, 6)
or
Y = f(A, B, C) = ∑ (m2, m3, m6)
Σ-Notation is used to represent the minterms in a simple way using decimal numbers.
Similarly, the logic expression in standard product of sum form can be written for the
corresponding truth table by writing one sum term for each input that produces an output
of 0.
Product of sum form can be expressed as,
Y = f(A, B, C) = (A + B + C)( A + B + C̅)( A̅ + B + C)( A̅ + B + C̅)( A̅ + B̅ + C̅)
or
Y = f(A, B, C) = π M(0, 1, 4, 5, 7)
or
Y = f(A, B, C) = π (M0, M1, M4, M5, M7)
π-Notation is used to represent the maxterms in a simple way using decimal numbers.
Page 9
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Literal or Product terms are assigned to the cells of K- map labelling each row and each
column of the k-map with a variable, with its complement, or with a combination of
variables and complements. Fig. 1.1 shows the way to label rows and columns of
different K-maps.
It is important to note that from one cell to the next cell along any row or from one cell to
next cell along any column, only one variable in the product term should change.
1- Variable K-Map
For 1-variable there will be 21 = 2 cells in the K-map as shown in the fig.
Page 10
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Page 11
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
5- Variable K-Map
For 5-variables there will be 25 = 32 cells in the K-map as shown in the fig.
Problems:
1. Simplify the following expression using K-map
� = ���� + ����� + ���� + ����� + ����
� �
Procedure
Page 12
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Page 13
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Problems:
1. Simplify the following function in SOP form using K-map
� = �� �� �� + �� �� � + �� � � + � �� �� + � �� � + � � ��
Page 14
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
� = ����� + ��
Page 15
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Page 16
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
A B C Y
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
Page 17
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
1 0 1 1
1 1 0 -
1 1 1 -
From the truth table the expression is written as
Y = f(A, B, C) = ∑m(1, 3, 5) + ∑d(6, 7)
=
Don’t care term in cell 7 is considered as 1 and group of four (cell 1, 3, 5, 7) is done to
get expression Y = C.
Problems:
1. Simplify the following function in SOP form using K-map
Y = f(A, B, C, D) = ∑m(1, 2, 3, 5, 9, 12, 14, 15) + ∑d(4, 8, 11)
Page 18
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Page 20
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Page 21
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
2. Check the K-map for all possible valid adjacent 0s and form a group of 2n 0s and
encircle those 0s which are not adjacent to any other 0. They are called isolated 0s.
3. While grouping make sure that there are minimum no. of groups.
4. Then form the simplified expression by taking product of sum terms of all the
groups.
Problems:
1. Simplify the following expression using K-map
� = (� + � + ��) (� + �� + ��)(�� + �� + ��)(�� + � + �)(� + � + �)
Procedure
Plot 3-variable K-map for given expression.
Place 0s in the cell 0, 1, 3, 4, 7 and 1s in the remaining cells.
0s in cells 0, and 4 are adjacent which can be grouped (group 1)
0s in cells 1, and 3 are adjacent which can be grouped (group 2)
0s in cells 3 and 7 are adjacent which can be grouped (group 3)
When all the 0s are grouped, the minimized expression can be generated. In group1
variable A can be eliminated, in group2 variable B is eliminated and in group3 variable A
is eliminated.
Page 22
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Page 23
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
groups the sets of minterms. This same process is repeated until no further combination
of minterm group is possible.
5. All non checked minterm groups are now considered to be prime impliants.
6. All of the prime implicants are formed into a prime implicant table.
7. Evaluate the prime implicants by circling those minterms that are contained in only one
prime implicant. Circled minterms represent essential prime implicants.
Problems:
1. Simplify the following Boolean function by using a Quine McCluskey minimization
technique
Y = f(A, B, C, D) = ∑m (0, 1, 2, 3, 6, 7, 8, 9, 14, 15)
Arrange all the minterms in increasing order and make a group such that each minterm in
the group contain same number of 1s as shown in table 1.2. Group 0 contains only those
minterms with no 1s, Group 1 contains only those minterms with single 1s, Group 2
contains only those minterms with two 1s, Group 3 contains only those minterms with
three 1s, Group 4 contains only those minterms with four 1s as shown in table below.
Table 1.2: Grouping of minterms according to numbers of 1s
Create a new table showing the minterms in group n that matched with those from group
n + 1 such that they differ in only one position. This process is repeated until all of the
Page 24
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
minterms in each group have been compared to those in the next higher group. When a
minterm in a group is combined with a minterm in an adjacent group, a dash (-) is used to
indicate an eliminated variable. The combined minterm are grouped together as shown in
table 1.3.
i.e. �� �� �� �� + �� �� �� � = �� �� ��(� + ��) = �� �� �� −
When all of the minterm in group 0 is compared with those in group 1 then compare the
minterms in group1 with those in group 2.
This process is repeated until all the minterm in each group is compared with those in the
next higher group.
When a minterm from a group combines with a minterm in the next higher group then it
is checked (✔). If a minterm does not combine with another then no check would be
made. If a term does not simplify then it is a prime implicant
Table 1.3: Creation of minterm groups of two
Page 25
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
groups of two must be in the same bit position and only one variable change (0 in one
group and 1 in another group) is allowed
Table 1.4: Creation of minterm groups of four
Repeat the previous steps until no further combination of minterms groups is possible.
When further grouping is made the dashes must be in the same bit position with only one
other variable is allowed to change. The creation of a new table further groups the sets of
minterms.
All the non-checked minterm groups are prime implicants.
Prime implicant table is prepared using all the non-checked minterm groups as shown in
table 1.5.
Each prime implicant is listed vertically in two forms: PI terms and the decimal notation
of minterms.
Table 1.5: Prime implicant table
PI terms Minterm 0 1 2 3 6 7 8 9 14 15
A̅ B̅ 0, 1, 2, 3 x x x x
B̅ C̅ 0, 1, 8, 9 x x ⊗ ⊗
A̅ C 2, 6, 3, 7 x x x x
BC 6, 7, 14, 15 x x ⊗ ⊗
Evaluate the prime implicants by circling those minterms that are present in only one
prime implicant i.e. only one x in a column. Circled minterm represent essential prime
implicant (EPI).
To represent the simplified boolean expression select all the essential prime implicants
are considered along with the other prime implicants such that all the minterms should be
Page 26
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
covered. Minterm (2, 3) are present in both the prime implicants so select any one of
these prime implicant to cover all the minterms in the equation but not both.
Therefore, the simplified boolean expression is
� = �� �� + � � + �� ��
or
� = �� �� + � � + �� �
Page 27
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
8, 12 1–00
3, 7 0–11 ✔
2 6, 7 011– ✔
12, 13 110–
Creation of minterm groups of four
PI terms Minterm 0 2 3 6 7 8 10 12 13
B̅ D̅ 0, 2, 8, 10 ⊗ x x ⊗
A̅ C 2, 3, 6, 7 x ⊗ ⊗ ⊗
A C̅ D̅ 8, 12 x x
A B C̅ 12, 13 x ⊗
Therefore, the simplified boolean expression is
� = �� �� + �� � + ����
Page 28
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
4. Construct a prime implicant chart and determine essential prime implicants. The
don’t care terms are used to find the prime implicants but it is not compulsory to
include don’t care terms in the final expression.
Problems:
1. Simplify the following Boolean function by using a Quine McCluskey minimization
technique
Y = f(A, B, C, D) = ∑m (1, 3, 13, 15) + ∑d (8, 9, 10, 11)
Grouping of minterms according to numbers of 1s
Page 29
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
13, 15 11–1 ✔
Creation of minterm groups of four
PI terms Minterm 1 3 13 15
B̅ D 1, 3, 9*, 11* ⊗ ⊗
AD 9*, 13, 11*, 15 ⊗ ⊗
Since the all minterms in the minterm group (8, 9, 10, 11) are don’t cares it is not considered for
creating prime implicant table.
Therefore the simplified boolean expression is
� = �� � + � �
Page 30
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
14 1110 ✔
4 15 1111 ✔
Creation of minterm groups of two
PI terms Minterm 1 2 3 4 5 8 9 11 12 14 15
B̅ D 1, 3, 9, 11* x x x x
A̅ C̅ D 1, 5 x x
A̅ B̅ C 2, 3 ⊗ x
A̅ B C̅ 4*, 5 x x
B C̅ D̅ 4*, 12 x x
A B̅ C̅ 8*, 9 x x
A C̅ D̅ 8*, 12 x x
Page 31
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
A B D̅ 12, 14 x x
ACD 11*, 15 x x
ABC 14, 15 x x
Essential prime implicant has two minterms (2, 3) and is included in the final expression.
Minterm 1 is present in two prime implicant group therefore to add minterm 1 to the final
expression select the prime implicant group which has more number of minterms (i.e. 1, 3, 9,
11).
Minterm 5 is present in two prime implicant group therefore to add minterm 5 to the final
expression select the minterm group (1, 5).
Minterm 12 is present in three prime implicant group therefore to add minterm 12 to the final
expression select the minterm group (12, 14).
Minterm 15 is present in two prime implicant group therefore to add minterm 15 to the final
expression select the minterm group (14, 15).
Therefore, the simplified boolean expression is
� = �� � + � � �� + � � � + �� �� � + �� �� �
Page 32
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Question Bank
1. Define the following terms:
i. Minterm
ii. Maxterm
iii. Canonical SOP
iv. Canonical POS
v. Prime implicants
vi. Essential prime implicants
vii. Incompletely specified functions
2. Design a combinational logic circuit which takes two, 2-bit binary numbers as its input
and generates an output equal to 1, when the sum of the two number is odd.
3. Design a 3-input,1-output minimal Combinational network that has a logical-1 output
when the majority of its inputs are logic-1 and has a logic-0 when majority of inputs are
logic-0
4. Convert the given boolean function into canonical minterm form and canonical maxterm
form
i. f(A, B, C) = (A + B)(B + C)
ii. f(A, B, C) = A + AC(B + C)
iii. f(A, B, C) = A̅B + BC
iv. f(A, B, C) = (A̅ + B)(B + C̅)
v. f(A, B, C) = A + B̅C
5. Find all the prime implicants and essential prime implicants for the given function using
k-Map method.
i. f(A, B, C, D) = ∑m(0, 3, 6, 7, 8, 9, 10) + d(2, 5, 11, 12, 15)
ii. f(A, B, C, D) = ∑m (0, 2, 5, 7, 8, 10, 13, 15) + d(1, 4, 11, 14)
iii. f(A, B, C, D) = πM(4, 5, 6, 7, 8, 12, 13) + d(1, 15)
iv. f(A, B, C, D) = πM(0, 1, 4, 5, 6, 7, 9, 14) + d(13, 15)
v. f(A, B, C, D, E) = ∑m(3, 7, 11, 12, 13, 14, 15, 16, 18)
+ d(24, 25, 26, 27, 28, 29, 30, 31)
vi. f(A, B, C, D, E) = ∑m(3, 7, 8, 10, 11, 12, 14, 15, 17, 19, 21, 23, 25, 27, 29, 31) +
Page 33
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[BEC302]
Page 34