Title: CS 140 Lecture 4
1CS 140 Lecture 4
- Professor CK Cheng
- Tuesday 5/08/02
2- Part I. Combinational Logic
- Implementation
- K-map
34-variable K-maps
4Corresponding K-map
d
0 1
3 2
0 0 1 1
4 5 7
6
0 0 1 1
b
12 13 15
14
0 0 1 1
a
8 9
11 10
0 0 1 1
c
f (a, b, c, d) c
5Another example w/ 4 bits
6Corresponding 4-variable K-map
d
0 1
3 2
1 0 0 1
4 5 7
6
1 0 0 -
b
0 0 0 0
12 13 15
14
a
1 0 1 -
8 9
11 10
c
f (a, b, c, d) bc bd acd
7Boolean Expression K-Map
Each Variable xi and its compliment xi
Two half planes Rxi, Rxi divided by xi
?
Each product term P (PXi e.g.
bc)
Intersection of Rxi for all i e P. (A
rectangle e.g. Rb Rc)
?
U
Each minterm
1-cell
?
Two minterms are adjacent if they differ by one
and only one variable, eg
abcd is adjacent to abcd
The two 1-cells are neighbors
?
Each minterm has n adjacent minterms
Each 1-cell has n neighbors
?
8Procedure Input Two sets of F R D
- Draw K-map.
- Expand all terms in F to their largest sizes
(prime implicants). - Choose the essential prime implicants.
- Try all combinations to find the minimal sum of
products. (This is the most difficult step)
9Example
Given F Sm (0, 1, 2, 8, 14) D
Sm (9, 10) 1. Draw K-map
d
0 1
3 2
1 1 0 1
4 5 7
6
0 0 0 0
b
12 13 15
14
0 0 0 1
a
8 9
11 10
1 - 0 -
c
102. Prime Implicants Largest rectangles that
intersect On Set but not Off Set that
correspond to product terms. Sm (0, 1, 2, 9), Sm
(0, 2, 8, 10), Sm (10, 14) 3. Essential Primes
Prime implicants covering elements in F that
are not covered by any other primes. Sm (0, 1,
8, 9), Sm (0, 2, 8, 10), Sm (10, 14) 4. Min exp
Sm (0, 1, 8, 9) Sm (0, 2, 8, 10) Sm (10,
14) f(a,b,c,d) abc abc bcd
(or abd)
11Another example
Given F Sm (0, 3, 4, 14, 15) D
Sm (1, 11, 13) 1. Draw K-map
d
0 1
3 2
1 - 1 0
4 5 7
6
1 0 0 0
b
12 13 15
14
0 - 1 1
a
8 9
11 10
0 0 - 0
c
122. Prime Implicants Largest rectangles that
intersect On Set but not Off Set that
correspond to product terms. E.g. Sm (0, 4), Sm
(0, 1), Sm (1, 3), Sm (3, 11), Sm (14, 15), Sm
(11, 15), Sm (13, 15) 3. Essential Primes Prime
implicants covering elements in F that are
not covered by any other primes. E.g. Sm (0, 4),
Sm (14, 15) 4. Min exp Sm (0, 4), Sm (14, 15),
( Sm (3, 11) or Sm (1,3) ) f(a,b,c,d) abc
abc bcd (or abd)