Professional Documents
Culture Documents
Microprocessors
Chapter 2: Boolean Functions (Canonical)
Chapter 3: Gate Level Minimization
Srevats Laxman
srevats@gmail.com
Srevats Laxman 1
Boolean Functions
Described by an Algebraic expression
Binary variables
Constants 0 and 1
Logic Operations
Example: F(x,y,z) = x’ + yz
Srevats Laxman 2
Boolean Functions
Complements of a Function
De-Morgan’s Rule
More than 2 variables
Example:
F1 = x (y’z’ + yz) => F1’ = x’ + (y+z)(y’+z’)
F1 = x’yz’ + x’y’z => F2’ = (x+y’+z)(x+y+z’)
Another procedure
Dual of the function
Complement each literal
Srevats Laxman 3
Complements
Srevats Laxman 4
Min-terms and Max-terms
X Y Z F Min terms Max terms
0 0 0 0 X’.Y’.Z’ X+Y+Z
0 0 1 0 X’.Y’.Z X+Y+Z’
0 1 0 1 X’YZ’ X+Y’+Z
0 1 1 1 X’YZ X+Y’+Z’
1 0 0 1 XY’Z’ X’+Y+Z
1 0 1 0 XY’Z X’+Y+Z’
1 1 0 0 XYZ’ X’+Y’+Z
1 1 1 0 XYZ X’+Y’+Z’
Srevats Laxman 5
Canonical and Standard Form
We start with the Truth Table
What is a Min term / standard product? (mj)
What is a Max term / standard sum? (Mj)
Srevats Laxman 6
Canonical Forms and Standard
Forms
Conversion between Canonical Forms
Srevats Laxman 7
Standard to Canonical Conversion
Srevats Laxman 8
Boolean Functions - Simplification
Srevats Laxman 9
Problems to solve
Find the complement of
F (a,b,c) = ab’ + bc’ + ac
F(w,x,y,z) = wxy + wz’ + xy’ +xz
Srevats Laxman 10
Gate Level Minimization
Gate Level Minimization. What are we trying to do?
Maps
Implementation (2 level)
Srevats Laxman 11
Gate Level Minimization. What are we
trying to do?
Idea is to obtain a gate level minimized
boolean expression
Srevats Laxman 12
What’s in store for the day?
Gate Level Minimization. What are we trying to do?
Maps
Implementation (2 level)
Srevats Laxman 13
Maps
Objective: Build some kind of mapping that will help us do the
simplification
Based on min terms, we will try and build a map that will allow us to
do a similar mapping
Srevats Laxman 14
K-Map
Step1:
If it is in standard form convert to
Canonical form (SOP)
Step2:
Sketch the K-Map and write the gray
coded values which each variable
can take
Srevats Laxman 15
K- Map (2 variables)
Y 0 1
X
0
1
Srevats Laxman 16
K-Map
Step3:
Write the min terms in the Boolean function
corresponding to each box
Step4:
Look at the canonical form of the Boolean
expression and place a 1 corresponding to the
min terms in the boolean expression in the
appropriate box.
Srevats Laxman 17
K- Map (2 variables)
Y 0 1
X
0
0 1
1
2 3
Srevats Laxman 18
2- variable K Map
What does each box represent?
Srevats Laxman 19
K- Map (3 variables)
YZ
00 01 11 10
X
1
Srevats Laxman 20
K- Map (3 variables)
YZ
00 01 11 10
X
0
0 1 3 2
1
4 5 7 6
Srevats Laxman 21
3 Variable K Map
What do the boxes represent?
Srevats Laxman 22
K- Map (4-variables)
CD 00 01 11 10
AB
00
0 1 3 2
01
4 5 7 6
11
12 13 15 14
10
8 9 11 10
Srevats Laxman 23
K- Map (4-variables)
F=(1,3,5,9,10,11)
CD 00 01 11 10
AB
00 1 1
0 1 3 2
01 1
4 5 7 6
11
12 13 15 14
10 1 1 1
8 9 11 10
Srevats Laxman 24
What’s in store for the day?
Gate Level Minimization. What are we trying to do?
Maps
Implementation (2 level)
Srevats Laxman 25
Grouping
So What next? Step 5: We group them.
Example F= (0,1,4,5)
Srevats Laxman 28
Grouping in K-Map
Example:
F(x,y,z) = Σ(2,3,4,5) = x’yz’+x’yz+xy’z’+xy’z
Two blocks of size 2:
Srevats Laxman 29
Groupings of larger size
Example:
F(A,B,C) = Σ(1,2,3,5,7)
C+A’B
Srevats Laxman 30
4 variable mapping
One square represents a minterm of 4 literals.
Srevats Laxman 31
Grouping – Prime and Essentially Prime
Implicants
Step 7: Classify the groupings of min terms into Prime and Essentially
Prime Implicants; Obtain the final expression
Prime implicant
Product term that cannot be further reduced
Srevats Laxman 32
Example
Simplify the following Boolean function
(A,B,C,D) = ∑m(0,1,2,4,5,7,8,9,10,12,13).
cd
ab 00 01 11 10
00 1 1 1 1 1 1
01 1 1 1 1 1 1
11 1 1 1 1
10 1 1 1 1 1 1
g(A,B,C,D) = c’+b’d’+a’bd
All 3 are EPI (no more PI)
Srevats Laxman 33
Another Example
Example 1:
F(w,x,y,z)= Σ(0,1,2,4,5,6,8,9,12,13,14)
ANS: y’+w’z’+xz’
Example 2:
F(A,B,C,D)= A’B’C’+B’CD’+A’BCD’+AB’C’
ANS: B’C’+B’D’+A’CD’
Srevats Laxman 34
Example
f(a,b,c,d) =
∑m(0,1,2,3,4,5,7,14,15).
cd
ab
Five grouped terms, not all 1 1 1 1
needed. (Prime Implicants)
1 1 1
3 shaded cells covered by
only one term 1 1
Srevats Laxman 35
Example
F(A,B,C,D)= Σ(0, 2,3,5,7,8,9,10,11,13,15)
F(A,B,C,D) = BD+B’D’+CD+AD
= BD+B’D’+CD+AB’
= BD+B’D’+B’C+AD
= BD+B’D’+B’C+AB’
Srevats Laxman 36
What’s in store for the day?
Gate Level Minimization. What are we trying to do?
Maps
Implementation (2 level)
Srevats Laxman 37
SOP and POS Simplification
We have obtained a SOP expression (minimized)
But we have built the K-map that can have only min
terms
Srevats Laxman 38
POS minimization
How to generate a product of su
ms from a Karnaugh map?
Use duality of Boolean algebra (
DeMorgan law)
Example:
F = Σ(0,1,2,5,8,9,10)
F’ = AB+ CD + BD’
F = (A’+B’)(C’+D’)(B’+D)
Srevats Laxman 39
What’s in store for the day?
Gate Level Minimization. What are we trying to do?
Maps
Implementation (2 level)
Srevats Laxman 40
Don’t care Conditions
There may be a combination of input values which
will never occur
Srevats Laxman 41
Minimization using Don’t Cares
Treat don't cares as if they are 1s to generate
PIs.
Srevats Laxman 42
Minimization example
F(w,x,y,z) = Σ(1,3,7,11,15) and d(w,x,y,z) = Σ(0,2,5)
Srevats Laxman 43
Example cd
ab 00 01 11 10
Simplify the function f(a,b,c,d)
00 0 1 0 1
whose K-map is shown at the right.
01 1 1 0 1
11 0 0 x x
f = a’c’d+ab’+cd’+a’bc’
10 1 1 x x
or
f = a’c’d+ab’+cd’+a’bd’ 0 1 0 1
1 1 0 1
The middle two terms are EPIs, while the 0 0 x x
first and last terms are selected to
1 1 x x
cover the minterms m1, m4, and m5.
0 1 0 1
(There’s a third solution!) 1 1 0 1
0 0 x x
Srevats Laxman 1 1 x x 44
Another Example cd
ab
x 1 0 0
1 x 0 x
Simplify the function
1 x x 1
g(a,b,c,d) whose K-map
0 x x 0
is shown at right.
x 1 0 0
1 x 0 x
g = a’c’+ ab 1 x x 1
or 0 x x 0
g = a’c’+b’d x 1 0 0
1 x 0 x
1 x x 1
0 x x 0 45
Srevats Laxman
What’s in store for the day?
Gate Level Minimization. What are we trying to do?
Maps
Implementation (2 level)
Srevats Laxman 46
Implementation (2- level
implementation)
SOP AND-OR
POS OR-AND
Srevats Laxman 47
Gate Implementation
AND-OR OR - AND
Srevats Laxman 48
Using Universal Gates
Srevats Laxman 49
Conversion to NAND Implementation
Sum of minterms
Srevats Laxman 50
NAND Example
Function F = Σ(1,2,3,4,
5,7)
Karnaugh map:
Implementation:
Srevats Laxman 51
Using NOR gates
Srevats Laxman 52
Other 2 level implementations
OR-NAND
AND-NOR
NOR-OR
NAND-AND
Srevats Laxman 53
Re-cap
So let us try and answer some questions!
What are we trying to do in a K-Map?
Srevats Laxman 54
Re-cap
So let us try and answer some questions!
How do you find the simplified product term of
the group?
Start looking out for grouping starting from the biggest level
After every stage of grouping is exhausted check if there are min terms to be grouped
If all min terms are exhausted list down the E.P.I and P.I
Srevats Laxman 56
Extra Problems