Multivariable K Maps, CSE 140: Components and Design Techniques for - - PowerPoint PPT Presentation

multivariable k maps
SMART_READER_LITE
LIVE PREVIEW

Multivariable K Maps, CSE 140: Components and Design Techniques for - - PowerPoint PPT Presentation

Multivariable K Maps, CSE 140: Components and Design Techniques for Digital Systems Diba Mirza Dept. of Computer Science and Engineering University of California, San Diego 1 Another 3-Input Corresponding K-map truth table Id a b


slide-1
SLIDE 1

Multivariable K Maps,

CSE 140: Components and Design Techniques for Digital Systems

Diba Mirza

  • Dept. of Computer Science and Engineering

University of California, San Diego

1

slide-2
SLIDE 2

2

Corresponding K-map

0 2 6 4 1 3 7 5

c = 1

0 1 X 1 0 0 1 1 (0,0) (0,1) (1,1) (1,0)

c = 0

Id a b c f (a,b,c) 0 0 0 0 0 1 0 0 1 0 2 0 1 0 1 3 0 1 1 0 4 1 0 0 1 5 1 0 1 1 6 1 1 0 X 7 1 1 1 1

Another 3-Input truth table

slide-3
SLIDE 3

3

Corresponding K-map

0 2 6 4 1 3 7 5

b = 1 c = 1 a = 1

0 1 X 1 0 0 1 1 (0,0) (0,1) (1,1) (1,0)

c = 0 f(a,b,c) = a + bc’

Id a b c f (a,b,c) 0 0 0 0 0 1 0 0 1 0 2 0 1 0 1 3 0 1 1 0 4 1 0 0 1 5 1 0 1 1 6 1 1 0 X 7 1 1 1 1

Another 3-Input truth table

slide-4
SLIDE 4

4

Proof of Consensus Theorem using K Maps

Consensus Theorem: A’B+AC+BC=A’B+AC

C 00 01 1 Y 11 10 AB 1 1 1 1 C 00 01 1 Y 11 10 AB ABC ABC ABC ABC ABC ABC ABC ABC B C 1 1 1 1 A 1 1 1 1 1 1 1 1 1 1 1 1 Y

slide-5
SLIDE 5

5

Procedure for finding the minimal function via K-maps (formal terms)

  • 1. Convert truth table to K-map
  • 2. Include all essential primes
  • 3. Include non essential primes as

needed to completely cover the on-set (all cells of value one)

01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y

slide-6
SLIDE 6

Definition: Implicant

  • Implicant: A product term obtained by combining min terms for which

the value of the function is either 1 or don’t care. In other words a group

  • f adjacent ‘1’ or ‘X’ cells

Q: Is this an implicant?

6 01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y

  • A. Yes
  • B. No
slide-7
SLIDE 7

Definition: Implicant

  • Implicant: A product term obtained by combining min terms for which

the value of the function is either 1 or don’t care. In other words a group

  • f adjacent ‘1’ or ‘X’ cells

Q: Is this an implicant?

7 01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y

  • A. Yes
  • B. No
slide-8
SLIDE 8

Definition: Prime Implicant

  • Implicant: A product term obtained by combining min terms for which

the value of the function is either 1 or don’t care. In other words a group of adjacent ‘1’ or ‘X’ cells

  • Prime Implicant: An implicant that cannot be fully covered by a larger

implicant.

Q: Is this a prime implicant?

8 01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y

  • A. Yes
  • B. No
slide-9
SLIDE 9

Definition: Prime Implicant

9 01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y

  • A. Yes
  • B. No

Q: Is this a prime implicant?

  • Implicant: A product term obtained by combining min terms for which

the value of the function is either 1 or don’t care. In other words a group of adjacent ‘1’ or ‘X’ cells

  • Prime Implicant: An implicant that cannot be fully covered by a larger

implicant.

slide-10
SLIDE 10

Definition: Essential Prime

1. Prime Implicant: A group of adjacent ones (and/or don’t cares) that cannot be fully covered by any other large group of ones(and/or don’t cares)

10 01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y

  • A. Yes
  • B. No

Q: Are the corner four prime implicants?

slide-11
SLIDE 11

Definition: Essential Prime

1. Prime Implicant: A group of adjacent ones that cannot be fully covered by any other large group of ones 2. Essential Prime Implicant or Essential Prime: Prime implicants that contain at least one element (a ‘1’ cell) that cannot be covered by any

  • ther prime implicant

11 01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y

slide-12
SLIDE 12

Definition: Essential Prime

1. Prime Implicant: A group of adjacent ones that cannot be fully covered by any other large group of ones 2. Essential Prime Implicant or Essential Prime: Prime implicants that contain at least one element (a ‘1’ cell) that cannot be covered by any

  • ther prime implicant

12 01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y

  • A. Yes
  • B. No

Q: Are the corner four essential prime implicants?

slide-13
SLIDE 13

13 01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y Y = AC + ABD + ABC + BD

Include all essential prime implicants!

slide-14
SLIDE 14

14

Reading the reduced K-map

01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y Y = AC + ABD + ABC + BD

slide-15
SLIDE 15

Definition: Non-Essential Prime

15

  • A. Yes
  • B. No

Q: Is the blue group a non-essential prime implicant?

ab cd 00 01 00 01 11 10 11 10 1 1 1 1 1 1 1 1 1 1

Non Essential Prime Implicant : Prime implicant that has no element that cannot be covered by other prime implicant

slide-16
SLIDE 16

Definition: Non-Essential Prime

16

  • A. Yes
  • B. No

Q: Is the blue group a non-essential prime implicant?

ab cd 00 01 00 01 11 10 11 10 1 1 1 1 1 1 1 1 1 1

Non Essential Prime Implicant : Prime implicant that has no element that cannot be covered by other prime implicant

slide-17
SLIDE 17

17

Procedure for finding the minimal function via K-maps (formal terms)

  • 1. Convert truth table to K-map
  • 2. Include all essential primes
  • 3. Include non essential primes as

needed to completely cover the on-set (all cells of value one)

01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y

slide-18
SLIDE 18

18

K-maps with Don’t Cares

C D 1 1 1 1 B 1 1 1 1 1 1 1 1 1 1 1 X 1 1 Y A 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X X X X X X 01 11 1 X X X 1 1 01 1 1 1 1 X X X X 11 10 00 00 10 AB CD Y

slide-19
SLIDE 19

19

K-maps with Don’t Cares

C D 1 1 1 1 B 1 1 1 1 1 1 1 1 1 1 1 X 1 1 Y A 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X X X X X X 01 11 1 X X X 1 1 01 1 1 1 1 X X X X 11 10 00 00 10 AB CD Y Y = A + BD + C

slide-20
SLIDE 20

Reducing Canonical expressions Given f(a,b,c,d) = Σm (0, 1, 2, 8, 14)+Σd (9, 10)

  • 1. Draw K-map

20

ab cd 00 01 00 01 11 10 11 10

slide-21
SLIDE 21

Reducing Canonical Expressions Given f(a,b,c,d) = Σm (0, 1, 2, 8, 14)+ Σd (9, 10)

  • 1. Draw K-map

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10 21

ab cd 00 01 00 01 11 10 11 10

slide-22
SLIDE 22

Reducing Canonical Expressions Given f(a,b,c,d) = Σm (0, 1, 2, 8, 14)+Σd (9, 10)

  • 1. Draw K-map

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10

1 0 0 1 1 0 0 X 0 0 0 0 1 0 1 X

22

ab cd 00 01 00 01 11 10 11 10

slide-23
SLIDE 23

Reducing Canonical Expressions

  • 1. Draw K-map
  • 2. Identify Prime implicants

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10

1 0 0 1 1 0 0 X 0 0 0 0 1 0 1 X

23

ab cd 00 01 00 01 11 10 11 10

Are all the Prime implicants also essential?

A. Yes B. No PI Q: Do the E-primes cover the entire on set? A. Yes B. No

slide-24
SLIDE 24

Reducing Canonical Expressions

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10

1 0 0 1 1 0 0 X 0 0 0 0 1 0 1 X

24

ab cd 00 01 00 01 11 10 11 10

1. Prime implicants: Σm (0, 1, 8, 9), Σm (0, 2, 8, 10), Σm (10, 14) 2. Essential Primes: Σm (0, 1, 8, 9), Σm (0, 2, 8, 10), Σm (10, 14)

slide-25
SLIDE 25

Reducing Canonical Expressions

1. Prime implicants: Σm (0, 1, 8, 9), Σm (0, 2, 8, 10), Σm (10, 14) 2. Essential Primes: Σm (0, 1, 8, 9), Σm (0, 2, 8, 10), Σm (10, 14) 3. Min exp: Σ (Essential Primes)=Σm (0, 1, 8, 9) + Σm (0, 2, 8, 10) + Σm (10, 14) f(a,b,c,d) = ?

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10

1 0 0 1 1 0 0 X 0 0 0 0 1 0 1 X

25

ab cd 00 01 00 01 11 10 11 10

slide-26
SLIDE 26

Reducing Canonical Expressions

1. Prime implicants: Σm (0, 1, 8, 9), Σm (0, 2, 8, 10), Σm (10, 14) 2. Essential Primes: Σm (0, 1, 8, 9), Σm (0, 2, 8, 10), Σm (10, 14) 3. Min exp: Σ (Essential Primes)=Σm (0, 1, 8, 9) + Σm (0, 2, 8, 10) + Σm (10, 14) f(a,b,c,d) = b’c’ + b’d’+ acd‘

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10

1 0 0 1 1 0 0 X 0 0 0 0 1 0 1 X

26

ab cd 00 01 00 01 11 10 11 10

slide-27
SLIDE 27

Reduction with Non-Essential Prime: Ex 1

27

ab cd 00 01 00 01 11 10 11 10 1 1 1 1 1 1 1 1 1 1

slide-28
SLIDE 28

28 0 2 6 4 1 3 7 5

X 1 0 0 0 1 1 X

ab c 00 01 11 10 1 Example 2

  • Find a possible (most)

reduced expressions

  • Find all primes
slide-29
SLIDE 29

29 0 2 6 4 1 3 7 5

X 1 0 1 0 1 1 X

ab c 00 01 11 10 1 Example 3

  • Find a possible most reduced

expressions

slide-30
SLIDE 30

Combinational Logic

  • 1. Specification
  • 2. Implementation

K-map: Sum of products Product of sums

30

slide-31
SLIDE 31

Implicant: A product term that has non-empty intersection with

  • n-setF and does not intersect with off-set R .

Prime Implicant: An implicant that is not a proper subset of any

  • ther implicant.

Essential Prime Implicant: A prime implicant that has an element in on-set F but this element is not covered by any other prime implicants.

Implicate: A sum term that has non-empty intersection with off-set R and does not intersect with on-set F. Prime Implicate: An implicate that is not a proper subset of any other implicate. Essential Prime Implicate: A prime implicate that has an element in off-set R but this element is not covered by any other prime implicates.

31

slide-32
SLIDE 32

K-Map to Minimized Product of Sum

32

  • Sometimes easier to reduce the K-map by considering the offset
  • Usually when number of zero outputs is less than number of outputs that

evaluate to one OR offset is smaller than onset

ab cd 00 01 00 01 11 10 11 10

1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1

slide-33
SLIDE 33

Minimum Product of Sum

Given f(a,b,c) = Σm (3, 5)+ Σd (0, 4)

0 2 6 4 1 3 7 5 33

ab c 00 01 11 10 1 Fill out the map

slide-34
SLIDE 34

Minimum Product of Sum

34

Given f(a,b,c) = Σm (3, 5) + Σd (0, 4)

0 2 6 4 1 3 7 5

X 0 0 X 0 1 0 1

ab c 00 01 11 10 1

slide-35
SLIDE 35

Minimum Product of Sum

35

Given f (a,b,c) = Σm (3, 5) + Σd (0, 4)

0 2 6 4 1 3 7 5

X 0 0 X 0 1 0 1

ab c 00 01 11 10 1 PI Q: The adjacent cells grouped in red can be minimized to the following max term:

  • A. a+b
  • B. (a+b)’
  • C. a’+b’
slide-36
SLIDE 36

Minimum Product of Sum

36

Given f (a,b,c) = Σm (3, 5) + Σd (0, 4)

0 2 6 4 1 3 7 5

X 0 0 X 0 1 0 1

ab c 00 01 11 10 1 Prime Implicates: Essential Primes Implicates: Min exp: f(a,b,c) =

slide-37
SLIDE 37

Minimum Product of Sum

37

Given f (a,b,c) = Σm (3, 5) + Σd(0, 4)

0 2 6 4 1 3 7 5

X 0 0 X 0 1 0 1

ab c 00 01 11 10 1 Prime Implicates: ΠM (0, 1), ΠM (0, 2, 4, 6), ΠM (6, 7) Essential Primes Implicates: ΠM (0, 1), ΠM (0, 2, 4, 6), ΠM(6, 7) Min exp: f(a,b,c) = (a+b)(c )(a’+b’)

slide-38
SLIDE 38

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10

1 0 0 1 1 0 0 X 0 0 0 0 1 0 1 X

38

ab cd 00 01 00 01 11 10 11 10

  • Reduce the following to a POS form
  • First find the essential prime implicates

Minimum product of sum: Ex 2

slide-39
SLIDE 39

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10

1 0 0 1 1 0 0 X 0 0 0 0 1 0 1 X

39

ab cd 00 01 00 01 11 10 11 10

  • Reduce the following to a POS form
  • First find the essential prime implicates

Minimum product of sum: Ex2

slide-40
SLIDE 40

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10

1 0 0 1 1 0 0 X 0 0 0 0 1 0 1 X

40

ab cd 00 01 00 01 11 10 11 10

  • Reduce the following to a POS form
  • First find the essential prime implicates

Minimum product of sum: Ex 2

slide-41
SLIDE 41

Min product of sums: Ex3

Given f(a,b,c,d) = ΠM(3, 11, 12, 13, 14). ΠD(4, 8, 10)

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10 41

ab cd 00 01 11 10 00 01 11 10

K-map

slide-42
SLIDE 42

Min product of sums: Ex3

42

a d

1 X 0 X 1 1 0 1 0 1 1 0 1 1 0 X

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10

ab 00 01 11 10 cd 00 01 11 10 Given f(a,b,c,d) = ΠM(3, 11, 12, 13, 14). ΠD(4, 8, 10)

slide-43
SLIDE 43

Prime Implicates: ΠM (3,11), ΠM (12,13), ΠM(10,11), ΠM (4,12), ΠM (8,10,12,14) PI Q: Which of the following is a non-essential prime implicate?

  • A. ΠM(3,11)
  • B. ΠM(12,13)
  • C. ΠM(10,11)
  • D. ΠM(8,10,12,14)

43

a d

1 X 0 X 1 1 0 1 0 1 1 0 1 1 0 X

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10

ab 00 01 11 10 cd 00 01 11 10

slide-44
SLIDE 44

44 0 2 6 4 1 3 7 5

X 0 1 0 1 0 0 X

ab c 00 01 11 10 1

(V) (25pts) (Karnaugh Map) Use Karnaugh map to simplify function f (a, b, c) = Σ m(1, 6) +Σ d(0, 5). List all possible minimal product of sums expres-

  • sions. Show the Boolean expressions. No need for the logic diagram.
slide-45
SLIDE 45

45 0 2 6 4 1 3 7 5

X 0 1 0 1 0 0 X

ab c 00 01 11 10 1

slide-46
SLIDE 46

Five variable K-map

0 4 12 8

c d b e

1 5 13 9 3 7 15 11 2 6 14 10 16 20 28 24

c d b e a

17 21 29 25 19 23 31 27 18 22 30 26

Neighbors of m5 are: minterms 1, 4, 7, 13, and 21 Neighbors of m10 are: minterms 2, 8, 11, 14, and 26

46

a=0 a=1 bc de 00 01 11 10 00 01 11 10 00 01 11 10

slide-47
SLIDE 47

Reading a Five variable K-map

0 4 12 8

c d b e

1 5 13 9 3 7 15 11 2 6 14 10 16 20 28 24

c d b e a

17 21 29 25 19 23 31 27 18 22 30 26 47

a=0 a=1 bc de 00 01 11 10 00 01 11 10 00 01 11 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-48
SLIDE 48

Six variable K-map

d e c f d e c d e c f

48 52 60 56

d e c b

49 53 61 57 51 55 63 59 50 54 62 58

a

32 36 44 40 33 37 45 41 35 39 47 43 34 38 46 42

f f

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10 16 20 28 24 17 21 29 25 19 23 31 27 18 22 30 26 48

bc de ab=(0,0) ab=(0,1) ab=(1,0) ab=(1,1)

slide-49
SLIDE 49

Next Lecture…

  • Quiz (multiple choice based on material

covered so far)

  • Bring your clickers for the quiz, paper

submissions will not be accepted

49

slide-50
SLIDE 50

Review Some Definitions

  • Complement: variable with a bar over it

A, B, C

  • Literal: variable or its complement

A, A, B, B, C, C

  • Implicant: product of literals

ABC, AC, BC

  • Implicate: sum of literals

(A+B+C), (A+C), (B+C)

  • Minterm: product that includes all input variables

ABC, ABC, ABC

  • Maxterm: sum that includes all input variables

(A+B+C), (A+B+C), (A+B+C)

50