Lecture 4: Four Input K-Maps CSE 140: Components and Design - - PowerPoint PPT Presentation

lecture 4 four input k maps
SMART_READER_LITE
LIVE PREVIEW

Lecture 4: Four Input K-Maps CSE 140: Components and Design - - PowerPoint PPT Presentation

Lecture 4: Four Input K-Maps CSE 140: Components and Design Techniques for Digital Systems Spring 2014 CK Cheng, Diba Mirza Dept. of Computer Science and Engineering University of California, San Diego 1 Outlines Boolean Algebra vs.


slide-1
SLIDE 1

Lecture 4: Four Input K-Maps

CSE 140: Components and Design Techniques for Digital Systems Spring 2014

CK Cheng, Diba Mirza

  • Dept. of Computer Science and Engineering

University of California, San Diego

1

slide-2
SLIDE 2

Outlines

  • Boolean Algebra vs. Karnaugh Maps

– Algebra: variables, product terms, minterms, consensus theorem – Map: planes, rectangles, cells, adjacency

  • Definitions: implicants, prime implicants, essential

prime implicants

  • Implementation Procedures

2

slide-3
SLIDE 3

3

4-input K-map

01 11 01 11 10 00 00 10 AB CD Y C D 1 1 1 1 B 1 1 1 1 1 1 1 1 1 1 1 1 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 1

slide-4
SLIDE 4

4

4-input K-map

01 11 1 1 1 1 01 1 1 1 1 1 11 10 00 00 10 AB CD Y C D 1 1 1 1 B 1 1 1 1 1 1 1 1 1 1 1 1 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 1

slide-5
SLIDE 5

5

4-input K-map

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

  • Identify adjacent cells containing 1’s
  • What happens when we combine these cells?
slide-6
SLIDE 6

Boolean Expression K-Map

Variable xi and its compliment xi’ ó Two half planes Rxi, and Rxi’ Product term P (Pxi* e.g. b’c’) ó Intersect of Rxi* for all i in P e.g. Rb’ intersect Rc’ Each minterm ó One element cell Two minterms are adjacent iff they differ by one and

  • nly one variable, eg:

abc’d, abc’d’ ó The two cells are neighbors Each minterm has n adjacent minterms ó Each cell has n neighbors

6

slide-7
SLIDE 7

7

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

1. Convert truth table to K-map 2. Group adjacent ones: In doing so include the largest number of adjacent ones (Prime Implicants) 3. Create new groups to cover all ones in the map: create a new group only to include at least once cell (of value 1 ) that is not covered by any other group 4. Select the groups that result in the minimal sum of products (we will formalize this because its not straightforward)

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

slide-8
SLIDE 8

8

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

Definitions: implicant, prime implicant, essential prime implicant

9

  • Implicant: A product term that has non-empty

intersection with on-set F and does not intersect with

  • ff-set R .
  • Prime Implicant: An implicant that is not a proper

subset of any other implicant i.e. it is not completely covered by any single implicant

  • Essential Prime Implicant: A prime implicant with

atleast one element that is not covered by one or more prime implicants.

slide-10
SLIDE 10

Definition: Prime Implicant

  • Implicant: A product term that has non-empty intersection with on-set F

and does not intersect with off-set R

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

implicant i.e. it is not completely covered by any single implicant

Q: Is this a prime implicant?

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
slide-11
SLIDE 11

Definition: 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
  • Implicant: A product term that has non-empty intersection with on-

set F and does not intersect with off-set R

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

implicant i.e. it is not completely covered by any single implicant Q: Is this a prime implicant?

slide-12
SLIDE 12

Definition: 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: How about this one? Is it a prime implicant?

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

F and does not intersect with off-set R

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

implicant i.e. it is not completely covered by any single implicant

slide-13
SLIDE 13

Definition: Prime Implicant

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

  • A. Yes
  • B. No: Because it is

covered by a larger group Q: Is the red group a prime implicant?

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

F and does not intersect with off-set R

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

implicant i.e. it is not completely covered by any single implicant

slide-14
SLIDE 14

Definition: Essential Prime

  • Essential Prime Implicant: A prime implicant with atleast one

element that is not covered by one or more prime implicants

14 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 the blue group an essential prime?

slide-15
SLIDE 15

Definition: Essential Prime

  • Essential Prime Implicant: A prime implicant with atleast one

element that is not covered by one or more prime implicants

15 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 the blue group an essential prime?

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

Definition: Non-Essential Prime

17

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

18

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 onset (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-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 01 11 10 00 00 10 AB CD Y

slide-20
SLIDE 20

20

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

21

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

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

  • 1. Draw K-map

22

ab cd 00 01 00 01 11 10 11 10

slide-23
SLIDE 23

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

  • 1. Draw K-map

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

ab cd 00 01 00 01 11 10 11 10

slide-24
SLIDE 24

Reducing Canonical Expressions Given F(a,b,c,d) = Σm (0, 1, 2, 8, 14) D(a,b,c,d) = Σm (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

24

ab cd 00 01 00 01 11 10 11 10

slide-25
SLIDE 25

Reducing Canonical Expressions

  • 1. Draw K-map
  • 2. Identify Prime implicants
  • 3. Identify Essential Primes

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 PI Q: How many primes (P) and essential primes (EP) are there?

  • A. Four (P) and three (EP)
  • B. Three (P) and two (EP)
  • C. Three (P) and three (EP)
  • D. Four (P) and Four (EP)
slide-26
SLIDE 26

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

26

ab cd 00 01 00 01 11 10 11 10 PI Q: Do the E-primes cover the entire on set?

  • A. Yes
  • B. No

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

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

27

ab cd 00 01 00 01 11 10 11 10 PI Q: Do the E-primes cover the entire on set?

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

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

28

ab cd 00 01 00 01 11 10 11 10 PI Q: Do the E-primes cover the entire on set?

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

Another example Given F(a,b,c,d) = Σm (0, 3, 4, 14, 15) D(a,b,c,d) = Σm (1, 11, 13)

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

ab cd 00 01 00 01 11 10 11 10

slide-30
SLIDE 30

Another example Given F(a,b,c,d) = Σm (0, 3, 4, 14, 15) D(a,b,c,d) = Σm (1, 11, 13)

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

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

ab cd 00 01 00 01 11 10 11 10

slide-31
SLIDE 31

Reducing Canonical Expressions

31

1. Prime implicants: Σm (0, 4), Σm (0, 1), Σm (1, 3), Σm (3, 11), Σm (14, 15), Σm (11, 15), Σm (13, 15) 2. Essential Primes: Σm (0, 4), Σm (14, 15)

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

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

ab cd 00 01 00 01 11 10 11 10

slide-32
SLIDE 32

Reducing Canonical Expressions

32

  • 1. Prime implicants: Σm (0, 4), Σm (0, 1), Σm (1, 3), Σm (3, 11), Σm (14, 15), Σm

(11, 15), Σm (13, 15)

  • 2. Essential Primes: Σm (0, 4), Σm (14, 15)
  • 3. Min exp: Σm (0, 4), Σm (14, 15), (Σm (3, 11) or Σm (1,3) )

f(a,b,c,d) = a’c’d’+ abc+ b’cd (or a’b’d)

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

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

ab cd 00 01 00 01 11 10 11 10

slide-33
SLIDE 33

Reading

33

[Harris] Chapter 2, 2.7