Module1 DSDV
Module1 DSDV
Module1 DSDV
(21EC32)
Course Syllabus
M1. Principles of Combinational Logic
M2. Logic Design with MSI Components and Programmable Logic Devices
M3. Flip-Flops and its Applications
M4. Introduction to Verilog ,Verilog Data flow description
M5. Verilog Behavioral description ,Verilog Structural description
2
Course Outcomes
CO1 Develop simplified switching equation using Karnaugh Maps and Quine-
McClusky techniques.
CO2 Analyze and design for Combinational Circuits by understanding the operation of
decoders, encoder, multiplexers, adder, subtractors, comparators.
CO3 Analyze the concepts of Flip Flops (SR,D,T, and JK) and to design the
synchronous sequential circuits.
CO4 Understand Verilog constructs and design combinational and sequential circuits
using data flow description.
CO5 Understand Verilog constructs and design combinational and sequential circuits
using data flow description.
3
Text Books
“Digital logic Applications and Design”,John M. Yarbrough, Cengage/Thomson
Learning, 2001. ISBN 981-240-062-1.
“Digital Principles and Design” , Donald D, Givone, Mc Graw Hill, 2002. ISBN
978-0-07-052906-9.
4
Text Books
“HDL Programming VHDL and Verilog” by Nazeih M Botros, 2009 reprint,
Dreamtech press.
5
References
1. Fundamentals of logic design, by Charles H Roth Jr., Cengage Learning
2. Logic Design, by Sudhakar Samuel, Pearson/ Sanguine, 2007
3. Fundamentals of HDL, by Cyril P R, Pearson/Sanguine 2010
6
Lesson Plan
7
Need for Digital Electronics and Applications
• Easy to Design
• Reliability
• Highly flexible
• Cheaper
Applications:
• In the design of computer.
• Multiplexer is used in graphic controllers, communication networks.
• Encoder is used in character generator in monitor etc.
8
Combinational Logic Design :Boolean Logic
• Constant :A fixed or non-changeable quantity is termed as constants.0 and 1 are treated as binary
logic constants.
• Variable: A changeable quantity is termed as variable. It can have 0 or 1 value. A symbol ,letter,
number or short name is assigned to distinguish one variable from another.
• Complement: Means to complete the binary set. In binary algebra the complement is opposite.
• Literal: Is a Boolean variable or its complement.
• Product term: Is a literal or the logical AND operation of multiple literals.
• Sum term: Is a literal or the logical OR operation of multiple literals.
• Theorem: A postulate or group of postulates that have been proven..
9
Combinational Logic Design :Boolean Logic
• Perfect Induction: A method of proof by examination of all possible input variable combinations,
therefore showing the output variable value in every possible condition.
• Truth table: A tabular shows the truth ‘ relationship between a set of input and output variables.
• Logic diagram: A drawing made up of logic symbols, distinctive shape or IEEE symbol, showing
input and output connections between various logic functions.
• Logical/Boolean Expression: Two logical variables are combined with logical operator to form
logical expression
10
Boolean Laws and Theorems
• Law of Identity
• Law of Tautology or Idempotence
• Law of Complement or Negation
• Law of double negation or Involution
• Law of Commutation
11
Standard Forms of Boolean Expressions
12
Sum-of-Products (SOP)
13
Boolean Laws and Theorems
• Law of Association
• Law of Distribution
• Law of Absorption or Redundancy
• DeMorgan’s Theorem-I
• DeMorgan’s Theorem-II
14
Implementation of an SOP
X=AB+BCD+AC
• AND/OR implementation • NAND/NAND implementation
A A
B B
B B
C X C X
D D
A A
C C
16
Minterm And Maxterm
• A Minterm is a special case product(AND) term. A Minterm is a product term that contains all of
the input variables (each literal no more than once)that makes up a Boolean expression.
• For Minterms ,the binary words are formed by representing
o Each non-complemented variable by a 1.
o Each complemented variable by a 0
• A Maxterm is a special case sum(OR) term.A maxterm is a sum term that contains all of the input
variables (each literal no more than once) that makes up a Boolean expression.
• For Maxterms , the binary words are formed by representing
o Each non-complemented variable by a 0
o Each complemented variable by a 1
19
Converting Product Terms to Standard SOP
• Step 1: Multiply each nonstandard product term by a term made up of the sum of a missing
variable and its complement. This results in two product terms.
• As you know, you can multiply anything by 1 without changing its value.
• Step 2: Repeat step 1 until all resulting product term contains all variables in the domain in either
complemented or complemented form. In converting a product term to standard form, the number
of product terms is doubled for each missing variable.
• Canonical SOP : Is Sum of products is a complete set of minterms that defines when an output
variable is a logical 1. Each minterm corresponds to the row in the truth table where the output
function is 1
20
Product-of-Sums (POS)
23
Implementation of a POS
X=(A+B)(B+C+D)(A+C)
• OR/AND implementation
A
B
B
C X
D
A
C
25
Converting a Sum Term to Standard POS
• Step 1: Add to each nonstandard product term a term
made up of the product of the missing variable and its
complement. This results in two sum terms.
• As you know, you can add 0 to anything without changing
its value.
• Step 2: Apply rule 12 A+BC=(A+B)(A+C).
• Step 3: Repeat step 1 until all resulting sum terms
contain all variable in the domain in either
complemented or uncomplemented form.
27
SOP/POS
30
Converting Standard SOP to Standard POS
• The Facts:
• The binary values of the product terms in a given standard SOP expression are
not present in the equivalent standard POS expression.
• The binary values that are not represented in the SOP expression are present
in the equivalent POS expression.
31
Converting Standard SOP to Standard POS
• What can you use the facts?
• Convert from standard SOP to standard POS.
• How?
• Step 1: Write complement of function by performing OR
operation of minterms(SOP) when an output variable
corresponding to minterm is a logical 0(instead of logical 1)
• Step 2:Complement the function
• Step 3: Apply De-Morgans theorem-II.
32
Boolean Expressions & Truth Tables
• All standard Boolean expression can be easily converted into truth table format
using binary values for each term in the expression.
• Also, standard SOP or POS expression can be determined from the truth table.
34
Converting SOP Expressions to Truth Table
Format
• Recall the fact:
• An SOP expression is equal to 1 only if at least one of the
product term is equal to 1.
• Constructing a truth table:
• Step 1: List all possible combinations of binary values of the
variables in the expression.
• Step 2: Convert the SOP expression to standard form if it is
not already.
• Step 3: Place a 1 in the output column (X) for each binary
value that makes the standard SOP expression a 1 and
place 0 for all the remaining binary values.
35
Converting POS Expressions to Truth Table
Format
• Recall the fact:
• A POS expression is equal to 0 only if at least one of the product term
is equal to 0.
• Constructing a truth table:
• Step 1: Write complement of function by performing AND operation of
Maxterms when an output variable corresponding to a maxterm is a
logical 1(instead of logical 0).
• Step 2: Complement the function.
• Step 3: Apply De-Morgan I
37
The Karnaugh Map
42
The Karnaugh Map
• Feel a little difficult using Boolean algebra laws, rules, and theorems to simplify logic?
• A K-map provides a systematic method for simplifying Boolean expressions and, if properly used,
will produce the simplest SOP or POS expression possible, known as the minimum expression.
• It is pictorial form of a truth table and can handle upto 6 variables.
• It is an array of cells/squares in which each cell represents a binary value of the input variables.
• It reduces extensive calculations.
• It is a chart or graph composed of an arrangement of adjacent cells,each representing a particular
combination of variables.
43
What is K-Map?
• It’s similar to truth table; instead of being organized (i/p and o/p) into
columns and rows, the K-map is an array of cells in which each cell
represents a binary value of the input variables.
• The cells are arranged in a way so that simplification of a given expression
is simply a matter of properly grouping the cells.
• K-maps can be used for expressions with 2, 3, 4, and 5 variables.
44
Karnaugh maps
• 4 variables Karnaugh map
AB
CD 00 01 11 10
0 4 12 8
00
1 5 13 9
01
3 7 15 11
11
2 6 14 10
10
47
Cell Adjacency
CD
00 01 11 10
AB
00
01
11
10
49
K-Map SOP Minimization
• The K-Map is used for simplifying Boolean expressions to their minimal form.
• A minimized SOP expression contains the fewest possible terms with fewest
possible variables per term.
• Generally, a minimum SOP expression can be implemented with fewer logic gates
than a standard expression.
50
Mapping a Nonstandard SOP Expression
53
K-Map Simplification of SOP Expressions
• After an SOP expression has been mapped, we can do the process of minimization:
• Grouping the 1s
• Determining the minimum SOP expression from the map
Grouping the 1s
• You can group 1s on the K-map according to the following rules by enclosing those adjacent
cells containing 1s.
• The goal is to maximize the size of the groups and to minimize the number of groups.
56
Grouping the 0’s and 1’s
Objective is to maximize the number of elements in a group and to minimize the number of groups.
a) Always group adjacent cell containing 1’s (or 0’s) in a group in powers of 2[1,2,4,8,16,32 or 64
1’s (or 0’s) .Start by combining the maximum number of adjacent cell containing 1’s (or 0’s).
b) Always include the largest possible number of 1’s (or 0’s) in a group in accordance with rule(a)
to reduce the number of literals in a term.
c) Ensure that each 1’s (or 0’s) are covered when combining the squares. The 1’s (or 0’s) already in
a group can be included in another group as long as the overlapping groups include non-
common 1’s (or 0’s).
d) Minimize the number of groups to reduce the number of terms in the simplified function. Avoid
redundant grouping.
e) Cells may be only grouped/looped together in two's, four's or eight's. As few groups as possible
must be formed. Groups may overlap one another and may contain only one cell.
f) The larger the number of 1s grouped/looped together in a group the simpler is the product term
that the group represents
57
Number of Input literals to represent the group on K-MAP
NO OF NAMED NUMBER OF INPUT NUMBER OF INPUT NUMBER OF NUMBER OF
Adjacent cells LITERALS TO LITERALS TO INPUT LITERALS INPUT LITERALS
REPRESENT THE REPRESENT THE TO REPRESENT TO REPRESENT
Group GROUP GROUP THE GROUP THE GROUP
1 Single 2 3 4 5
2 Pair 1 2 3 4
4 Quad F=1 or 0 1 2 3
8 Octet F=1 or 0 1 2
16 ---- F=1or 0 1
32 ---- F=1 or 0
58
Grouping the 1s (example)
C C
AB 0 1 AB 0 1
00 1 00 1 1
01 1 01 1
11 1 1 11 1
10 10 1 1
59
Grouping the 1s (example)
CD CD
AB 00 01 11 10 AB 00 01 11 10
00 1 1 00 1 1
01 1 1 1 1 01 1 1 1
11 11 1 1 1
10 1 1 10 1 1 1
60
Determining the Minimum SOP Expression from the Map
• The following rules are applied to find the minimum product terms
and the minimum SOP expression:
1. Group the cells that have 1s. Each group of cell containing 1s creates one
product term composed of all variables that occur in only one form (either
complemented or complemented) within the group. Variables that occur
both complemented and uncomplemented within the group are eliminated
called contradictory variables.
61
Determining the Minimum SOP Expression from the Map
2. Determine the minimum product term for each group.
• For a 3-variable map:
1. A 1-cell group yields a 3-variable product term
2. A 2-cell group yields a 2-variable product term
3. A 4-cell group yields a 1-variable product term
4. An 8-cell group yields a value of 1 for the expression.
• For a 4-variable map:
1. A 1-cell group yields a 4-variable product term
2. A 2-cell group yields a 3-variable product term
3. A 4-cell group yields a 2-variable product term
4. An 8-cell group yields a a 1-variable product term
5. A 16-cell group yields a value of 1 for the expression.
3. When all the minimum product terms are derived from the K-
map, they are summed to form the minimum SOP expression.
62
Mapping Directly from a Truth Table
I/P O/P
A B C X C
0 0 0 1 0 1
AB
0 0 1 0
0 1 0 0 00
1
0 1 1 0
1 0 0 1 01
1 0 1 0
1 1 0 1 11
1 1
1 1 1 1
10
1
67
Few definitions of Important terms
• Prime Implicants : A prime implicant is a group of minterms that cannot be combined with any
other minterm or groups.
• Essential Prime Implicants :An essential prime implicant is a prime implicant that covers the
output of the function but no other prime implicant is able to cover. A prime implicant is
essential prime implicant if it covers a minterm that cannot be covered by any other prime
implicant.Essential prime implicant is one in which one or more minterms are unique.
• Redundant group or non essential prime implicant :Group is known as redundant group if all the
1’s or 0’s forming the group already have been participated in other groups. In other words all
the participating minterms are not unique.
68
Complete K-MAP Simplication Process
1. Construct K-map and place 1’s and 0’s in the squares according to the truth table.
2. Group the isolated 1’s or 0’s which are not adjacent to any other 1’s or 0’s .(Single loops)
3. Group any pair which contains a 1 or 0 adjacent to only one other 1 or 0.(double loops)
4. Group any octet even if it contains one or more 1’s or 0’s that have already been grouped.
5. Group any quad that contains one or more 1’s or 0’s that have not already been
grouped ,making sure to use the minimum number of groups.
6. Group any pairs necessary to include any 1’s or 0’s that have not yet been grouped being
adjacent, making sure to use the minimum number of groups.
7. In case of SOP, form the OR operation of all the product terms generated by each group. In case
of POS ,form AND operation of sum of all the terms generated by each group.
71
Karnaugh MAP with “Don’t Care” Conditions
• Sometimes a situation arises in which some input variable combinations are not allowed, i.e. BCD
code:
• There are six invalid combinations: 1010, 1011, 1100, 1101, 1110, and 1111.
• Since these unallowed states will never occur in an application involving the BCD code they
can be treated as “don’t care” terms with respect to their effect on the output.
• The “don’t care” terms can be used to advantage on the K-maps. The X’s can be treated as 1’s or
0’s to maximize the number of elements in a group. Maximizing the number of element per group
would result to simpler product term (or sum term).
72
K-Map POS Minimization
• The approaches are much the same (as SOP) except that with POS expression, 0s
representing the standard sum terms are placed on the K-map instead of 1s .
74
Quine-MCCluskey Minimization
technique
77
Quine-McCluskey Method
• Tabular Representations
• Prime Implicants
• Essential Prime Implicants
81
Tabular Representations
YZ
WX 00 01 11 10 !W & Y & !Z
0-10
!W & X 00 1
01--
01 1 1 1 1
11 1 1 1
10 X&Y
1
W & !Y & Z -11-
1-01
82
Prime Implicants
83
Prime Implicants
YZ
X 00 01 11 10 -10
0 1
1 1 1 1 1
1--
F = Y & !Z
# X
84
Prime Implicants
YZ -10
Minterm X Y Z F
X 00 01 11 10
0 O O O 0
1 0 0 1 0
2 0 1 0 1 0 1
3 1 1 1 0
4 1 O O 1 1 1 1 1 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 1
1--
F = Y & !Z
# X
85
Finding Prime Implicants
2 0 1 0 (2,6) - 1 0 (4,5,6,7) 1 - -
4 1 O 0 (4,5) 1 0 - (4,6,5,7) 1 - -
5 1 0 1
6 1 1 0 (4,6) 1 - 0
7 1 1 1 (5,7) 1 - 1
(6,7) 1 1 -
86
Prime Implicants
YZ -10
Minterm X Y Z F
X 00 01 11 10
0 O O O 0
1 0 0 1 0
2 0 1 0 1 0 1
3 1 1 1 0
4 1 O O 1 1 1 1 1 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 1
1--
F = Y & !Z
# X
87
Essential Prime Implicants
YZ
WX 00 01 11 10
88
Essential Prime Implicants
minterms
YZ
WX 00 01 11 10 0 0000
1 0001
00 1 1 1 1 2 0010
8 1000
01 1 1 3 0011
5 0101
10 1010
11 1 1 7 0111
14 1110
10 15 1111
1 1
89
Finding Prime Implicants
Step 1 Step 2 Step 3
90
Find Essential Prime Implicants
Prime Covered Minterms
Implicant minterms
0 1 2 3 5 7 8 10 14 15
1-10 10,14 X X
-111 7,15 X X
111- 14,15
* 00--
-0-0
0,1,2,3
0,2,8,10 X X X X
X X
0--1 1,3,5,7
X X X X
X X X X
91
3 Prime Implicants
F = !W & Z # W & X & Y # !X & !Z
YZ
WX 00 01 11 10
00 1 1 1 1
0--1
01 1 1
!W & Z
11 1 1
111-
10 1 1
!X & !Z
W & X & Y
-0-0
92
University Questions
1 Explain the following canonical form:
i) F(X,Y,Z)=X+XY+XZ
ii) F(X,Y,Z)=(X+Z)(X+Y)(Y+Z) 10M
2. Find the minimal POS expression of incompletely specified Boolean function using K-Map. 05M
f(a,b,c,d)=ΠM(1,2,3,4,9,10)+πd(0,4,15).
3. Find all the minimal SOP expression of f(a,b,c,d)=Σ(6,7,9,10,13)+Σd(1,4,5,11,15) using K-Map.
05M
4. Find all the Prime Implicants of the function:
f(a,b,c,d)= Σ(7,9,12,13,14,15)+ Σd(4,11) using Quine-McClusky’s Algorithm. 10M
5. For a given incomplete Boolean function ,find the minimal sum and minimal Product expression using MEV
technique taking least significant bit as map entered variable.
f(a,b,c,d)= Σ(1,5,6,7,9,11,12,13)+ Σd(0,3,4) 10M
6. Simplify the following function using Quine-McClusky’s method and realize the simplified using Nor gates.
P=f(w,x,y,z)= Σ m(7,9,12,13,14,15)+ Σ d(4,11) 12M
7. Simplify f(a,b,c,d)= Σ m(0,4,5,6,13,14,15)+ Σ d(2,7,8,9)using MEV technique using basic gates. 08M
93
University Questions
8. Reduce the following Boolean function using K-Map and Realize the simplified expression using
NAND gates.
T=f(a,b,c,d)= Σ m(1,3,4,5,13,15)+d(8,9,10,11) 08M
9. Convert the following Boolean function into their proper canonical form in decimal notation.
i) M=P(Q+S) ii)N=(W+X)(Y+Z) 07M
10. Define combinational logic. Two Motors M2 and M1 are controlled by three sensors
S1,S2,S3.One motor M2 is to run anytime when all three sensors are on. The other M1 is to run
whenever sensors S2 or S1 but not both are on and S3 is off. For all sensors combination where M1
is on ,M2 is to be off except when all sensors are off and then both motors remain off. Construct the
truth table and write the Boolean output equation. 05M
94
Assignment Questions
1. Obtain the simplified expressions in SOP for the following Boolean functions:
a) f(A,B,C,D)= Σm(7,13,14,15)
b) f(w,x,y,z)= Σm(2,3,12,13,14,15)
2. Obtain the simplified expressions in POS for the following Boolean functions:
a) f(a,b,c,d)=ΠM(0,1,2,3,4,10,11)
b) f(w,x,y,z)=ΠM(1,3,5,7,13,15)
3. Simplify the following Boolean function by means of the tabulation method:
a) f=ΠM(0,1,2,3,5,6,10,11) d=ΠM(13,14,15)
b)f =Σm(1,3,5,7,13,15) d=Σm(0,2,6)
95