Title: CS 140 Lecture 3
1CS 140 Lecture 3
- Professor CK Cheng
- Tuesday 4/09/02
2- Part I. Combinational Logic
- Implementation
- K-map
3Example w/ 4 bits
4Corresponding K-map
b
0 4
12 8
1 0 0 1
1 5
13 9
1 0 0 -
d
3 7
15 11
0 0 0 0
c
2 6
14 10
1 0 1 -
a
f (a, b, c, d) bc bd acd
5Boolean 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
variable, eg
abcd is adjacent to abcd
The two cells are neighbors
?
Each minterm has n adjacent neighbors
Each cell has n neighbors
?
6Another example 3 bits
f(a, b, c, d) a bc
Id a b c f (a,b,c,d) 0 0
0 0 1 1 0 0 1
1 2 0 1 0 1 3 0
1 1 0 4 1 0 0
0 5 1 0 1 0 6 1
1 0 0 7 1 1 1
0
7Corresponding K-map
b
0 2 6
4
1 1 0 0
1 3 7
5
c
1 1 1 0
a
8One more 4 bit example f(a,b,c,d) a bc
9Corresponding K-map
b
0 4
12 8
1 1 0 0
1 5
13 9
1 1 0 0
d
3 7
15 11
1 1 1 0
c
2 6
14 10
1 1 1 0
a
10Given a K-map, derive a minimal Boolean
expression in sum of products form (or product of
sums). Obj minimal of terms, minimal of
literals. Hints of terms gt of rectangles
of literals gt inverse of the size
of rectangles (if the size of the rectangle
is larger, then we can reduce literals) We
want to find the minimum number of rectangles in
their largest sizes to cover the On Set.
11Procedure Input Two sets of F R D
- Draw K-map.
- Expand all terms in F to their largest sizes
(prime implicant). - Choose the essential prime implicants.
- Try all combinations to find the minimal sum of
products. (This is the most difficult step)