Karnaugh Maps 2 Schedule Friday 3 rd - Quiz 2 - - PowerPoint PPT Presentation

karnaugh maps
SMART_READER_LITE
LIVE PREVIEW

Karnaugh Maps 2 Schedule Friday 3 rd - Quiz 2 - - PowerPoint PPT Presentation

Computer Systems and Networks ECPE 170 Jeff Shafer University of the Pacific Karnaugh Maps 2 Schedule Friday 3 rd - Quiz 2


slide-1
SLIDE 1

ì ¡

Computer ¡Systems ¡and ¡Networks ¡

ECPE ¡170 ¡– ¡Jeff ¡Shafer ¡– ¡University ¡of ¡the ¡Pacific ¡

Karnaugh ¡Maps ¡

slide-2
SLIDE 2

Schedule ¡

ì Friday ¡3rd ¡-­‑ ¡Quiz ¡2 ¡

ì Review ¡K-­‑maps ¡and/or ¡Simple ¡computer ¡

  • rganizaHon ¡

ì Monday ¡6th ¡ ¡

ì Simple ¡computer ¡organizaHon ¡ ì Exam ¡review ¡

ì Wednesday ¡8th ¡-­‑ ¡Exam ¡1 ¡

ì Will ¡discuss ¡later ¡ ì Exam ¡covers ¡all ¡of ¡Chapters ¡2 ¡and ¡3 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

2 ¡

slide-3
SLIDE 3

Recap ¡

ì What ¡is ¡the ¡difference ¡between ¡a ¡decoder ¡and ¡a ¡

mulHplexer? ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

3 ¡

slide-4
SLIDE 4

Recap ¡

ì What ¡is ¡the ¡clock ¡of ¡a ¡digital ¡circuit? ¡ ì Square ¡wave ¡signal ¡ ì “Pulse” ¡of ¡a ¡sequenHal ¡circuit ¡– ¡allows ¡events ¡to ¡

happen ¡in ¡a ¡sequence ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

4 ¡

slide-5
SLIDE 5

Recap ¡

ì What ¡are ¡the ¡outputs ¡of ¡these ¡common ¡flip-­‑flops? ¡

(and ¡what ¡are ¡their ¡names?) ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

5 ¡

slide-6
SLIDE 6

ì ¡

K-­‑Maps ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

6 ¡

slide-7
SLIDE 7

Introduction ¡to ¡Karnaugh ¡Maps ¡

ì Chapter ¡3A ¡in ¡textbook ¡ ì SimplificaHon ¡of ¡Boolean ¡funcHons ¡is ¡good… ¡

ì Produces ¡simpler ¡(and ¡usually ¡faster) ¡digital ¡circuits ¡

ì … ¡but ¡also ¡Hme-­‑consuming ¡and ¡error-­‑prone ¡

ì Easy ¡to ¡mis-­‑use ¡idenHHes ¡

7 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-8
SLIDE 8

Introduction ¡to ¡Karnaugh ¡Maps ¡

ì K-­‑Maps ¡are ¡an ¡easy, ¡systemaHc ¡method ¡for ¡

reducing ¡Boolean ¡expressions ¡

ì Named ¡aTer ¡Maurice ¡Karnaugh ¡(engineer ¡at ¡Bell ¡

Labs ¡in ¡1950’s) ¡

ì Invented ¡a ¡graphical ¡way ¡of ¡visualizing ¡and ¡then ¡

simplifying ¡Boolean ¡expressions ¡

8 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-9
SLIDE 9

Introduction ¡to ¡Karnaugh ¡Maps ¡

ì A ¡Kmap ¡is ¡a ¡matrix ¡represenHng ¡a ¡Boolean ¡funcHon ¡

ì Rows ¡and ¡column ¡headers ¡represent ¡the ¡input ¡

values ¡ ¡

ì Cells ¡represent ¡corresponding ¡output ¡values ¡

ì Input ¡values ¡are ¡forma[ed ¡as ¡minterms ¡

ì Minterm ¡is ¡a ¡product ¡term ¡that ¡contains ¡all ¡of ¡the ¡

funcHon’s ¡variables ¡exactly ¡once, ¡either ¡ complemented ¡or ¡not ¡complemented ¡

9 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-10
SLIDE 10

Disclaimer ¡

ì WARNING: ¡Are ¡you ¡currently ¡taking ¡ECPE ¡71 ¡this ¡

semester? ¡(or ¡have ¡already ¡taken ¡it?) ¡

ì Do ¡K-­‑Maps ¡the ¡way ¡Dr. ¡Basha ¡told ¡you ¡to! ¡

ì Our ¡book ¡

ì Flips ¡the ¡axis ¡(w ¡x ¡on ¡leT, ¡y ¡z ¡on ¡top) ¡ ì Only ¡cares ¡about ¡consolidaHng ¡1’s, ¡and ¡thus ¡doesn’t ¡

always ¡write ¡in ¡the ¡0’s ¡ ì The ¡answer ¡is ¡the ¡same, ¡so ¡use ¡whatever ¡process ¡

you ¡already ¡know ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

10 ¡

slide-11
SLIDE 11

Minterms ¡

ì For ¡example, ¡the ¡minterms ¡for ¡a ¡funcHon ¡having ¡

the ¡inputs ¡x ¡and ¡y ¡are: ¡

ì Consider ¡the ¡Boolean ¡funcHon, ¡ ì Its ¡minterms ¡are: ¡

11 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-12
SLIDE 12

Minterms ¡

ì FuncHon ¡with ¡three ¡inputs? ¡

ì

Minterms ¡are ¡similar… ¡

ì

Just ¡imagine ¡counHng ¡in ¡ binary ¡to ¡find ¡all ¡the ¡ minterms… ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

12 ¡

slide-13
SLIDE 13

Introduction ¡to ¡Karnaugh ¡Maps ¡

ì A ¡Kmap ¡has ¡a ¡cell ¡for ¡each ¡

minterm ¡

ì

Cell ¡for ¡each ¡line ¡for ¡the ¡ truth ¡table ¡of ¡a ¡funcHon ¡ ì The ¡truth ¡table ¡for ¡the ¡

funcHon ¡F(x,y) ¡= ¡xy ¡is ¡shown ¡ along ¡with ¡its ¡corresponding ¡ Kmap ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

13 ¡

slide-14
SLIDE 14

Introduction ¡to ¡Karnaugh ¡Maps ¡

ì Truth ¡table ¡and ¡Kmap ¡for ¡the ¡

funcHon ¡F(x,y) ¡= ¡x ¡+ ¡y ¡

ì This ¡funcHon ¡is ¡equivalent ¡to ¡

the ¡OR ¡of ¡all ¡of ¡the ¡minterms ¡ that ¡have ¡a ¡value ¡of ¡1 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

14 ¡

slide-15
SLIDE 15

Introduction ¡to ¡Karnaugh ¡Maps ¡

ì Minterm ¡funcHon ¡derived ¡from ¡Kmap ¡was ¡not ¡in ¡

simplest ¡terms ¡

ì Use ¡Kmap ¡to ¡reduce ¡expression ¡to ¡simplest ¡terms ¡

ì Find ¡adjacent ¡1’s ¡in ¡the ¡Kmap ¡that ¡can ¡be ¡collected ¡

into ¡groups ¡that ¡are ¡powers ¡of ¡two ¡

15 ¡

Two ¡groups ¡in ¡this ¡example: ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-16
SLIDE 16

Introduction ¡to ¡Karnaugh ¡Maps ¡

ì Selected ¡groups ¡shown ¡below ¡

ì Groups ¡are ¡powers ¡of ¡two ¡(# ¡of ¡elements) ¡ ì Overlapping ¡is ¡OK! ¡

16 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-17
SLIDE 17

Rules ¡for ¡Simplification ¡

ì Groupings ¡can ¡contain ¡only ¡1’s; ¡no ¡0’s ¡ ì Groups ¡can ¡be ¡formed ¡only ¡at ¡right ¡angles ¡

ì

Diagonal ¡groups ¡are ¡not ¡allowed ¡ ì The ¡number ¡of ¡1’s ¡in ¡a ¡group ¡must ¡be ¡a ¡power ¡of ¡2 ¡

ì

A ¡single ¡1 ¡is ¡OK ¡then, ¡but ¡not ¡three ¡1’s! ¡ ì Groups ¡must ¡be ¡made ¡as ¡large ¡as ¡possible ¡

ì

Otherwise ¡simplificaHon ¡is ¡incomplete ¡ ì Groups ¡can ¡overlap ¡ ì Groups ¡can ¡wrap ¡around ¡the ¡sides ¡of ¡the ¡Kmap ¡

17 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-18
SLIDE 18

Kmap ¡– ¡Three ¡Variables ¡

ì Extend ¡to ¡three ¡variables? ¡Easy! ¡ ì Warning! ¡Note ¡that ¡the ¡values ¡for ¡the ¡yz ¡

combinaHon ¡at ¡the ¡top ¡of ¡the ¡matrix ¡form ¡a ¡pa[ern ¡ that ¡is ¡not ¡a ¡normal ¡binary ¡sequence ¡

ì Each ¡posiHon ¡can ¡only ¡differ ¡by ¡1 ¡variable ¡

18 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-19
SLIDE 19

Kmap ¡– ¡Three ¡Variables ¡

ì What ¡do ¡the ¡values ¡look ¡like? ¡

ì First ¡row ¡contains ¡all ¡minterms ¡where ¡x ¡has ¡a ¡value ¡

  • f ¡zero. ¡

ì First ¡column ¡contains ¡all ¡minterms ¡where ¡y ¡and ¡z ¡

both ¡have ¡a ¡value ¡of ¡zero ¡

19 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-20
SLIDE 20

Kmap ¡– ¡Three ¡Variables ¡

ì Example: ¡ ì Kmap: ¡

¡ ¡

ì What ¡is ¡the ¡largest ¡group ¡of ¡1’s ¡that ¡is ¡a ¡power ¡of ¡2? ¡

20 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-21
SLIDE 21

Kmap ¡– ¡Three ¡Variables ¡

ì Look ¡at ¡the ¡grouping ¡closely ¡

ì Changes ¡in ¡the ¡variables ¡x ¡and ¡y ¡have ¡no ¡influence ¡

upon ¡the ¡value ¡of ¡the ¡funcHon ¡

ì Thus, ¡the ¡funcHon ¡ ì reduces ¡to ¡F(x) ¡= ¡z ¡

21 ¡

You ¡could ¡verify ¡this ¡ reducHon ¡with ¡idenHHes ¡

  • r ¡a ¡truth ¡table ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-22
SLIDE 22

Kmap ¡– ¡Three ¡Variables ¡

ì

Example: ¡

ì

Kmap: ¡

ì

What ¡are ¡the ¡largest ¡groups ¡of ¡1’s ¡that ¡are ¡a ¡power ¡of ¡2? ¡

ì

How ¡many ¡groups ¡do ¡you ¡see? ¡

22 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-23
SLIDE 23

Kmap ¡– ¡Three ¡Variables ¡

ì To ¡make ¡the ¡largest ¡groups ¡possible, ¡wrap ¡around ¡

the ¡sides ¡

ì How ¡do ¡we ¡interpret ¡results? ¡

ì Green ¡row? ¡ ì Pink ¡square? ¡ ¡

¡

23 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-24
SLIDE 24

Kmap ¡– ¡Three ¡Variables ¡

ì Green ¡group ¡– ¡only ¡the ¡value ¡of ¡x ¡is ¡significant ¡

ì Thus, ¡ ¡

ì Pink ¡group ¡– ¡only ¡the ¡value ¡of ¡z ¡is ¡significant ¡ ì Our ¡reduced ¡funcHon ¡is: ¡

24 ¡

Recall ¡that ¡we ¡had ¡ six ¡minterms ¡in ¡our ¡

  • riginal ¡funcHon! ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-25
SLIDE 25

Kmap ¡– ¡Four ¡Variables ¡

ì Model ¡can ¡be ¡extended ¡to ¡accommodate ¡a ¡four-­‑

input ¡funcHon ¡

ì 16 ¡minterms ¡produced ¡

25 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-26
SLIDE 26

Kmap ¡– ¡Four ¡Variables ¡

ì Example: ¡ ¡ ì Kmap ¡(showing ¡non-­‑zero ¡

terms) ¡

ì What ¡largest ¡groups ¡should ¡

we ¡select? ¡ ¡

ì

Groups ¡can ¡overlap! ¡

ì

Groups ¡can ¡wrap! ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

26 ¡

slide-27
SLIDE 27

Kmap ¡– ¡Four ¡Variables ¡

ì Three ¡groups ¡

1.

Pink ¡group ¡that ¡wraps ¡top ¡ and ¡bo[om ¡

2.

Green ¡group ¡that ¡spans ¡the ¡ corners ¡

3.

Purple ¡group ¡enHrely ¡ within ¡the ¡Kmap ¡at ¡the ¡ right ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

27 ¡

F(W, X,Y, Z) = XY + XZ +WYZ

slide-28
SLIDE 28

Kmap ¡– ¡Four ¡Variables ¡

ì Kmap ¡simplificaHon ¡may ¡not ¡be ¡unique ¡

ì Possible ¡to ¡have ¡different ¡largest ¡possible ¡groups… ¡

ì The ¡(different) ¡funcHons ¡that ¡result ¡from ¡the ¡

groupings ¡below ¡are ¡logically ¡equivalent ¡

28 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-29
SLIDE 29

Don’t ¡Care ¡Conditions ¡

ì Real ¡circuits ¡don’t ¡always ¡need ¡to ¡have ¡an ¡output ¡

defined ¡for ¡every ¡possible ¡input ¡

ì Example: ¡Calculator ¡displays ¡have ¡7-­‑segment ¡LEDs. ¡ ¡

These ¡LEDs ¡can ¡display ¡27-­‑1 ¡pa[erns, ¡but ¡only ¡ten ¡of ¡ them ¡are ¡useful ¡ ì If ¡a ¡circuit ¡is ¡designed ¡so ¡that ¡a ¡parHcular ¡set ¡of ¡

inputs ¡can ¡never ¡happen, ¡we ¡call ¡this ¡set ¡of ¡inputs ¡a ¡ don’t ¡care ¡condiHon ¡

ì Helpful ¡for ¡Kmap ¡circuit ¡simplificaHon ¡

29 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-30
SLIDE 30

Don’t ¡Care ¡Conditions ¡

ì Represent ¡a ¡don’t ¡care ¡condiHon ¡with ¡an ¡X ¡ ì Free ¡to ¡include ¡or ¡ignore ¡the ¡X’s ¡when ¡choosing ¡

groups ¡

30 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

slide-31
SLIDE 31

Don’t ¡Care ¡Conditions ¡

ì Grouping ¡opHon ¡#1: ¡

31 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

F(W, X,Y, Z) = WX +YZ

slide-32
SLIDE 32

Don’t ¡Care ¡Conditions ¡

ì Grouping ¡opHon ¡#2: ¡

32 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

F(W, X,Y, Z) = WZ +YZ

slide-33
SLIDE 33

Don’t ¡Care ¡Conditions ¡

ì The ¡truth ¡table ¡of ¡ ì differs ¡from ¡the ¡truth ¡table ¡of ¡ ì However, ¡the ¡values ¡for ¡which ¡they ¡differ ¡are ¡the ¡

inputs ¡for ¡which ¡we ¡have ¡don’t ¡care ¡condiHons ¡

ì Either ¡is ¡an ¡acceptable ¡soluHon ¡

33 ¡

Spring ¡2012 ¡ Computer ¡Systems ¡and ¡Networks ¡

F(W, X,Y, Z) = WX +YZ

F(W, X,Y, Z) = WZ +YZ