Professional Documents
Culture Documents
x 0 0 1 1
y f1 0 1 0 1 0 1 1 0
x 0 0 1 1
f1 = x . y x. y f2 = (0, 2,3) ?
f1 = m1 m2
f1 = (1, 2)
f2 = x . y x. y x . y
x 0 0 0 0 1 1 1 1
y z min terms 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 x.y.z x.y.z x.y.z x.y.z x.y.z x.y.z x.y.z x.y.z m0 m1 m2 m3 m4 m5 m6 m7
f2 = (1, 4,7) ? f2 = x . y. z x. y. z x . y . z
x 0 0 1 1
y f1 0 1 0 1 0 1 1 0
x 0 0 1 1
f1 = (x y).( x y)
f1 = M 1. M 2
f1 = (1, 2)
f 2 = (0,3) ?
f2 =(x y).( x y)
x 0 0 0 0 1 1 1 1
y z Max. terms 0 0 1 1 0 0 1 1 0 x + y + z M0 1 x + y + z M1 0 x + y + z M2 1 x + y + z M3 0 x + y + z M4 1 x + y + z M5 0 x + y + z M6 1 x + y + z M7
f1 = (1,5, 7) ?
Simplification
x1 x2 x3 y 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Simplification of Boolean expression yields : y = x3 !! which does not require any gates at all !
Goal of Simplification
Goal of simplification is to reduce the complexity of gate circuit. This requires that we minimize the number of gates. Since number of gates depends on number of minterms, one of the goals of simplification is to minimize the number of minterms in SOP expression
y= x1 . x3 x1. x2 . x3 x1. x2 . x3
x1 x3 y
x1 x2 x3 x1 x2 x3
This circuit is simpler not just because it uses 4 gates instead of 5 but also because circuit-2 uses one 2-input and three 3-input gates as compared to five 3-input gates used in circuit-1 V = 5V
VDD = 5V x2
DD
x1
x1 SP y
SP
SP
x2
SP x3
SP y
x1
SN
2-input NAND
x1
SN
3-input NAND
x2
x2 SN x3
SN
SN
Goal of Simplification
In the SOP expression:
Simplification Minimization
Minimization
f = x . y x. y x . y x . y x . y x. y x . y
Principle used : x + x = x
f = x . y x. y x . y x . y x . ( y y ) ( x x). y x y
Simplify
Principle: x + x = 1 and x + x = x
Need a systematic and simpler method for applying these two principles
It represents the information in problem in such a way that the two principles become easy to apply
x 0 0 1 1
y x 0 1
0 m0 m2
1 m1 m3
x 0 0 1 1
y f1 0 1 0 1 0 1 1 0
y x 0 1
0 0 1
1 1 0
f2 = (0, 2,3)
x 0 1
0 0 1
1 1 1
y x 0 1
0 1 0
1 0 1
f = x .y x . y
yz
00 m0 m4
01 m1 m5
11 m3 m7
10 m2 m6
0 1
x 0 0 0 0 1 1 1 1
y z 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1
f 0 1 0 1 0 1 0 1
yz
00 0 0
01 1 1
11 1 1
10 0 0
0 1
yz
00 1 0
01 0 1
11 1 1
10 0 0
0 1
f = x.y . z x . y . z x . y . z x . y . z
0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 0 1 1 1 1
yz wx 00 00 1 01 11 10 0 1 1
yz wx 00 00 0 01 11 10 4 12 8
01 1 5 13 9
11 3 7 15 11
10 2 6 14 10
01 0 1 0 0
11 1 1 0 0
10 0 0 1 0
f =w. x . y . z w. x . y . z w. x . y . z w. x . y . z w . x . y . z w . x . y. z w . x . y . z
f2 = (2,3)
f = x. y x . y f = x.( y y )
y x 0 1
0 0 1
1 0 1
f= x
Combine terms which differ in only one bit position. As a result, whatever is common remains.
y x 0 1
0 0 0
1 1 1
f = x. y x . y
f = ( x. x). y
f = y
y x 0 1
0 1 1
1 0 0
y x 0 1
0 1 0
1 1 0
f=y
f =x
f2 = (0, 2,3)
x 0 1
0 0 1
1 1 1
f = x. y x . y x . y
f = x.( y y ) x . y x x. y
f = x x. y x. y x ( x x). y x y
The idea is to cover all the 1s with as few and as simple terms as possible
3-variable minimization
yz
00 1 0
01 0 1
11 1 1
10 0 0
0 1
f = x.y . z x . y . z x . y . z x . y . z
y. z
x. z
f = x.y . z y . z x . z
3-variable minimization
yz
00 1 0
01 0 1
11 0 1
10 1 0
0 1
f = x.y . z x . y . z x . y . z x . y . z
x. z
x. z
f = x . z x. z
3-variable minimization
yz
00 0 1
01 0 1
11 0 1
10 0 1
0 1
f = x. y . z x . y . z x . y . z x . y . z
x. y
x. y
x yz 00 0 1 01 0 1 11 0 1 10 0 1
f =x . y x . y
0 1
f =x .( y y ) x
yz
00 1 0
01 1 0
11 1 0
10 1 0
yz
00 1 1
01 0 0
11 0 0
10 1 1
0 1
yz
00 0 0
01 1 1
11 1 1
10 0 0
yz
00 1 1
01 0 1
11 0 1
10 1 1
0 1
z
x
f =x z
Can we do this ?
yz
00 0 1
01 0 1
11 0 1
10 0 0
0 1
Note that each encirclement should represent a single product term. In this case it does not.
yz
00 0 0
01 0 1
10 0 1
11 0 0
0 1
f =x . y. z x. y.z x .( y. z y.z )
Note that no simplification is possible. Kmap requires information to be represented
yz
00 0 0
01 1 0
10 0 0
11 1 0
0 1
These two terms can be combined into a single term but it is not easy to show that on the diagram.
4-variable minimization
yz wx 00 00 1 01 11 10 0 1 1
01 0 1 0 0
11 1 1 0 0
10 0 0 1 0
w. y . z
w. x . z
w. y . z
f = w . y. z w . x. z w . y. z w . x . y. z w . x . y. z
But is this the simplest expression ?
yz wx 00 00 1 01 11 10 0 1 1
01 0 1 0 0
11 1 1 0 0
10 0 0 1 0
yz wx 00 00 1 01 11 10 0 1 1
01 0 1 0 0
11 1 1 0 0
10 0 0 1 0
w. x . y . z w. x . y . z w. x . z
w. x . y . z w. x . y . z x . y . z
4-variable minimization
x. y. z
yz wx 00 00 1 01 11 10 0 1 1
01 0 1 0 0
11 1 1 0 0
10 0 0 1 0
w. y . z
w. x . z
w. x . z
w. y . z
f = w . y. z w . x. z w . y. z w . x . z x . y. z
Is this the best that we can do ?
yz wx 00 00 1 01 11 10 0 1 1
01 0 1 0 0
11 1 1 0 0
10 0 0 1 0
yz wx 00 00 1 01 11 10 0 1 1
01 0 1 0 0
11 1 1 0 0
10 0 0 1 0
f = w . y. z w . x. z w . y. z w . x . z x . y. z
f = w . y. z w . x. z w . x . z x . y. z
4-variable minimization
yz wx 00 00 1 01 11 10 1 0 1
01 0 1 0 0
11 0 0 0 0
10 0 0 0 1
yz wx 00 00 1 01 11 10 1 0 1
01 0 1 0 0
11 0 0 0 0
10 0 0 0 1
f = w . x. y w. x. z w . y. z
f = w . x. y w. x. z x . y. z
Groups of 4
yz wx 00 00 0 01 1 0 0 01 1 1 1 1 11 0 1 0 0 10 0 1 0 0
w. x
y.z
11 10
yz wx 00 00 0 01 11 10 0 0 0
01 0 1 1 1
11 0 1 1 1
10 0 0 0 0
x. z w. z
yz wx 00 00 0 01 11 10 1 1 0
01 0 0 0 0
11 0 0 0 0
10 0 1
yz wx 00 00 0
01 1 0 0 1
11 1 0 0 1
10 0 0 0 0
x. z
1 0
01 11 10
0 0 0
x. z
yz wx 00 00 1 01 11 10 0 0 1
01 0 0 0 0
11 0 0 0 0
10 1 0 0 1
yz wx 00 00 1
01 0 0 0 0
11 1 0 0 1
10 0 0 0 0
x. z
01 11 10
0 0 1
??
Groups of 8
yz wx 00 00 0 01 11 10 0 0 0 01 1 1 1 1 11 1 1 1 1 10 0 0 0 0 yz wx 00 00 0 01 0 1 1 0 11 0 1 1 0 10 0 1 1 0
01 11 10
1 1 0
yz wx 00 00 1 01 11 10 1 1 1
01 0 0 0 0
11 0 0 0 0
10 1 1 1 1
yz wx 00 00 1
01 1 0 0 1
11 1 0 0 1
10 1 0 0 1
01 11 10
0 0 1
Examples
yz wx 00 00 0 01 11 10 1 1 0
01 1 1 1 0
11 0 1 1 0
10 1 1 1 1
yz wx 00 00 0 01 11 10 1 1 0
01 1 1 1 0
11 0 0 1 0
10 1 1 1 1
a b
d y0y1y2y3y4y5y6y7y8y9
Y3
cd ab 00 00 0 01 11 10 0 x 0
01 0 0 x 0
11 1 0 x x
10 0 0 x x
y3 a.b.c.d
Dont care terms can be chosen as 0 or 1. Depending on the problem, we can choose the dont care term as 1 and use it to obtain a simpler Boolean expression
Y3
cd ab 00 00 0 01 11 10 0 x 0
01 0 0 x 0
11 1 0 x x
10 0 0 x x
y3 b.c.d
Dont care terms should only be included in encirclements if it helps in obtaining a larger grouping or smaller number of groups.
y x 0 1
0 0 1
1 1 1 1 x 0
0 0 1
1 1 1
f = x y
f = x x. y x. y x ( x x). y x y
x 0 1 y 0 0 0 1 1 1
f=y
y x 0 1
0 1 1
1 0 0
y x 0 1
0 1 0
1 1 0
f =x
f=y
yz
00 1 0
01 0 1
11 0 1
10 1 0
x. z
0 1
xz
f = x . z x. z
f =( x . z ).( x z )
x yz
yz wx 00 00 0 01 11 10 1 1 0
01 1 1 0 0
11 0 1 1 0
10 1 1 1 0
x yz
w y z
w x
f =( x y z ).( x y z ).( w y z ).( w x )
Example
Obtain the minimized PoS by suitably using dont care terms
yz wx 00 00 1 01 11 10 1 0 1
01 x 0 x x
11 0 1 1 1
10 1 1 1 x
f =( x w z ).( x w y ).( y z )
Design Flow
System Description
x y z system f
y z 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1
f 0 1 0 1 0 1 0 1
Truth Table
0 0 0 0 1 1 1 1
Boolean Expression
f = x.y . z x . y . z x . y . z x . y . z
Minimized Boolean Expression
f = x . z x. z
x y y
Gate Netlist
z x z
x1 x2 x3 x1 x2 x3 x1 x2 x3 y
Library of available Gates Inverter Two input NAND Three input NAND AND-OR-Invert
Cost 1 2 3
Y AB C
x. x x
x. y
x. y
f = x. y x y
f =a.b c.d g.h
a b c d g h f
a b c d g h f
a b c d g h f
a b c d g h f
Often there is lot of further optimization that can be done Consider implementation of XOR gate f A .B A. B
f A .B B.B A. B A. A B( A B) A( A B)
x x x
x y
x y
f = x y x. y
To implement using NOR gates, it is easiest to start with minimized Boolean expression in POS form
a b c d g h f
To implement SoP expression using NOR gates, determine first the corresponding PoS expression and then follow the procedure outlined earlier
00 1 0
01 0 1
11 0 1
10 1 0
0 1
f =( x . z ).( x z )
x z x z f
x z x z f
Similarly PoS expression can be implemented as NAND network by first converting it to SoP expression and then following the procedure outlined earlier