Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Understanding Karnaugh Maps for Logic Simplification, Study Guides, Projects, Research of Logic

An in-depth explanation of Karnaugh Maps, a technique for simplifying logical expressions. It covers the definitions, objectives, and uses of Karnaugh Maps for deriving minimal sum-of-products and product-of-sums expressions. The document also introduces the concept of 'don't care' entries and shows how to extend Karnaugh map techniques to include maps with don't care entries.

What you will learn

  • How do you derive minimal sum-of-products and product-of-sums expressions using Karnaugh Maps?
  • What are Karnaugh Maps and how are they used to simplify logical expressions?
  • What are 'don't care' entries in the context of Karnaugh Maps and how are they handled?
  • What are the benefits of using Karnaugh Maps for logic simplification?
  • How do you extend Karnaugh Map techniques to include maps with don't care entries?

Typology: Study Guides, Projects, Research

2021/2022

Uploaded on 09/27/2022

fazal
fazal 🇺🇸

4.6

(12)

230 documents

1 / 18

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
1ECE/CoE 0132 Karnaugh Maps
Karnaugh Maps
Objectives
This section presents techniques for simplifying logical expressions:
Define Karnaugh and establish the correspondence between Karnaugh
maps and truth tables and logical expressions.
Show how to use Karnaugh maps to derive minimal sum-of-products
and product-of-sums expressions.
Introduce the concept of "don't care" entries and show how to extend
Karnaugh map techniques to include maps with don't care entries.
Reading Assignment
Please use chapter titles since chapter numbers vary by edition
Chapter 4. Optimized Implementation of Logic Functions
Sections 4.1-4.5 on Karnaugh maps.
Hazards: Chapter 9, Section 6 (Static hazards only).
2ECE/CoE 0132 Karnaugh Maps
Karnaugh Map Definitions
A Karnaugh map is a two-dimensional truth-table.
Unlike ordinary (i.e., one-dimensional) truth tables,
however, certain logical network simplifications can
be easily recognized from a Karnaugh map.
Two-Variable Maps
Truth Table
0
0
1
1
0
1
0
1
0
1
1
0
AB Z A
B
Z
Type 1 Map
0 1
1 0
B
Z
Type 2 Map
A01
0
1
0 1
1 0
Three-Variable Maps Type 2 Map
10
1
1
1
0
0
0
01
0 0
0 1
1 1
1 0
Z
B,C A
C
Type 1 Map
A
B
Z
0 1
1
1
1
0
0
0
Truth Table
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
ABC
0
1
1
0
1
0
0
1
Z
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download Understanding Karnaugh Maps for Logic Simplification and more Study Guides, Projects, Research Logic in PDF only on Docsity!

ECE/CoE 0132 1 Karnaugh Maps

Karnaugh Maps

 Objectives

This section presents techniques for simplifying logical expressions:

 Define Karnaugh and establish the correspondence between Karnaugh

maps and truth tables and logical expressions.

 Show how to use Karnaugh maps to derive minimal sum-of-products

and product-of-sums expressions.

 Introduce the concept of "don't care" entries and show how to extend

Karnaugh map techniques to include maps with don't care entries.

 Reading Assignment

 Please use chapter titles since chapter numbers vary by edition

 Chapter 4. Optimized Implementation of Logic Functions

 Sections 4.1-4.5 on Karnaugh maps.

 Hazards: Chapter 9, Section 6 (Static hazards only).

ECE/CoE 0132 2 Karnaugh Maps

Karnaugh Map Definitions

A Karnaugh map is a two-dimensional truth-table.

Unlike ordinary ( i.e. , one-dimensional) truth tables,

however, certain logical network simplifications can

be easily recognized from a Karnaugh map.

Two-Variable Maps

Truth Table

A B Z A

B

Z

Type 1 Map

B

Z

Type 2 Map

A 0

Three-Variable Maps

Type 2 Map

Z

B,C A

C

Type 1 Map

A

B

Z

Truth Table

AB C

Z

ECE/CoE 0132 3 Karnaugh Maps

Four-Variable Maps

Truth Table

A B C D

Z

Type 2 Map

Z

C,D 00 01 1110

A,B

A

B

C

D

Z

Type 1 Map

ECE/CoE 0132 4 Karnaugh Maps

The interpretation of a type 1 map is that the rows or columns labeled with a variable correspond to region of the map where that variable has value 1.

Numbering of Karnaugh Map Squares.

A = 1

region

C = 1

region

D = 1

region

B = 1

region

A

B

C D

A

B

C D

A

B

C D

A

B

C D

Z

C,D 00 01

A,B

Z

B,C

A

B

Z A

ECE/CoE 0132 7 Karnaugh Maps

Merging Adjacent Product Terms Z = m 5 m 13 = A'•B•C'•D + A•B•C'•D = (A'+A)•B•C'•D = 1•B•C'•D = B•C'•D

 Example

A

B

C

D

Z

A'

BC'

D

A

B

C'

D

Z

BC'

D Z

B

A

C

D

Z

A • B • C'

A' • C • D

ECE/CoE 0132 8 Karnaugh Maps

For k-variable maps, this reduction technique can also be applied to groupings of 4,8,16,...,2k rectangles all of whose binary numbers agree in (k-2),(k-3),(k- 4),...,0 positions, respectively.

Z = m 5 m 7 m 13 m 15 = A'•B•C'•D + A'•B•C•D + A•B•C'•D + A•B•C•D = (A'•C' + A'•C + A•C' + A•C) • (B•D) = (A'•(C' + C) + A•(C' + C)) • (B•D) = (A' + A) • (B•D) = B•D

B

A

C

D

Z

ECE/CoE 0132 9 Karnaugh Maps

Basic Karnaugh Map Groupings for Three-Variable Maps.

B

A

C

Z

B

A

C

Z

B

A

C

Z

1 B

C

Z

A

B

A

C

Z

B

A

C

Z

ECE/CoE 0132 10 Karnaugh Maps

Basic Karnaugh Map Groupings for Four-Variable Maps.

D

B

A

C

Z

B

A

C

D

Z

B

A

C

1 1 D

Z

C

D

A

B

Z

B

A

C

Z

1 1 D

B

A

C

D

Z

B

A

C

Z

1 D

C

D

Z

A

B

ECE/CoE 0132 13 Karnaugh Maps

 Invalid Karnaugh Map Groupings.

B

A

C

D

Z

Violates Rule 1

B

A

C

D

Z

Violates Rule 2

loop 1 loop 2

ECE/CoE 0132 14 Karnaugh Maps

In order to minimize the resulting logical expression, the groupings should be selected as follows:  Identify those groupings that are maximal in the sense that they are not contained in any other possible grouping. The product terms obtained from such groupings are called prime implicants. A distinguished 1-cell is a cell that is covered by only one prime implicant. An essential prime implicant is one that covers a distiquished 1- cell.

 Use the fewest possible number of maximal groupings needed to cover all of the squares marked with a 1.

Examples:

B

A

C

D

Z

ECE/CoE 0132 15 Karnaugh Maps

a. Z = A•B•D+A•B'•C'+A'•B•C'+A'•C•D+A'•B'•D' b. Z = B•D+A•B'•C'+A'•B•C'+A'•C•D+A'•B'•D' c. Z = B•D+A•B'•C'+A'•C'•D'+A'•B'•C

B

A

C

D

Z

B

A

C

D

Z

B

A

C

D

Z

a. Non-minimal

Product Terms

b. Non-minimal Selection

of Prime Implicants

c. Minimal

Grouping

B

A

C

W

D

B

A

C

D

W

a. W3 = C'D+AC'+BC+A'B'D' b. W3 = BD+AB+B'C'+A'CD'

ECE/CoE 0132 16 Karnaugh Maps

Exercise: Derive minimal sum-of-products logical expressions from the following Karnaugh maps.

A

C

B

D

A

C

B

D

1 1 1

1 1

1

0 0 1 1

0 0 0

0

0

0

1 1 1

1 1

1

0 0 1 1

0 0 0

0

0

0

X (^) Y

X = A•B + A'•B'•D' + A'•B'•C + B•C•D'

Y =A'•C' + A•C•D' + A•B•C + B•C'•D'

ECE/CoE 0132 19 Karnaugh Maps

Examples:

Z = (A+D')•(B'+C+D)•(A'+B+C'+D)

Z1 = (A+B'+D)•(B+C+D')•(A+B+D') Z2 = D'•(A+B')•(B'+C')

B

A

C

Z

D

B'+C+D

A+D'

A'+B+C'+D

B

A

C

Z

0 0 D

A

C

Z

B

D

ECE/CoE 0132 20 Karnaugh Maps

Comparison of Sum-of-Products and Product-of- Sums Expressions.

A

C

Z

B

D

0 0 C

Z

00 0 D

A

B

Z1 = (A+B')•(A+D')•(B'+D')•(A'+B+C) Z1 = (A•B•D') + (A•B'•C) + (A'•B'•D')

ECE/CoE 0132 21 Karnaugh Maps

A

C

B

D

A

C

B

D

1 1 1

1 0

0

1 1 0 0

1 0 0

1

1

0

1 1 1

1 0

0

1 1 0 0

1 0 0

1

1

0

X (^) X

B•D' + A•C'^ + A•D' + B•C'

Exercise: Derive minimal SOP and POS expressions from the following Karnaugh maps.

X = Y = (B' + D')^ • (A' + C')

ECE/CoE 0132 22 Karnaugh Maps

Don't Care Entries

Assignment of Values to Don't Care Entries.

A

B

Z

C

d

d 0 0

A

B

Z

C

A

B

Z

C

A

B

Z

C

Z = B'+A'•C Z = A•B'+B'•C' Z = B'

0 d 1

1

d 0 d d

d d

A

B

C

D

Z

1 d

1

d 0

d

d d

A

C

D

Z

d 1

1 1 B Z = B•C + A•D' Z = (C+D')•(A'+B')

ECE/CoE 0132 25 Karnaugh Maps

Six-Variable Maps

E

D

F

C

E

D

F

C

E

D

F

C

E

D

F

C

Six Variable Map Structure

B

A

C

E

Z

C

F

Alternate Version of Six-Variable Map

D

E

D

F

B

A

D C D C

F

F

E

E

ECE/CoE 0132 26 Karnaugh Maps

Examples.

B

D

Z

C

B

E

C

A

B•E

B' •C' • E'

Z = B'•C'•E'+B•E

B

C

D

Z B

C

E

A

A'B'D + CE + ABD + BD'E'

ECE/CoE 0132 27 Karnaugh Maps

B

C

D

Z B

C

E

A

d 1

B

C

D

Z B

C

E

A

d

d d d d

d d d d 0 0

1 1

d d d d

Z = (B+C)•(B+E•(A'+D+E)•(A+C+E)

Z = B•C + D

ECE/CoE 0132 28 Karnaugh Maps

Exercise: Draw a timing diagram for the following circuit assuming an equal unit delay for each gate.

Timing Hazards

A

B

X

Y

Y

A

B

X

ECE/CoE 0132 31 Karnaugh Maps

 The loop added to prevent the hazard is redundant and not needed to realize the logical expression. Its only purpose is to prevent the hazard.

 This technique will avoid all static 1 hazards if only one variable is changed at a time.  It is not possible to get a 1 spike from a 2-level AND-OR network by changing only one variable. Why?

A

S

B Z

ECE/CoE 0132 32 Karnaugh Maps

 Static 0 hazard

 The static 0 hazard is caused by two OR gates where one holds the output zero before the transition and the other after the transition, and it is possible for them to both be 1 during the transition  The fix is to put in an extra OR gate to hold the output zero during the transition

A = 0

B = 0

S

Z

P

Q

A

B

Z

S

A

S

B Z

S

P

NS

Q

Z

1 spike, static 0 hazard

ECE/CoE 0132 33 Karnaugh Maps

Hazards can frequently be ignored. If the signal Z above is not used during the transition, then we don't care if it has a spike. When a signal is used as the input to a flip-flop, it is only sampled with the clock makes a transition. Therefore, if we can make sure that any spikes occur at some other time, they will not be a problem.

ECE/CoE 0132 34 Karnaugh Maps

Tips and Tricks

Use type 2 maps to plot from a truth table

Use type 1 maps to plot expressions and read expressions from a map.

Pitfalls

Forgetting that K-maps "wrap around"

Forgetting that the 4 corners are adjacent

Getting the complements reversed in reading POS expressions from a K-map