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 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

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

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

  • A. Yes
  • B. No

Q: Are the corner four essential prime implicants?

slide-12
SLIDE 12

12 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-13
SLIDE 13

13

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-14
SLIDE 14

Definition: Non-Essential Prime

14

  • 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-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

16

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-17
SLIDE 17

17

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-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 Y = A + BD + C

slide-19
SLIDE 19

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

  • 1. Draw K-map

19

ab cd 00 01 00 01 11 10 11 10

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

0 4 12 8 1 5 13 9 3 7 15 11 2 6 14 10 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

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

21

ab cd 00 01 00 01 11 10 11 10

slide-22
SLIDE 22

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

22

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-23
SLIDE 23

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

23

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-24
SLIDE 24

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

24

ab cd 00 01 00 01 11 10 11 10

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) = 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

25

ab cd 00 01 00 01 11 10 11 10

slide-26
SLIDE 26

Reduction with Non-Essential Prime: Ex 1

26

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

slide-27
SLIDE 27

27 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-28
SLIDE 28

28 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-29
SLIDE 29

Combinational Logic

  • 1. Specification
  • 2. Implementation

K-map: Sum of products Product of sums

29

slide-30
SLIDE 30

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.

30

slide-31
SLIDE 31

K-Map to Minimized Product of Sum

31

  • 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-32
SLIDE 32

Minimum Product of Sum

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

0 2 6 4 1 3 7 5 32

ab c 00 01 11 10 1 Fill out the map

slide-33
SLIDE 33

Minimum Product of Sum

33

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-34
SLIDE 34

Next Lecture…

  • Quiz (multiple choice based on material

covered so far)

  • Bring your clickers for the quiz, paper

submissions will not be accepted

  • Please note the change in lecture hall: WLH

2001

34

slide-35
SLIDE 35

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)

35