chapter 3 simplification of switching functions. karnaugh maps (k-map) a k-map is a graphical...

72
Chapter 3 Simplification of Switching Functions

Upload: norman-lyons

Post on 16-Dec-2015

224 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Chapter 3

Simplification of Switching Functions

Page 2: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Karnaugh Maps (K-Map)

A K-Map is a graphical representation of a logic function’s truth table

Page 3: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Relationship to Venn Diagrams

a b

ab

ab abab

Page 4: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Relationship to Venn Diagrams

a b

0m

2m 1m3m

Page 5: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Relationship to Venn Diagrams

0m

1m

2m

3mb

a

Page 6: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Relationship to Venn Diagrams

0

1

2

3b

a

Page 7: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Relationship to Venn Diagrams

0 1

0

1

ab0

1

2

3

Page 8: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Two-Variable K-Map

0 1

0

1

ab

Page 9: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map

abc 00 01 11 10

0

1

0m

1m

2m

3m

6m

7m

4m

5m

Page 10: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map

abc 00 01 11 10

0

1

Page 11: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map

abc 00 01 11 10

0

1

Edges are adjacent

Page 12: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Four-variable K-Map

abcd 00 01 11 10

00

01

11

10

0m

1m

2m

3m

6m

7m

4m

5m

12m

13m

14m

15m

10m

11m

8m

9m

Page 13: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Four-variable K-Mapab

cd 00 01 11 10

00

01

11

10

Page 14: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Four-variable K-Mapab

cd 00 01 11 10

00

01

11

10

Edges are adjacent

Edg

es

are

ad

jace

nt

Page 15: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Plotting Functions on the K-map

SOP Form

Page 16: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Canonical SOP Form

Three Variable Example

F ABC ABC ABC ABC

using shorthand notation

6 3 1 5F m m m m

, , 1,3,5,6F A B C m

Page 17: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

, , 1,3,5,6F a b c m

Plot 1’s (minterms) of switching function

1 1 1

1

Page 18: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

, ,F a b c ab bc

Plot 1’s (minterms) of switching function

1 1 1

1 abbc

Page 19: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Four-variable K-Map Exampleab

cd 00 01 11 10

00

01

11

10

, , , 0, 2,9,12,14F a b c d m

1

1

1

1

1

Page 20: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Karnaugh Maps (K-Map)

Simplification of Switching Functionsusing K-MAPS

Page 21: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Terminology/Definition Literal

A variable or its complement Logically adjacent terms

Two minterms are logically adjacent if they differ in only one variable position

Ex:

abc abcand

m6 and m2 are logically adjacent

Note: abc abc a a bc bc Or, logically adjacent terms can be combined

Page 22: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Terminology/Definition

Implicant Product term that could be used to cover

minterms of a function Prime Implicant

An implicant that is not part of another implicant

Essential Prime Implicant An implicant that covers at least one minterm

that is not contained in another prime implicant

Cover A minterm that has been used in at least one

group

Page 23: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Guidelines for Simplifying Functions

Each square on a K-map of n variables has n logically adjacent squares. (i.e. differing in exactly one variable)

When combing squares, always group in powers of 2m , where m=0,1,2,….

In general, grouping 2m variables eliminates m variables.

Page 24: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Guidelines for Simplifying Functions

Group as many squares as possible. This eliminates the most variables.

Make as few groups as possible. Each group represents a separate product term.

You must cover each minterm at least once. However, it may be covered more than once.

Page 25: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

K-map Simplification Procedure

Plot the K-map Circle all prime implicants on the K-

map Identify and select all essential

prime implicants for the cover. Select a minimum subset of the

remaining prime implicants to complete the cover.

Read the K-map

Page 26: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Example

Use a K-Map to simplify the following Boolean expression

, , 1, 2,3,5,6F a b c m

Page 27: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 1: Plot the K-map

1 1 1

1

, , 1, 2,3,5,6F a b c m

1

Page 28: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 2: Circle ALL Prime Implicants

1 1 1

1

, , 1, 2,3,5,6F a b c m

1

Page 29: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 3: Identify Essential Prime Implicants

1 1 1

1

, , 1, 2,3,5,6F a b c m

1

EPI

EPI

PI

PI

Page 30: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 4: Select minimum subset of remaining Prime Implicants to complete the cover.

1 1 1

1

, , 1, 2,3,5,6F a b c m

1

EPIPI

EPI

Page 31: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 5: Read the map.

1 1 1

1

, , 1, 2,3,5,6F a b c m

1

bcab

bc

Page 32: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Solution

, ,F a b c ab bc bc ab b c

Page 33: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Example

Use a K-Map to simplify the following Boolean expression

, , 2,3,6,7F a b c m

Page 34: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 1: Plot the K-map

11

11

, , 2, 4,5,7F a b c m

Page 35: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 2: Circle Prime Implicants

11

11

, , 2,3,6,7F a b c m

Wrong!!We reallyshould drawA circle aroundall four 1’s

Page 36: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 3: Identify Essential Prime Implicants

EPIEPI

, , 2,3,6,7F a b c m

11

11Wrong!!We reallyshould drawA circle aroundall four 1’s

Page 37: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 4: Select Remaining Prime Implicants to complete the cover.

EPIEPI

11

11

, , 2,3,6,7F a b c m

Page 38: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 5: Read the map.

abab

11

11

, , 2,3,6,7F a b c m

Page 39: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Solution

, ,F a b c ab ab b

Since we can still simplify the functionthis means we did not use the largestpossible groupings.

Page 40: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 2: Circle Prime Implicants

11

11

, , 2,3,6,7F a b c m

Right!

Page 41: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 3: Identify Essential Prime Implicants

EPI

, , 2,3,6,7F a b c m

11

11

Page 42: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 5: Read the map.

b

11

11

, , 2,3,6,7F a b c m

Page 43: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Solution

, ,F a b c b

Page 44: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Special Cases

Page 45: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1 1 1 1

1

, , 1F a b c

11

1

1

Page 46: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

, , 0F a b c

Page 47: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1 1

, ,F a b c a b c

1

1

1

Page 48: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Four Variable Examples

Page 49: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Example

Use a K-Map to simplify the following Boolean expression

, , , 0, 2,3,6,8,12,13,15F a b c d m

Page 50: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Four-variable K-Mapab

cd 00 01 11 10

00

01

11

10

, , , 0, 2,3,6,8,12,13,15F a b c d m

1

1

1

1

11

1

1

Page 51: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Four-variable K-Mapab

cd 00 01 11 10

00

01

11

10

0,2,3,6,8,12,13,15F m

1

1

1

1

11

1

1

Page 52: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Four-variable K-Mapab

cd 00 01 11 10

00

01

11

10

F abd abc acd abd acd

1

1

1

1

11

1

1

Page 53: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Example

Use a K-Map to simplify the following Boolean expression

, , , 0, 2,6,8,12,13,15

3,9,10

F a b c d m

d

D=Don’t care (i.e. either 1 or 0)

Page 54: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Four-variable K-Mapab

cd 00 01 11 10

00

01

11

10

1

1

d

1

11

1

1

, , , 0, 2,6,8,12,13,15 3,4,9F a b c d m d

d

d

Page 55: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Four-variable K-Mapab

cd 00 01 11 10

00

01

11

10

1

1

d

1

11

1

1

F ac ad abd

d

d

Page 56: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Five Variable K-Maps

, , , ,F a b c d e

Page 57: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Five variable K-map

A=1

A=0

Use two four variable K-maps

Page 58: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Use Two Four-variable K-Maps

bcde 00 01 11 10

00

01

11

10

bcde 00 01 11 10

00

01

11

10

A=0 map A=1 map

Page 59: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Five variable example

, , , , 5,7,13,15,21,23,29,31F a b c d e m

Page 60: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Use Two Four-variable K-Maps

bcde 00 01 11 10

00

01

11

10

bcde 00 01 11 10

00

01

11

10

A=0 map A=1 map

, , , , 5,7,13,15,21,23,29,31F a b c d e m

1

1

1

1

1

1

1

1

Page 61: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Use Two Four-variable K-Maps

bcde 00 01 11 10

00

01

11

10

bcde 00 01 11 10

00

01

11

10

A=0 map A=1 map

1

1

1

1

1

1

1

1

1F a ce 2F a ce

Page 62: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Five variable example

1 2F F F a ce a ce ce

Page 63: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Plotting POS Functions

Page 64: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

K-map Simplification Procedure

Plot the K-map for the function F Circle all prime implicants on the K-map Identify and select all essential prime

implicants for the cover. Select a minimum subset of the remaining

prime implicants to complete the cover. Read the K-map Use DeMorgan’s theorem to convert F to F

in POS form

Page 65: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Example

Use a K-Map to simplify the following Boolean expression

, , 1, 2,3,5,6F a b c M

Page 66: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 1: Plot the K-map of F

1 1 1

11

, , 1, 2,3,5,6F a b c M

Page 67: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 2: Circle ALL Prime Implicants

1 1 1

11

Page 68: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 3: Identify Essential Prime Implicants

1 1 1

11

EPI

EPI

PI

PI

Page 69: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 4: Select minimum subset of remaining Prime Implicants to complete the cover.

1 1 1

11

EPIPI

EPI

Page 70: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Three-Variable K-Map Example

abc 00 01 11 10

0

1

Step 5: Read the map.

1 1 1

11

bcab

bc

Page 71: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

Solution

F ab bc bc

F ab bc bc

a b b c b c

, , 1, 2,3,5,6F a b c M

Page 72: Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table

TPS Quiz