07 KM - PowerPoint PPT Presentation

1 / 57
About This Presentation
Title:

07 KM

Description:

Karnaugh Maps ECEn/CS 224 07 KM Page * 07 KM Page * ECEn/CS 224 4-Variable Karnaugh Map Note the row and column orderings. Required for adjacency D A BC AB C F ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 58
Provided by: Thom135
Category:

less

Transcript and Presenter's Notes

Title: 07 KM


1
Karnaugh Maps
2
What are Karnaugh Maps?
  • A simpler way to handle most (but not all) jobs
    of manipulating logic functions.

Hooray !!
3
Karnaugh Map Advantages
  • Minimization can be done more systematically
  • Much simpler to find minimum solutions
  • Easier to see what is happening (graphical)
  • Almost always used instead
  • of boolean minimization.

4
Gray Codes
  • Gray code is a binary value encoding in which
    adjacent values only differ by one bit

2-bit Gray Code
00
01
11
10
5
Truth Table Adjacencies
These are adjacent in a gray code sense -
they differ by 1 bit We can apply XY XY
X AB AB A(BB) A(1) A
F A
F B
Same idea AB AB B
Key idea Gray code adjacency allows use of
simplification theorems
Problem Physical adjacency in truth table does
not indicate gray code adjacency
6
2-Variable Karnaugh Map
A B F
0 0
0 1
1 0
1 1
A1, B0
A0, B0
A1, B1
A0, B1
A different way to draw a truth table by folding
it
7
Karnaugh Map
  • In a K-map, physical adjacency does imply gray
    code adjacency

F AB AB B
F AB AB A
8
2-Variable Karnaugh Map
9
2-Variable Karnaugh Map
10
2-Variable Karnaugh Map
11
2-Variable Karnaugh Map
12
2-Variable Karnaugh Map
F AB AB A
13
2-Variable Karnaugh Map
A 0
F A
14
Another Example
F AB AB AB (AB AB) (AB AB)
A B
15
Another Example
A 1
B 1
F A B
16
Yet Another Example
F 1
Groups of more than two 1s can be combined
17
3-Variable Karnaugh Map Showing Minterm Locations
Note the order of the B C variables 0 0
0 1 1 1 1 0
ABC 101
ABC 010
18
3-Variable Karnaugh Map Showing Minterm Locations
Note the order of the B C variables 0 0
0 1 1 1 1 0
ABC 101
ABC 010
19
Adjacencies
  • Adjacent squares differ by exactly one variable

There is wrap-around top and bottom rows are
adjacent
20
Truth Table to Karnaugh Map
0
0
1
0
1
1
0
1
21
Minimization Example
ABCABC AC
ABCABC AB
F AB AC
22
Another Example
ABCABC AC
ABCABC AC
F AC AC A ? C
23
Minterm Expansion to K-Map
F ?m( 1, 3, 4, 6 )
0
1
1
0
1
0
0
1
Minterms are the 1s, everything else is 0
24
Maxterm Expansion to KMap
F ?M( 0, 2, 5, 7 )
0
1
1
0
1
0
0
1
Maxterms are the 0s, everything else is 1
25
Yet Another Example
2n 1s can be circled at a time 1, 2, 4, 8,
OK 3 not OK
ABCABCABCABC B
ABCABC AC
F B AC
The larger the group of 1s the simpler the
resulting product term
26
Boolean Algebra to Karnaugh Map
  • Plot abc bc a

27
Boolean Algebra to Karnaugh Map
  • Plot abc bc a

28
Boolean Algebra to Karnaugh Map
  • Plot abc bc a

29
Boolean Algebra to Karnaugh Map
  • Plot abc bc a

30
Boolean Algebra to Karnaugh Map
  • Plot abc bc a

Remaining spaces are 0
31
Boolean Algebra to Karnaugh Map
Now minimize . . .
  • F BC BC A

This is a simpler equation thanwe started
with. Do you see how we obtained it?
32
Mapping Sum of Product Terms
  • The 3-variable map has 12 possible groups of 2
    spaces
  • These become terms with 2 literals

33
Mapping Sum of Product Terms
  • The 3-variable map has 6 possible groups of 4
    spaces
  • These become terms with 1 literal

34
4-Variable Karnaugh Map
ABC
D
ABC
F ABC ABC D
Note the rowand column orderings. Required for
adjacency
35
Find a POS Solution
BC
CD
F CD BC ABCD F (CD)(BC)(ABCD
)
ABCD
Find solutions to groups of 0s to find F Invert
to get F then use DeMorgans
36
Dealing With Dont Cares
F ?m(1, 3, 7) ?d(0, 5)
37
Dealing With Dont Cares
F ?m(1, 3, 7) ?d(0, 5)
ABCABCABCABC C
F C
Circle the xs that help get bigger groups of 1s
(or 0s if POS) Dont circle the xs that dont
38
Minimal K-Map Solutions
  • Some Terminology
  • and
  • An Algorithm to Find Them

39
Prime Implicants
  • A group of one or more 1s which are adjacent and
    can be combined on a Karnaugh Map is called an
    implicant.
  • The biggest group of 1s which can be circled to
    cover a given 1 is called a prime implicant.
  • They are the only implicants we care about.

40
Prime Implicants
Prime Implicants
Non-prime Implicants
Are there any additional prime implicants in the
map that are not shown above?
41
All The Prime Implicants
Prime Implicants
When looking for a minimal solution only
circle prime implicants A minimal solution will
never contain non-prime implicants
42
Essential Prime Implicants
Not all prime implicants are required
A prime implicant which is the only cover of some
1 is essential a minimal solution requires it.
Essential Prime Implicants
Non-essential Prime Implicants
43
A Minimal Solution Example
Not required
F AB BC AD
Minimum
44
Another Example
45
Another Example
AB is not requiredEvery one one of
itslocations is covered by multiple
implicants After choosing essentials, everything
is covered
F AD BCD BD
Minimum
46
Finding the Minimum Sum of Products
  • 1. Find each essential prime implicant and
    include it in the solution.
  • 2. Determine if any minterms are not yet covered.
  • 3. Find the minimal of remaining prime
    implicants which finish the cover.

47
Yet Another Example(Use of non-essential primes)
48
Yet Another Example(Use of non-essential primes)
AD
CD
AC
Essentials AD and ADNon-essentials AC and
CD Solution AD AD AC
or AD AD CD
AD
49
K-Map Solution Summary
  • Identify prime implicants
  • Add essentials to solution
  • Find a minimum non-essentials required to cover
    rest of map

50
5- and 6-Variable K-Maps
51
5-Variable Karnaugh Map
This is the A0 plane
This is the A1 plane
The planes are adjacent to one another (one is
above the other in 3D)
52
Some Implicants in a 5-Variable KMap
DE
ABCDE
A0
A1
ABCD
ABCD
BCDE
Some of these are not prime
53
5-Variable KMap Example
Find the minimum sum-of-products for F ? m
(0,1,4,5,11,14,15,16,17,20,21,30,31)
A0
A1
54
5-Variable KMap Example
Find the minimum sum-of-products for F ? m
(0,1,4,5,11,14,15,16,17,20,21,30,31)
A0
A1
F BD BCD ABDE
55
6-Variable Karnaugh Map
AB00
AB10
AB01
AB11
56
AB00
AB10
AB01
AB11
Solution ACD CDEF
CDEF
ACD
57
KMap Summary
  • A Kmap is simply a folded truth table
  • where physical adjacency implies logical
    adjacency
  • KMaps are most commonly used hand method for
    logic minimization
  • KMaps have other uses for visualizing Boolean
    equations
  • you may see some later.
Write a Comment
User Comments (0)
About PowerShow.com