Gate Level Minimization

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

Gate Level Minimization

1
EE360: Digital Design I (by Dr. Abdullah Balamash)
Spring 2012
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
2
Gate level minimization refers to the design task of finding an
optimal gate-level implementation of a Boolean function
describing a digital system
The MAP method:
Minimizing a Boolean function algebraically can be awkward
because it lacks the specific rules to predict each succeeding
step of the process
The MAP method is another form of the truth table
It is known as the Karnaugh map or K-map
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
3
A K-map is a diagram made up of squares, with each square
represents one minterm
Each square represent a minterm of the function need to be
minimized has a value one, which means that the function is
one at the values that represent the minterm
The minimized (simplified) function is one of the standard
forms (SOP or POS)
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
4
Two-variable K-map

(a)F = xy
(b)F = xy + x y + xy
= (x + y)

Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
5
Minimization is done by combining squares (minterms) that
differ in only one literal (i.e., xyzw and xyzw)
Example: Simplify the function F(x, y) = xy + x

1
1
F = x + y
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
6
Example: Simplify the function F(x, y) = xy + xy + xy + xy

1
1 1
xy
xy
y
y
F = y + y = 1
1
1 1
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
7
Three-variable K-map

Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
8
Example: Simplify the function
F(x, y, z) = (2, 3, 4, 5)
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
9
Example: Simplify the function
F(x, y, z) = (3, 4, 6, 7)
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
10
Example: Simplify the function
F(x, y, z) = (0, 2, 4, 5, 6)

Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
11
Example: Simplify the function
F(A, B, C) = AC + AB + ABC + BC
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
12
Four-variable K-map
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
13
Example: Simplify the function
F(w, x, y, z) = (0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14)
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
14
Example: Simplify the function
F(A, B, C, D) = ABC + BCD + ABCD +ABC
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
15
Prime implicants
When choosing adjacent squares in a map, we must ensure
that:
All the minterms of the function are covered (included)
The number of terms in the expression is minimized
There are no redundant terms (minterms already covered by
other terms)
A prime implicant is a product term obtained by combing
the maximum possible number of adjacent squares in the
map
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
16
A single 1 on a map represents a prime implicant if it is not
adjacent to any other 1s
Two adjacent 1s on a map represents a prime implicant if
they are not contained in a four squares prime implicant
Four adjacent 1s on a map represents a prime implicant if
they are not contained in eight squares prime implicant
If a minterm in a square is covered by only one prime
implicant, the prime implicant is said to be essential

Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
17
Example: Simplify the following function and show the
essential prime implicants
F(A, B, C, D) = (0, 2, 3, 5, 7, 8, 9, 10, 11, 13, 15)
m
0
1
m
1
1
m
3
1
m
2
1
m
4
1
m
5
1
m
7
1
m
6
1
m
12
1
m
13
1
m
15
1
m
14
1
m
8
1
m
9
1
m
11
1
m
10
1
AB
CD
00 01 11 10
00

01

11

10
m
0
1
m
1
1
m
3
1
m
2
1
m
4
1
m
5
1
m
7
1
m
6
1
m
12
1
m
13
1
m
15
1
m
14
1
m
8
1
m
9
1
m
11
1
m
10
1
AB
CD
00 01 11 10
00

01

11

10
BD
BD
CD
AD
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
18
m
0
1
m
1
1
m
3
1
m
2
1
m
4
1
m
5
1
m
7
1
m
6
1
m
12
1
m
13
1
m
15
1
m
14
1
m
8
1
m
9
1
m
11
1
m
10
1
AB
CD
00 01 11 10
00

01

11

10
BD
BD
CD
AB
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
19
m
0
1
m
1
1
m
3
1
m
2
1
m
4
1
m
5
1
m
7
1
m
6
1
m
12
1
m
13
1
m
15
1
m
14
1
m
8
1
m
9
1
m
11
1
m
10
1
AB
CD
00 01 11 10
00

01

11

10
BD
BD
B C
AB
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
20
m
0
1
m
1
1
m
3
1
m
2
1
m
4
1
m
5
1
m
7
1
m
6
1
m
12
1
m
13
1
m
15
1
m
14
1
m
8
1
m
9
1
m
11
1
m
10
1
AB
CD
00 01 11 10
00

01

11

10
BD
BD
B C
AD
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
21
Product-of-Sum Minimization
Example: Simplify the following function into POS
F(A, B, C, D) = (0, 1, 2, 5, 8, 9, 10)

F = (B + D)(C + D)(A + B)
Minimization
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
22
DONT CARE CODITIONS:
When we do not care about the output for certain inputs, we
do not put 1 in the map and we put x (dont care) instead
NAND Implementation
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
23
The implementation of Boolean functions with NAND gates
requires that the functions be in SOP form
In the SOP form, we need only to replace all gates with
NAND gates and invert all single literals into the OR gate
NAND Implementation
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
24
F = AB + CD
F = (A B) (C D)
NAND Implementation
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
25
F = AB + CD
= [(AB + CD ) ]
= [(AB) (CD) ]
= (A B) (C D)


NOR Implementation
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
26
The implementation of Boolean functions with NOR gates
requires that the functions be in POS form
In the POS form, we need only to replace all gates with
NOR gates and invert all single literals into the AND gate
NOR Implementation
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
27
F = (A + B)(C + D)E
(A B) (C D) E
NOR Implementation
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
28
F = (A + B)(C + D)E
= [[(A + B)(C + D)E] ]
= [(A + B) + (C + D) + E ]
= (A B) (C D) E
Other Two-Level Implementations
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
29
Other names Implementation Other names Implementation
POS OR-AND SOP AND-OR
NOR-NOR NAND-NAND
AND-OR-
INVERTER
NAND-AND
OR-AND-
INVERTER
NOR-OR
AND-NOR OR-NAND
Nondegenerate Forms
OR-OR AND-AND
NOR-NAND NAND-NOR
OR-NOR AND-NAND
NOR-AND NAND-OR
Degenerate Forms
Other Two-Level Implementations
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
30
AND-OR-INVERTER:
AND-NOR
NAND-AND
Other Two-Level Implementations
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
31
F` = (AB + CD + E)
F = (AB + CD + E)` (AND-OR-Inverter, AND-NOR)
= AB CD E
Or
F = (AB + CD + E)`
= (AB)` (CD)` E`
= (A B) (C D) E` (NAND-AND)
Other Two-Level Implementations
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
32
OR-AND-INVERTER:
OR-NAND
NOR-OR

Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
33
F` = (A + B) (C + D) E
F = [(A + B) (C + D) E]` (OR-AND-Inverter, OR-
NAND)
= (A + B) (C + D) E
Or
F = [(A + B) (C + D) E]`
= (A + B)` + (C + D)` + E`
= (A B) + (C D) + E` (NOR OR)
Other Two-Level Implementations
Two-Level Implementations
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
34
Example: f(x,y,z) = xyz + xyz
We need to find the following two level implementations:
SOP (AND-OR), NAND-NAND
POS (OR-AND), NOR-NOR
AND-OR-Inverter, AND-NOR, NAND-AND
OR-AND-Inverter, OR-NAND, NOR-OR
10 11 01
00 x/yz
0 0 0 1 0
1 0 0 0 1
f = z (x + y)(x + y )
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
35
f(x,y,z) = xyz + xyz (SOP)
f = (x + y + z)(x + y + z)
f = z (x + y)(x + y ) (POS)
f = z + xy + xy
NAND-NAND
f = xyz + xyz (SOP)
= [(xyz + xyz) ]
= [(xyz) (xyz)]
= (xyz) (xyz)



Two-Level Implementations
Two-Level Implementations
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
36
NOR-NOR
f = z (x + y)(x + y ) (POS)
= [(z (x + y)(x + y ) ) ]
= [z + (x + y) + (x + y ) ]
= [z (x y) (x y )]
Two-Level Implementations
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
37
AND-OR-Inverter, AND-NOR, NAND-AND
f = z + xy + xy (SOP, for f)
f = (z + xy + xy) (AND-OR-Inverter)
= (z xy xy) (AND-NOR)
f = (z + xy + xy)
= (z (xy) (xy))
= z (xy) (xy) (NAND-AND)
Two-Level Implementations
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
38
OR-AND-Inverter, OR-NAND, NOR-OR
f = (x + y + z)(x + y + z) (POS, f)
f = [(x + y + z)(x + y + z)] (OR-AND-Inverter)
= (x + y + z)(x + y + z) (OR-NAND)
f = [(x + y + z)(x + y + z)]
= (x + y + z) + (x + y + z)
= (x y z) + (x y z) (NOR-OR)

Exclusive-OR Function (XOR)
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
39
x y = xy + xy
The function is 1 if only one of the variables is 1, but not both (if x
and y are different)
(x y) = (xy + xy) = (x + y)(x + y) = xy +xy is the
exclusive-NOR function (equivalent function) that is equal to 1 if x and
y are equal
Identities:
x 0 = x
x 1 = x
x x = 0
x x = 1
x y = x y = (x y)


+
+
+
+
+
+
+
+
+
Exclusive-OR Function (XOR)
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
40
The XOR of more than two variables is called the odd
function since the output is 1 if and only if the number of
inputs of value 1 are odd
Accordingly, A B C can be expressed as:
ABC + ABC + ABC + ABC = (1, 2, 4, 7)
The complement of the XOR is called the XNOR and it is
called the even function
+ +
XOR and XNOR
Spring 2012
EE360: Digital Design I (by Dr. Abdullah Balamash)
41

You might also like