0% found this document useful (0 votes)
23 views33 pages

Lec 5

PPT of logic design

Uploaded by

kaiwy58.ee11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views33 pages

Lec 5

PPT of logic design

Uploaded by

kaiwy58.ee11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

UNIT 5

KARNAUGH MAPS
Fall 2024
Karnaugh Maps
2 © Iris H.-R. Jiang
¨ Contents
¤ Minimum forms of switching functions
¤ Two- and three-variable Karnaugh maps

¤ Four-variable Karnaugh maps

¤ Determination of minimum expressions using essential prime


implicants
¤ Five-variable Karnaugh maps

¤ Other forms of Karnaugh maps

¤ Other uses of Karnaugh maps


¨ Reading
¤ Unit 5

Karnaugh maps
Recap: Logic Design
3 © Iris H.-R. Jiang
¨ Design a combinational logic circuit starting with a word
description of the desired circuit behavior
¨ Steps:
1. Translate the word description into a switching function (Unit 4)
n Truth table
n Boolean expression: SOP/POS derived from minterm/maxterm
expansion (Unit 4)
2. Simplify the function
n Boolean algebra (Units 2&3)
n Karnaugh map (Unit 5)
n Quine-McCluskey (Unit 6)
n … etc
3. Realize it using available logic gates

Minterm & maxterm expansions


Difficulties in Algebraic Simplification
4 © Iris H.-R. Jiang
¨ Problems:
¤ Difficult to apply in a systematic way
¤ Difficult to tell when you have arrived at a minimum solution

n Minimum SOP/POS
1. Minimum # of terms (i.e., # of gates)
2. Minimum # of literals (i.e., # of gate inputs)
¨ Solutions: systematic methods
1. Karnaugh map (K-map) (Unit 5)
n Especially useful for 3 or 4 variables
n Faster and easier than other methods
2. Quine-McCluskey (Unit 6)
3. … etc.

Karnaugh maps
5 Two- & Three-Variable Karnaugh Maps

Karnaugh maps
Two-Variable Karnaugh Maps (1/2)
6 © Iris H.-R. Jiang
¨ Truth table = minterm expansion = Karnaugh map
¤ Each square of the K-map corresponds to a combination of
values of inputs
¤ i.e., each square = a minterm = a row in truth table

¨ Truth table ¨ Karnaugh map


A' A
A A
mi A B F 0 1 0 1
B B
0 0 0 a0 Minterm
1 0 1 a1 0 A'B' AB' B' 0 m0 m2
2 1 0 a2 A=0, B=0 A=1, B=0
3 1 1 a3 A'B AB B m1 m3
1 1
A=0, B=1 A=1, B=1

Karnaugh maps
Two-Variable Karnaugh Maps (2/2)
7 © Iris H.-R. Jiang
¨ e.g.,
1. Truth table 2. K-map 3. Simplification in K-map
XY'+XY = X(Y'+Y) = X
mi A B F A A
B 0 1 B 0 1
0 0 0 1 One circle
1 0 1 1 0 1 0 0 1 0 eliminates one
2 1 0 0 variable
3 1 1 0 1 1 0 1 1 0

F = A'B'+A'B = A'(B'+B) = A'

Karnaugh maps
Three-Variable Karnaugh Maps
8 © Iris H.-R. Jiang
¨ Minterms in adjacent squares of K-map differ in only ONE bit
¨ Þ Combine them, XY'+XY = X(Y'+Y) = X
A
A A
BC 0 1 BC 0 1

00 000 100 00 m0 m4

01 001 101 100 is 01 m1 m5


adjacent Minterm
C
11 011 111 to 110 11 m3 m7
B
10 010 110 10 m2 m6

Karnaugh maps
Example: F(A, B, C) = S m(1, 3, 5)
9 © Iris H.-R. Jiang
¨ e.g., F(A, B, C) = S m(1, 3, 5) = P M(0, 2, 4, 6, 7)
1. Truth table 2. K-map
mi A B C F A
BC 0 1
0 0 0 0 0
1 0 0 1 1 00 0 0
2 0 1 0 0 0 4
3 0 1 1 1
4 1 0 0 0 01 1 1
1 5
5 1 0 1 1
6 1 1 0 0
11 1 0
7 1 1 1 0 3 7

10 0 0
2 6
F
3. Simplification in K-map
F = A'B'C + A'BC + AB'C = A'C + B'C
Karnaugh maps Þ Minimum SOP form
Product Terms in Karnaugh Maps
10 © Iris H.-R. Jiang
¨ e.g.,
A A A
A A A
BC 0 1 BC 0 1 BC 0 1

00 00 00 1

01 01 01

C C C
11 1 1 11 11
B B B
10 1 1 10 1 1 10 1

B BC' AC'
(A'BC + ABC + A'BC' + ABC' = B)

Karnaugh maps
Example: f(a, b, c) = abc' + b'c + a'
11 © Iris H.-R. Jiang
¨ e.g., f(a, b, c) = abc' + b'c + a'
1. Mark 1’s
2. Make circles (simplify) a
a a
bc 0 1 bc 0 1

00 1 00 1
b'c simplify
01 1 1 01 1 1
c
11 1 11 1
b
10 1 1 10 1 1

a' abc' f = a' + b'c + bc'


X+X=X
Karnaugh maps Make the circle as large as possible
The Consensus Theorem in K-Map
12 © Iris H.-R. Jiang
¨ Overlapped circles imply redundant terms
¨ e.g., the consensus theorem
¤ XY + X'Z + YZ = XY + X'Z (YZ is redundant)
X X
X X
YZ 0 1 YZ 0 1

00 00

YZ (consensus term)
01 1 01 1
X'Z
Z simplify Z
11 1 1 11 1 1
Y Y
10 1 XY 10 1

Karnaugh maps
All Solutions Are Shown in Karnaugh Maps
13 © Iris H.-R. Jiang
¨ All possible minimum SOPs can be determined from K-map
¤ # of terms and # of literals
¨ e.g., F = S m(0, 1, 2, 5, 6, 7)
¤ Make each circle as large as possible

¤ Select as few circles as possible to cover all minterms


a a a
bc 0 1 bc 0 1 bc 0 1

00 1 00 1 00 1

01 1 1 01 1 1 01 1 1
simplify
11 1 11 1 11 1

10 1 1 10 1 1 10 1 1

Karnaugh maps 1. F = a'b' + bc' + ac 2. F = a'c' + b'c + ab


Summary
14 © Iris H.-R. Jiang
¨ Truth table = minterm expansion = Karnaugh map
¨ Simplification in Karnaugh maps
¤ Apply XY'+XY = X(Y'+Y) = X and X + X = X
¤ Minimum SOP = (min # of terms, min # of literals)
¤ Steps: (Adjacent squares differ in only one bit)
1. Mark 1’s
2. Make circles
n Make each circle as large as possible (# of literals)
n Select as few circles as possible to cover all 1’s (# of terms)
¨ Algebraic simplification also holds in Karnaugh maps
¤ Rule A: combining terms: XY + XY' = X
¤ Rule B: eliminating terms: X + XY = X; XY + X'Z + YZ = XY + X'Z
¤ Rule C: eliminating literals: X + X'Y = X + Y
¤ Rule D: adding redundant terms: Y = Y+ XX'; Y = Y(X + X'); XY +
X'Z = XY + X'Z + YZ; X = X + XY

Karnaugh maps
15 Four-Variable Karnaugh Maps

Karnaugh maps
Four-Variable Karnaugh Maps
16 © Iris H.-R. Jiang
¨ Adjacent squares differ in only one bit
¨ e.g., f(a, b, c, d) = acd + a'b + d'
A
AB ab
CD 00 01 11 10 cd 00 01 11 10

00 0 4 12 8 00 1 1 1 1

01 1 5 13 9 01 1 a'b
D d'
11 3 7 15 11 11 1 1 1 acd
C
10 2 6 14 10 10 1 1 1 1

B f = acd + a'b + d' = ac + a'b + d‘


X+X’Y = X+Y
Make the circle as large as possible
Karnaugh maps
Two More Examples
17 © Iris H.-R. Jiang

f2 = S
f1 = S m(1,3,4,5,10,12,13)
m(0,2,3,5,6,7,8,10,11,14,15)
Four corner terms
ab ab combined into b'd'
cd 00 01 11 10 cd 00 01 11 10

00 1 1 00 1 1

01 1 1 1 01 1

11 1 11 1 1 1 1

10 1 10 1 1 1 1

f1= bc' + a'b'd + ab'cd' f2 = c + b'd' + a'bd

Karnaugh maps
Karnaugh Maps with Don’t Cares
18 © Iris H.-R. Jiang
¨ Don’t cares can be assigned with 0’s or 1’s
¨ After assignment, the function becomes completely specified
¨ e.g., f(a, b, c, d) = S m(1, 3, 5, 7, 9) + S d(6, 12, 13)
ab
cd 00 01 11 10

00 X

01 1 1 X 1

11 1 1

10 X

f = a'd + c'd = S m(1, 3, 5, 7, 9, 13)

Karnaugh maps
Minimum POS?
19 © Iris H.-R. Jiang
¨ Minimum SOP = circle 1’s of f
¨ Minimum POS = circle 0’s of f'
¤ Find min. SOP of f', then complement it

¨ e.g., f = x'z' + wyz + w'y'z' + x'y


wx
yz 00 01 11 10
f' = y'z + w'xy + wxz'
00 1 1 0 1 By DeMorgan’s law,
f = (y'z + w'xy + wxz’ )'
01 0 0 0 0 = (y + z')(w + x' + y')(w' + x' + z)

11 1 0 1 1

10 1 0 0 1

Karnaugh maps
20 Prime Implicants

Karnaugh maps
Prime Implicants (1/2)
21 © Iris H.-R. Jiang
¨ Implicant: a product term
¤ i.e., any single 1 or any group of 1’s in the K-map
¨ Prime implicant (PI): an implicant that cannot be covered by
other implicants
¤ i.e., a circle that cannot be enlarged any more

¤ A single 1 is a PI if not adjacent to any other 1’s


¤ Two adjacent 1’s form a PI if not contained in a group of 4 1’s
ab
cd 00 01 11 10
a'b'd'
00 1 1 1 ac'
a'b'c'd'
01 1 1 ab'c'

abc'
11 1
a'b'c
Not PI
Karnaugh maps
a'c'd' 10 1 1 PI
Prime Implicants (2/2)
22 © Iris H.-R. Jiang
¨ Cover: a set of prime implicants which covers all 1’s
¨ A minimum SOP contains only prime implicants (Why?)
¤ Þ Minimum cover = (min # of PIs, min # of literals)

¨ Don’t cares are treated just like 1’s


¨ e.g.,
ab
cd 00 01 11 10
PI: a'b'd, bc', ac, a'c'd, ab, b'cd
00 1 1 Min SOP:
1. a'b'd + bc' + ac
01 1 1 1 2. a'c'd + ab + b'cd
Þ 1. is better

11 1 1 1

10 1 1

Karnaugh maps
Essential Prime Implicants
23 © Iris H.-R. Jiang
¨ Essential prime implicant: If a minterm is covered by only one
PI, the PI is essential
¤ Essential PI MUST be included in minimum SOP
¤ Find essential PI’s = find the 1’s circled only once

¨ e.g., f = CD + BD + B'C + AC
AB AB
CD 00 01 11 10 CD 00 01 11 10

00 00
m5

01 1 1 01 1 1
Essential
11 1 1 1 1 11 1 1 1 1

m14
10 1 1 1 10 1 1 1
m2
Karnaugh maps f = BD + B'C + AC
One More General Example
24 © Iris H.-R. Jiang
¨ Find minimum cover:
1. Find all PI’s
2. Find essential PI’s
3. Find a minimum set of PI’s to cover the remaining 1’s
AB AB
CD 00 01 11 10 CD 00 01 11 10

00 1 1 00 1 1
0 4 12 8 0 4 12 8

01 1 1 01 1 1
1 5 13 9 1 5 13 9
Essential
11 1 1 1 11 1 1 1
3 7 15 11 3 7 15 11

10 1 10 1
2 6 14 10 2 6 14 10
A'BD
f = A'C' + A'B'D' + ACD +
Karnaugh maps BCD
Summary
25 © Iris H.-R. Jiang
¨ Minimum SOP = minimum cover = a minimum set of PI’s which
cover all 1’s
¤ Minimum cover = (min # of PIs, min # of literals)
¨ Steps:
1. Find all PI’s
2. Find essential PI’s
3. Find a minimum set of PI’s to cover the remaining 1’s
¨ Recap: steps of simplification in Karnaugh maps
1. Mark 1’s
2. Make circles
n Make each circle as large as possible = find PI
n Select as few circles as possible to cover all 1’s = find min
cover

Karnaugh maps
Flowchart Chooses a uncovered 1
26 © Iris H.-R. Jiang

AB Find all adjacent 1’s & X’s


CD 00 01 11 10

00 X0 14 18 Are the chosen1


N and its adjacent 1’s
& X’s covered by a
01 15 113 19
single term?

11 X7 X15 Y
That term is an essential
prime implicant. Loop it.
10 16 110

All uncovered N
Note: All essential PI’s 1’s checked?
have been determined Y
at this point Find a min. set of prime
implicants which cover the
Karnaugh maps remaining 1’s on the map. stop
27 Five-Variable Karnaugh Maps

Karnaugh maps
Five-Variable Karnaugh Maps
28 © Iris H.-R. Jiang
¨ e.g.,
BC These terms do not combine
DE 00 01 11 10
16 20 28 24
1 1 1
00 1 1 1
0 4 12 8
17 21 29 25
1 1 These 8 terms
01
A 1 1 combine into BD'
1/0 1 5 13 9
19 23 31 27
11 1 1
1 1 These 4 terms
3 7 15 11 combine into CDE’
18 22 30 26
10 1 1
2 6 14 10
Karnaugh maps These 2 terms combine into AB'DE'
Adjacency in 5-Variable Karnaugh Maps
29 © Iris H.-R. Jiang
¨ 4 in the same layer, one in the other layer
BC
DE 00 01 11 10

00 1

1
A 01
1 1 1
1/0

11
1

10

Karnaugh maps
30 Other Forms of 5-Variable K-Maps

Karnaugh maps
Form 1
31 © Iris H.-R. Jiang
¨ Two maps side-by-side

BC BC
DE 00 01 11 10 DE 00 01 11 10

00 1 1 1 1 00 1 1 1 1

01 1 1 01 1 1

11 1 11 1 1

10 1 10

A=0 A=1

F = D'E' + B'C'D' + BCE + A'BC'E' + ACDE

Karnaugh maps
Form 2
32 © Iris H.-R. Jiang
¨ A mirror image map A
B

1 1 1 1 1 1 1 1

1 1 1 1
E
1 1 1
D
1

C C
F = D'E' + B'C'D' + BCE + A'BC'E' + ACDE

Karnaugh maps
33 Other Uses of Karnaugh Maps

Many operations that can be performed


using a truth table or algebraically can
be done using a Karnaugh Map (Unit 5.6)

Karnaugh maps

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy