DSDV Module1
DSDV Module1
Module - 1
Introduction
The logic networks described by a Boolean algebra are divided into two general
categories namely combinational circuits and sequential circuits.
Combinational networks are categorized by the fact that the outputs at any instant are
functions of the inputs at any instants. Combinational network does not have a memory.
Sequential networks are categorized by the fact that the outputs at any instant are not only
a function of the current inputs but, in addition depend upon the past history of the inputs.
Sequential network has a memory.
x0 y0
Combinational logic
function (F)
xn yn
Fig.1.1: Combinational Logic Model
Page 1
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog
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.
Truth Switching
Problem
table equations
Statement
written
Inputs Outputs
A B C D X Y Z
0 0 0 0 0 1 0
Page 2
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog
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
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
Page 3
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog
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
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
Page 4
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog
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̄ Ȳ + YZ is a
sum of product expression.
Product of Sum (POS):
It is logical AND of multiple sum terms.
For example: If X, Y and Z are Boolean variables then F(X, Y, Z) = (X + Y)(X + Y + Z)
is product of sum expression.
Minterms:
It is a product term where all the input variables appear once either in complemented or
uncomplemented form.
For example: if X, Y and Z are Boolean variables then XYZ, X̄ Y Z are some of the
minterms
Page 5
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog
Maxterms:
It is a sum term where all the input variables appear once either in complemented or
uncomplemented form.
For example: if X, Y and Z are Boolean variables then X+Y+Z, X̄ + Y + Z are some of
the maxterms
Canonical sum of products:
It is a complete set of minterms that defines when an output variable is logic 1.
For example: if X, Y and Z are Boolean variables then
F(X, Y, Z) = X̄YZ + XȲZ + XYZ is a canonical sum of product.
Canonical product of sums:
It is a complete set of maxterms that defines when an output variable is logic 0.
For example: if X, Y and Z are Boolean variables then
F(X, Y, Z) = (X̄ + Y + Z)(X + Ȳ + Z̄)(X + Y + Z) is a canonical sum of product.
Prime Implicant:
It is a permitted group of minterms or maxterms
Essential prime implicant:
A prime implicant that contains one or more minterms or maxterms that is unique i.e.
terms not present in any other implicant
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.
Procedure to convert a SOP expression into standard canonical form
i. Identify the missing variables in the each AND term.
ii. AND the missing term and its complement with the original AND term.
iii. Expand the term by property of distribution.
Procedure to convert a POS expression into standard canonical form
i. Identify the missing variables in the each OR term.
ii. OR the missing term and its complement with the original OR term.
Page 6
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog
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 + ā) with second term.
i.e. bc(a + ā) = bca + bcā
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 + ābc + abc̄ + ab̄c̄
Y = ab̄c + abc̄ + abc + ā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 (aā) with second term.
i.e. b̄ + c + aā = (b̄ + c + a)(b̄ + c + ā)
Therefore, the standard canonical form is,
Y = (a + b̄ + c) (a + b̄ + c̄)(ā + b̄ + c)
Page 7
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog
A B C Representation Representation
0 0 0 Ā B̄ C̄ = m0 A + B + C = M0
0 0 1 Ā B̄ C = m1 A + B + C̄ = M1
0 1 0 Ā B C̄ = m2 A + B̄ + C = M 2
0 1 1 Ā B C = m3 A + B̄ + C̄ = M3
1 0 0 A B̄ C̄ = m4 Ā + B + C = M 4
1 0 1 A B̄ C = m5 Ā + B + C̄ = M 5
1 1 0 A B C̄ = m6 Ā + B̄ + C = M6
1 1 1 A B C = m7 Ā + B̄ + C̄ = M 7
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
Σ-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̄)( Ā + B + C)( Ā + B + C̄)( Ā + 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.
1- Variable K-Map
Page 9
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
For 1-variable there will be 21 = 2 cells in the K-map as shown in the fig.
Deepashree A P Page 10
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
The possible combinations of grouping 2 adjacent min terms are {(m0, m1), (m1, m3), (m3,
m2), (m2, m0), (m4, m5), (m5, m7), (m7, m6), (m6, m4), (m0, m4), (m1, m5), (m3, m7) and
(m2, m6)}.
4- Variable K-Map
For 4-variables there will be 24 = 16 cells in the K-map as shown in the fig.
5- Variable K-Map
For 5-variables there will be 25 = 32 cells in the K-map as shown in the fig.
Deepashree A P Page 11
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Problems:
1. Simplify the following expression using K-map
¯𝐂 + 𝐀
𝐘 = 𝐀𝐁 ¯𝐁¯𝐂 + 𝐀
¯ 𝐁𝐂 + 𝐀𝐁
¯ 𝐂¯ + 𝐀
¯𝐁¯ 𝐂¯
Procedure
Plot 3-variable K-map for given expression.
Place 1's in the cell 0, 1, 3, 4, 5 and 0's in the remaining cells.
1's in cell 3 and cell 1 are adjacent which can be grouped (group 1)
1's in cells 0, 1, 4 and 5 are adjacent which can be grouped (group 2)
When all the 1's are grouped, the minimized expression can be generated. In group1 B is
eliminated and in group2 variable A and C are eliminated.
Therefore, the minimized expression is
Y = ĀC + B̄
Deepashree A P Page 12
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Deepashree A P Page 13
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Problems:
1. Simplify the following function in SOP form using K-map
¯𝐁
𝐘=𝐀 ¯ 𝐂¯ + 𝐀
¯𝐁¯𝐂+𝐀
¯𝐁𝐂+𝐀𝐁
¯ 𝐂¯ + 𝐀 𝐁
¯ 𝐂 + 𝐀 𝐁 𝐂¯
Deepashree A P Page 14
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Deepashree A P Page 15
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Deepashree A P Page 16
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
When an output value is not known for every possible combination of input variables, the
function said to be incompletely specified i.e. the truth table does not generate an output
value for every possible combination of input variables.
The minterms or maxterms that are not used as a part of the output functions are called
don’t care terms denoted by 'x' or 'd' or '–' in the k-map.
If a don’t care term can be used to create a larger group of minterms then it is assigned 1
otherwise it is assigned 0.
For example, consider the three variable truth table the output Y is incompletely specified
for input conditions 110 and 111.
A B C Y
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
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.
Deepashree A P Page 17
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
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)
Deepashree A P Page 18
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Deepashree A P Page 19
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Deepashree A P Page 20
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Deepashree A P Page 21
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Deepashree A P Page 22
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Deepashree A P Page 23
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
For many applications the number of variables in a problem is too large to simplify
manually using K-maps.
The Quine McCluskey Minimization technique is an algorithm that uses the same
Boolean algebra postulates that were used with k-map but in a form suitable for computer
solution.
Procedure to use Quine McCluskey Minimization technique:
1. Arrange all the minterms, in a list of increasing order, make groups such that it contains
same number of 1s.
2. 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
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. As each minterm from a group combines with it is now
part of a larger group. If a minterm did not combine with another, then no check would
be made. If a term doesn’t simplify it is a prime implicant.
3. All of the adjacent minterm groups, are compared to see if groups of four can be made.
4. Repeat the process until step 3. In this case both dashes must be in the same bit position
with only one other variable allowed to change. The creation of a new table further
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
Deepashree A P Page 24
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
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
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
Deepashree A P Page 25
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
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
Deepashree A P Page 26
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
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
Ā B̄ 0, 1, 2, 3 x x x x
B̄ C̄ 0, 1, 8, 9 x x ⊗ ⊗
Ā 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
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
¯ 𝐂¯ + 𝐁 𝐂 + 𝐀
𝐘=𝐁 ¯𝐂
Deepashree A P Page 27
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Deepashree A P Page 28
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
PI terms Minterm 0 2 3 6 7 8 10 12 13
B̄ D̄ 0, 2, 8, 10 ⊗ x x ⊗
Ā 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
¯𝐃
𝐘=𝐁 ¯ +𝐀
¯ 𝐂 + 𝐀𝐁𝐂¯
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
Deepashree A P Page 29
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
3 0011 ✔
2 9* 1001 ✔
10* 1010 ✔
11* 1011 ✔
3
13 1101 ✔
4 15 1111 ✔
Creation of minterm groups of two
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.
Deepashree A P Page 30
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Deepashree A P Page 31
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
3, 11* –011 ✔
2 9, 11* 10–1 ✔
12, 14 11–0
11*, 15 1–11
3
14, 15 111–
Creation of minterm groups of four
PI terms Minterm 1 2 3 4 5 8 9 11 12 14 15
B̄ D 1, 3, 9, 11* x x x x
Ā C̄ D 1, 5 x x
Ā B̄ C 2, 3 ⊗ x
Ā 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
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).
Deepashree A P Page 32
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
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
¯𝐃+𝐀𝐁𝐃
𝐘=𝐁 ¯ +𝐀𝐁𝐂+𝐀
¯ 𝐂¯ 𝐃 + 𝐀
¯𝐁¯𝐂
Deepashree A P Page 33
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
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) = ĀB + BC
iv. f(A, B, C) = (Ā + 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) +
Deepashree A P Page 34
Dept. of ECE, AJIET, Mangaluru Digital System Design using Verilog[21EC32]
Deepashree A P Page 35