Professional Documents
Culture Documents
DigitalCircuits2
Goal of Simplification
I the In th SOP expression: i 1 Minimize number of product terms 1. 2. Minimize number of literals in each term
Simplification Minimization
Minimization
y = x1 . x3 + x1. x3
y =( ( x1 + x1 ). ) x3
y = x3
Principle i i l used: d x+ x =1
3
f = x .( y + y ) + x . y
f = ( x + x) ( x + y ) f = ( x .x + xx + x . y + x. y ) f = ( x + x . y + x. y ) f = ( x + y.( x + x )) f = (x + y)
f = x + x. y
Principle: x + x = 1 and x + x = x
4
Karnaugh K hM Map (K map) )i is a popular l t technique h i f for carrying i out simplification It represents the information in problem in such a way that the two p principles p become easy y to apply pp y
Principle: x + x = 1 and x + x = x
y x 0 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
0 0 1
1 1 0
6
f2 =
(1, 2,3 )
y x 0 1 0 1 0 1 0 1
y x 0 1
0 0 1
1 1 1
f = x .y + x . y
7
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
yz
00 m0 m4
01 m1 m5
11 m3 m7
10 m2 m6
0 1
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
yz
00 m0 m4
01 m1 m5
11 m3 m7
10 m2 m6
yz
00 0 0
01 1 1
11 1 1
10 0 0
9
0 1
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
10
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 01 0 1 0 0 11 1 1 0 0
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
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
11
f 2 = (2,3) (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.
12
y x 0 1
0 0 0
1 1 1
f = x. y + x . y f = ( x. + x). y
y x 0 1 0 1 0
f=y
1 1 0
y x 0 1
0 1 1
1 0 0
f=y
f =x
13
f 2 = (1, 2,3)
x 0 1
0 0 1
1 1 1
f = x y + x y + x y = x y + x y + x y + x y = x ( y + y ) + (x + x ) y = x+ y
The idea Th id is i to t cover all ll the th 1s 1 with ith as few f and d as simple i l terms as possible
14
3-variable minimization
f = x .y . z + x . y . z + x . y . z + x . y . z
x yz 00 1 0 01 0 1 11 1 1 10 0 0
0 1
y. z
x. z
f = x .y . z + y . z + x . z
15
3-variable minimization
f = x .y . z + x . y . z + x . y . z + x . y . z
x yz 00 1 0 01 0 1 11 0 1 10 1 0
0 1
x. z
x. z
f = x . z + x. z
16
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 yz 00 0 1 01 0 1 0 1
x. y
11 0 1 10 0 1
f =x . y + x . y
f =x .( y + y ) = x
17
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
0 1
z
18
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.
We do not get a single product term. In general we cannot make groups of 3 terms.
19
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.
20
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.
x + x=1
21
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
Is this the simplest expression ?
22
yz wx 00 00 1
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
01 0 1 0 0
11 1 1 0 0
10 0 0 1 0
01 11 10
0 1 1
w. x . y . z + w. x . y . z = x . y . z
w. x . y . z + w. x . y . z = w. x . z
23
4-variable minimization
yz wx 00 00 1 01 0 1 0 0 11 1 1 0 0 10 0 0 1 0
x. y. z
01 11 10
0 1 1
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 ?
24
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
25
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
26
Groups of 4
yz wx 00 00 0 01 11 10 1 0 0 01 1 1 1 1 11 0 1 0 0 10 0 1 0 0
w. x
x. z
01 0 1 1 1 11 0 1 1 1 10 0 0 0 0
27
yz wx 00 00 0 01 0 0 0
y.z
11
w. z
10
yz wx 00 00 0 01 11 10 1 1 0
01 0 0 0 0
11 0 0 0 0
10 0 1 1 0
yz wx 00 00 0
01 1 0 0 1
11 1 0 0 1
10 0 0 0 0
x. z
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
y yz wx 00 00 1
01 0 0 0 0
11 1 0 0 1
10 0 0 0 0
28
x. z
01 11 10
0 0 1
??
Groups of 8
y 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
29
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
30
a b
d y0y1y2y3y4y5y6y7y8y9
Y3
d 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
31
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 d 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 D t care t terms should h ld only l b be i included l d di in encirclements i l t if it helps in obtaining a larger grouping or smaller number of groups.
32
f1 = ( x + y ) ( x + y )
f1 = M 0 M 3
f1 = (M 0 , M 3 )
33
f = x+ y
f = x + x. y + x. y = x + ( x + x). y = x+ y
Sum of Product (SoP)
f=y
34
y x 0 1
0 1 1
1 0 0
y x 0 1
0 1 0
1 1 0
f =x
f=y
x yz 00 1 0 01 0 1 11 0 1 10 1 0
x+z
0 1
x+z
35
f =( x + z ).( x + z ) f = x . z + x . z
x+ y+z
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+ y+z
w+ y + z
w+ x
Example
Obtain the minimized PoS by y suitably y using g 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 =( w + x + z ).( w + x + y ).( y + z )
37
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
38
x. x = x
NAND to AND
x. y
NAND to OR
x. y
x
f = x. y = x + y
f =a.b + c.d + f .g
AND
OR
41
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
43
x+ x = x
NOR to OR
x+ y
NOR to AND
x+ y
x
f = x + y = x. y
44
OR
AND
45
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
x
0 1
f =( x + z ).( ) ( x + z)
x z x z f
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
47
48