CMPUT329 - Fall 2003 - PowerPoint PPT Presentation

About This Presentation
Title:

CMPUT329 - Fall 2003

Description:

f1(w,x,y,z) = wxy'z wxyz' g1(XYZ) = XY X'Z YZ. f2(w,x,y,z) = w' x' yz y'z' ... wxy'z wxyz' CMPUT 329 - Computer Organization and Architecture II ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 89
Provided by: josenels
Category:
Tags: cmput329 | fall | wxyz

less

Transcript and Presenter's Notes

Title: CMPUT329 - Fall 2003


1
CMPUT329 - Fall 2003
  • Topic 4 Cost of Logic Circuits and Karnaugh
    Maps
  • José Nelson Amaral

2
Reading Assignment
Chapter 4 Section 4.3.4, 4.3.5, 4.3.6, 4.3.7,
4.3.8
3
Cost of Implementing a Logic Circuit
The cost of implementing a logic circuit is
related to the number of gates used and with the
number of inputs in each gate.
A literal is a boolean variable or its complement.
4
Cost of Implementing a Logic Circuit
5
Cost of a Logic CircuitExamples
What is the cost of the following boolean
equations?
f1(w,x,y,z) wxyz wxyz
C(f1) 44210
6
Karnaugh Maps
M. Karnaugh, The Map Method for Synthesis of
Combinatorial Logic Circuits, Transactions of
the American Institute of Electrical
Engineers, Communications and Electronics,
Vol. 72, pp. 593-599, November 1953. and
A Karnaugh Map is a graphical tool to assist on
the minimization of logic equations. Similar to
a truth table, a Karnaugh Map specifies a value
for each combination of inputs.
7
Anatomy of Karnaugh Maps
8
Anatomy of Karnaugh Maps
A Karnaugh Map for four variables.
ABCD
A
B
9
Application of Karnaugh Maps The One-bit Adder
How to use a Karnaugh Map instead of
the Algebraic simplification?
10
Application of Karnaugh Maps The One-bit Adder
0
0
0
1
Now we have to cover all the 1s in the Karnaugh
Map using the largest rectangles and as few
rectangles as we can.
0
1
1
1
Karnaugh Map for Cout
11
Application of Karnaugh Maps The One-bit Adder
Now we have to cover all the 1s in the Karnaugh
Map using the largest rectangles and as few
rectangles as we can.
0
0
0
1
Cout
Karnaugh Map for Cout
12
Application of Karnaugh Maps The One-bit Adder
Now we have to cover all the 1s in the Karnaugh
Map using the largest rectangles and as few
rectangles as we can.
0
0
0
1
Cout AB
Karnaugh Map for Cout
13
Application of Karnaugh Maps The One-bit Adder
Now we have to cover all the 1s in the Karnaugh
Map using the largest rectangles and as few
rectangles as we can.
0
0
0
1
Cout AB ACin
Karnaugh Map for Cout
14
Application of Karnaugh Maps The One-bit Adder
Now we have to cover all the 1s in the Karnaugh
Map using the largest rectangles and as few
rectangles as we can.
0
0
0
1
Cout AB ACin BCin
Karnaugh Map for Cout
15
Application of Karnaugh Maps The One-bit Adder
0
1
1
0
1
0
1
0
S
Karnaugh Map for S
16
Application of Karnaugh Maps The One-bit Adder
0
1
1
0
1
0
1
0
S ABCin
Karnaugh Map for S
17
Application of Karnaugh Maps The One-bit Adder
0
1
1
0
1
0
1
0
S ABCin ABCin
Karnaugh Map for S
18
Application of Karnaugh Maps The One-bit Adder
0
1
1
0
1
0
1
0
S ABCin ABCin ABCin
Karnaugh Map for S
19
Application of Karnaugh Maps The One-bit Adder
0
1
1
0
1
0
1
0
S ABCin ABCin ABCin ABCin
Karnaugh Map for S
20
Prime Implicants
Any single 1 or group of 1s in the Karnaugh map
of a function F is an implicant of F.
A product term is called a prime implicant of F
if it cannot be combined with another term to
eliminate a variable.
Implicant Not an Implicant Implicant Prime
Implicant Prime Implicant
21
Essential Prime Implicants
A product term is an essential prime implicant of
F if there is a minterm that is only covered by
that prime implicant.
The minimal sum-of-products form of F must
include all the essential prime implicants of F.
Theorem If a minterm mj of F and all its
adjacent minterms are covered by a single term
pi, then pi is an essential prime implicant of F.
22
Example
Express the complement f(w,x,y,z) of the
following expression as a sum of minterms
f(w,x,y,z) wx(yz yz)
23
Example
Express the complement f(w,x,y,z) of the
following expression as a sum of minterms
f(w,x,y,z) wx(yz yz)
w
wxyz wxyz
y
24
Example
Express the complement f(w,x,y,z) of the
following expression as a sum of minterms
f(w,x,y,z) wx(yz yz)
w
wxyz wxyz
y
25
Example
Express the complement f(w,x,y,z) of the
following expression as a sum of minterms
f(w,x,y,z) wx(yz yz)
w
wxyz wxyz
This is the Karnaugh Map for f(w,x,y,z).
1
How do we build the Karnaugh Map for f(w,x,y,z)?
1
y
26
Example
If we reverse the value in each position of the
Karnaugh map of f(w,x,y,z), we obtain the
Karnaugh map for f(w,x,y,z).
27
Example
If we reverse the value in each position of the
Karnaugh map of f(w,x,y,z), we obtain the
Karnaugh map for f(w,x,y,z).
Now we can write the minimized form for
f(w,x,y,z) from its Karnaugh map.
w
1
f(w,x,y,z) x
y
28
Example
If we reverse the value in each position of the
Karnaugh map of f(w,x,y,z), we obtain the
Karnaugh map for f(w,x,y,z).
Now we can write the minimized form for
f(w,x,y,z) from its Karnaugh map.
w
1
f(w,x,y,z) x w
y
29
Example
If we reverse the value in each position of the
Karnaugh map of f(w,x,y,z), we obtain the
Karnaugh map for f(w,x,y,z).
Now we can write the minimized form for
f(w,x,y,z) from its Karnaugh map.
w
1
f(w,x,y,z) x w yz
y
30
Example
If we reverse the value in each position of the
Karnaugh map of f(w,x,y,z), we obtain the
Karnaugh map for f(w,x,y,z).
Now we can write the minimized form for
f(w,x,y,z) from its Karnaugh map.
w
1
f(w,x,y,z) x w yz yz
y
31
Examples
In Topic 2 we used the following algebraic
transformations to prove the consensus
theorem. Could we use Karnaugh maps to obtain
such a proof?
32
Examples
First we need to build the Karnaugh map for
the expression
XY XZ YZ
Now we need to write the simplified
expression from the Karnaugh map.
XY XZ
33
Minimum Sum-of-products
The minimum sum-of-products of a function F
is formed by some, but not necessarily all, of
the prime implicants of the function.
Write all the prime implicants for the function g
expressed as this Karnaugh Map.
A
1
1
Example
AB AD BD AC
1
1
1
1
1
1
1
B
34
Minimum Sum-of-products
The minimum sum-of-products of a function F
is formed by some, but not necessarily all, of
the prime implicants of the function.
Now write the minimum sum-of-products of g.
A
1
1
Example
AB AD BD AC
1
1
1
1
1
1
1
B
35
Karnaugh Maps of Product-of-sums
Find the minimum sum-of-minterms form for
the following function
F (b c d)(a b d)(a b d)(a b
c)
36
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
Now we can easily build the Karnaugh map for F.
a
b
37
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
Now we can easily build the Karnaugh map for F.
a
b
38
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
Now we can easily build the Karnaugh map for F.
a
1
1
b
39
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
Now we can easily build the Karnaugh map for F.
a
1
1
1
b
40
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
Now we can easily build the Karnaugh map for F.
a
1
1
1
1
1
b
41
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
Now we can easily build the Karnaugh map for F.
a
a
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

1
b
b
F
F
42
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
What is the set of prime implicants of F?
a
1
1
1
1
1
1
1
1

1
b
F
43
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
What is the set of prime implicants of F?
a
bd
acb
1
1
1
1
1
1
1
1

1
b
F
44
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
What is the set of prime implicants of F?
a
bd
acb
1
1
1
acd
1
1
1
1
1

1
b
F
45
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
What is the set of prime implicants of F?
a
bd
acb
1
1
1
acd
1
1
abd
1
1
1

1
b
F
46
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
What is the set of prime implicants of F?
a
bd
acb
1
1
1
acd
1
1
abd
bcd
1
1
1

1
b
F
47
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
What is the set of prime implicants of F?
a
bd
acb
1
1
1
acd
1
1
abd
bcd
1
1
abc
1

1
b
F
48
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
What is the set of prime implicants of F?
a
bd
Which prime implicants are essential for F?
acb
1
1
1
acd
1
1
abd
bcd
1
1
abc
acd
1

1
b
F
49
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
What is the set of prime implicants of F?
a
bd
Which prime implicants are essential for F?
acb
1
1
1
acd
1
1
abd
Only bd is essential.
bcd
1
1
abc
acd
1

1
Does the set of all essential prime
implicants completely define F?
b
F
50
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
Now we can write the minimized form for F.
a
1
1
1
1
1
1
1
1

1
b
F
51
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
Now we can write the minimized form for F.
a
1
1
1
1
1
F bd acd
1
1
1

1
b
F
52
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
Now we can write the minimized form for F.
a
1
1
1
1
1
F bd acd bcd
1
1
1

1
b
F
53
Karnaugh Maps of Product-of-sums
F (b c d)(a b d)(a b d)(a b
c)
F bcd abd abd abc
Now we can write the minimized form for F.
a
1
1
1
1
1
F bd acd bcd acd
1
1
1

1
b
F
54
Incompletely Specified Functions
A
N1
N2
B
F
C
Assumption N1 never produces the combinations
ABC 001 and ABC 110.
Question What value should F produce for the
combinations ABC 001 and ABC
110?
We dont care!!!
55
Incompletely Specified Functions (Cont.)
How can we use the fact that we dont care
about the value produced by F when ABC 001 or
ABC 110 to simplify the circuit N2?
AC(B B) (A A)BC
AC1 1BC
AC BC
56
Incompletely Specified Functions (Cont.)
However, if we assume that F(0,0,1) 1 and
F(1,1,0) 1, we obtain instead the equation
F(A,B,C) ABC ABC ABC ABC ABC
ABC
AB(C C) AB(C C) AB(C C)
AB 1 AB 1 AB 1
AB AB AB
AB AB AB AB
A(B B) (A A)B
A1 1B
A B
Compare this with the other solution F(A,B,C)
AC BC. Which one is cheaper to implement?
57
Incompletely Specified Functions
Dont care values are easily used to
simplify incompletely specified functions.
58
Another Example
Write the minimized sum-of-product expression for
F given in this Karnaugh map.
59
Another Example
Write the minimized sum-of-product expression for
F given in this Karnaugh map.
F cd bcd
60
Another Example
Write the minimized sum-of-product expression for
F given in this Karnaugh map.
F cd bcd abc
61
5-Variable Karnaugh Maps
F
C
62
5-Variable Karnaugh Maps
F BD
B
1
1
1
1
1
1
1

C
C
A
63
5-Variable Karnaugh Maps
F BD CDE
B
1
1
1
1
1
1
1

C
C
A
64
5-Variable Karnaugh Maps
F BD CDE ABDE
B
1
1
1
1
1
1
1

C
C
A
65
5-Variable Karnaugh Maps
F BD CDE ABDE ACDE
B
1
1
1
1
1
1
1

C
C
A
66
5-Variable Karnaugh Maps
F BD CDE ABDE ACDE ACDE
B
1
1
1
1
1
1
1

C
C
A
67
6-Variable Karnaugh Map
1

X
1

1
1
X

X
X

1
1


1

1
X

1
X

1
1

1
1
X
X
1
1
1
1
1
X
X


1

1
X

X
68
6-Variable Karnaugh Map
1

X
1

1
1
X

X
X

1
1


1

1
X

1
g CE
X

1
1

1
1
X
X
1
1
1
1
1
X
X


1

1
X

X
69
6-Variable Karnaugh Map
1

X
1

1
1
X

X
X

1
1


1

1
X

1
g CE ACE
X

1
1

1
1
X
X
1
1
1
1
1
X
X


1

1
X

X
70
6-Variable Karnaugh Map
1

X
1

1
1
X

X
X

1
1


1

1
X

1
g CE ACE DEF
X

1
1

1
1
X
X
1
1
1
1
1
X
X


1

1
X

X
71
ExampleBCD to Braille Convertion
72
ExampleBCD to Braille Convertion
A
X
X
X
X
X
X
B
W ?
73
ExampleBCD to Braille Convertion
A
1
X
1
1
1
X
1
X
1
X
1
1
X
X
B
W ?
74
ExampleBCD to Braille Convertion
A
1
X
1
1
1
X
1
X
1
X
1
1
X
X
B
W B C AD AD
75
ExampleBCD to Braille Convertion
W B C AD AD
A
X
X
X
X
X
X
B
X ?
76
ExampleBCD to Braille Convertion
W B C AD AD
A
1
1
X
X
1
1
X
1
X
1
X
X
B
X ?
77
ExampleBCD to Braille Convertion
W B C AD AD
A
1
1
X
X
1
1
X
1
X
1
X
X
B
X ACD CD AD BC
78
ExampleBCD to Braille Convertion
W B C AD AD
X ACD CD AD BC
A
X
X
X
X
X
X
B
Y ?
79
ExampleBCD to Braille Convertion
W B C AD AD
X ACD CD AD BC
A
1
1
X
1
1
X
X
1
X
X
X
B
Y ?
80
ExampleBCD to Braille Convertion
W B C AD AD
X CD CD AD BC
A
1
1
X
1
1
X
X
1
X
X
X
B
Y ACD AD BD
81
ExampleBCD to Braille Convertion
W B C AD AD
X ACD CD AD BC
Y ACD AD BD
A
1
X
1
X
1
X
1
X
1
1
X
X
B
Z AD BC BD
82
ExampleBCD to Braille Convertion
How can we use these standard sum-of-product equat
ions to implement a multiple-output NAND network?
We use the DeMorgan Law X AB CD ((AB
CD)) ((AB)(CD))
83
ExampleBCD to Braille Convertion
How do we implement this conversor in a PAL14H4?
84
A
B
C
D
W
X
Y
Z
PAL14H4
85
W B C AD AD
A
B
C
D
W
X
Y
Z
PAL14H4
86
X ACD CD AD BC
A
B
C
D
W
X
Y
Z
PAL14H4
87
Y ACD AD BD
A
B
C
D
W
X
Y
Z
PAL14H4
88
Z AD BC BD
A
B
C
D
W
X
Y
Z
PAL14H4
Write a Comment
User Comments (0)
About PowerShow.com