ECED2200 Digital Circuits Karnaugh Maps 16/07/2012 Colin OFlynn - - - PowerPoint PPT Presentation

eced2200 digital circuits
SMART_READER_LITE
LIVE PREVIEW

ECED2200 Digital Circuits Karnaugh Maps 16/07/2012 Colin OFlynn - - - PowerPoint PPT Presentation

ECED2200 Digital Circuits Karnaugh Maps 16/07/2012 Colin OFlynn - CC BY-SA 1 General Notes See updates to these slides: www.newae.com/teaching These slides licensed under Creative Commons Attribution-ShareAlike 3.0


slide-1
SLIDE 1

ECED2200 – Digital Circuits

Karnaugh Maps

16/07/2012 Colin O’Flynn - CC BY-SA 1

slide-2
SLIDE 2

General Notes

  • See updates to these slides: www.newae.com/teaching
  • These slides licensed under ‘Creative Commons Attribution-ShareAlike 3.0

Unported License’

  • These slides are not the complete course – they are extended in-class
  • You will find the following references useful, see

www.newae.com/teaching for more information/links:

– The book “Bebop to the Boolean Boogie” which is available to Dalhousie Students – Course notes (covers almost everything we will discuss in class) – Various websites such as e.g.: www.play-hookey.com – The book “Contemporary Logic Design”, which was used in previous iterations of the class and you may have already

16/07/2012 Colin O’Flynn - CC BY-SA 2

slide-3
SLIDE 3

Gray Codes

16/07/2012 Colin O’Flynn - CC BY-SA 3

slide-4
SLIDE 4

Counters

16/07/2012 Colin O’Flynn - CC BY-SA 4

1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000

slide-5
SLIDE 5

Oops…

16/07/2012 Colin O’Flynn - CC BY-SA 5

Bit 3 Bit 2 Bit 1 Bit 0

slide-6
SLIDE 6

What are Gray Codes?

0000 0001 0011 0010 0110 0111 0101 0100 1100 1101 1111

16/07/2012 Colin O’Flynn - CC BY-SA 6

slide-7
SLIDE 7

Generating Gray Codes

16/07/2012 Colin O’Flynn - CC BY-SA 7

1

slide-8
SLIDE 8

Generating Gray Codes

16/07/2012 Colin O’Flynn - CC BY-SA 8

1 1 1 00 01 11 10

1. 2. 3.

00 01 11 10 00 01 11 10 10 11 01 00 000 001 011 010 110 111 101 100

1. 2. 3. 3-bit Gray Code 2-bit Gray Code

  • 1. Write known Gray code down, even just

1-bit Gray Code

  • 2. Mirror Gray code vertically
  • 3. Add a single ‘0’ infront of original code,

add a single ‘1’ infront of mirrored code

  • 4. Repeat until required # of bits made
slide-9
SLIDE 9

MINIMIZATION BY MAPPING

16/07/2012 Colin O’Flynn - CC BY-SA 9

slide-10
SLIDE 10

Karnaugh Maps

16/07/2012 Colin O’Flynn - CC BY-SA 10

Invented by Maurice Karnaugh A B C Minterms f 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

3 4 5 6 7

f m m m m m = + + + +

4

A•B•C m =

5

A•B•C m =

6

A•B•C m =

7

A•B•C m =

3

A•B•C m =

AB C 00 01 11 10 1 1 1 1 1 1

slide-11
SLIDE 11

Karnaugh (K-Map) Minimization

16/07/2012 Colin O’Flynn - CC BY-SA 11

1 1 1 1 1

slide-12
SLIDE 12

Karnaugh (K-Map) Minimization

16/07/2012 Colin O’Flynn - CC BY-SA 12

1 1 1 1 1

slide-13
SLIDE 13

K-Map: 3-Input Product of Sum

16/07/2012 Colin O’Flynn - CC BY-SA 13

A•B•C A•B•C A•B•C A•B•C A•B•C A•B•C A•B•C A•B•C

slide-14
SLIDE 14

K-Map: 4-Inputs Product of Sum

16/07/2012 Colin O’Flynn - CC BY-SA 14

A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D

slide-15
SLIDE 15

Mapping Connections

16/07/2012 Colin O’Flynn - CC BY-SA 15

1 1 1 1

slide-16
SLIDE 16

Mapping Connections

16/07/2012 Colin O’Flynn - CC BY-SA 16

1 1 1 1 1 1 1

( ) ( )

Y= A•D + B•C

slide-17
SLIDE 17

Mapping Connections

16/07/2012 Colin O’Flynn - CC BY-SA 17

1 1 1 1

Y=B•D

slide-18
SLIDE 18

Mapping Connections

16/07/2012 Colin O’Flynn - CC BY-SA 18

slide-19
SLIDE 19

Notes on Grouping Terms

  • 1. Groups must consist of 1,2,4,8,16,.. Etc terms
  • 2. Left & Right-Side of K-Maps Connect
  • 3. Top & Bottom of K-Maps Connect
  • 4. Try to maximize number of terms per group
  • 5. There may be multiple solutions to same

problem

  • 6. Based on if more 1’s or 0’s in truth table can

use Product-of-Sum or Sum-of-Product resp.

16/07/2012 Colin O’Flynn - CC BY-SA 19

slide-20
SLIDE 20

Multiple Solutions

16/07/2012 Colin O’Flynn - CC BY-SA 20

slide-21
SLIDE 21

Example #1 – Vote Taker

Map the following:

16/07/2012 Colin O’Flynn - CC BY-SA 21

A B C Y 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-22
SLIDE 22

Example #1

16/07/2012 Colin O’Flynn - CC BY-SA 22

A•B•C A•B•C A•B•C A•B•C A•B•C A•B•C A•B•C A•B•C

A B C Y 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-23
SLIDE 23

Example #2 – Full Adder

16/07/2012 Colin O’Flynn - CC BY-SA 23

A B Cin Sum Cout 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-24
SLIDE 24

Example #2 – Full Adder

16/07/2012 Colin O’Flynn - CC BY-SA 24 A B Cin Sum 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 A B Cin Cout 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-25
SLIDE 25

Example #3 – Comparator

16/07/2012 Colin O’Flynn - CC BY-SA 25

A B C D AB > CD 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-26
SLIDE 26

Example #3 - Comparator

16/07/2012 Colin O’Flynn - CC BY-SA 26

slide-27
SLIDE 27

Mapping with Don’t Cares

16/07/2012 Colin O’Flynn - CC BY-SA 27

A B C Y 1 1 ? 1 1 1 1 1 1 1 1 1 1 1 1 1 ?

slide-28
SLIDE 28

Mapping with Don’t Cares

16/07/2012 Colin O’Flynn - CC BY-SA 28

A B C Y 1 1 ? 1 1 1 1 1 1 1 1 1 1 1 1 1 ?

slide-29
SLIDE 29

Note on Don’t Care Notation

16/07/2012 Colin O’Flynn - CC BY-SA 29

slide-30
SLIDE 30

Product of Sum Mapping

16/07/2012 Colin O’Flynn - CC BY-SA 30

A B C Y 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-31
SLIDE 31

Mapping using SoP

16/07/2012 Colin O’Flynn - CC BY-SA 31

A B C Y 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-32
SLIDE 32

Mapping using PoS

16/07/2012 Colin O’Flynn - CC BY-SA 32

A B C Y 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

slide-33
SLIDE 33

Mapping 5 Input Variables

16/07/2012 Colin O’Flynn - CC BY-SA 33

E=0 E=1

slide-34
SLIDE 34

Checking your Results

16/07/2012 Colin O’Flynn - CC BY-SA 34

http://k-map.sourceforge.net

slide-35
SLIDE 35

Section Summary

  • See ECED2200 Notes “Minimization By

Mapping” (Page 76)

  • Bebop to the Boolean Boogie Chapter 10
  • Contemporary Logic Design Chapter 2

Useful software: http://k-map.sourceforge.net/

16/07/2012 Colin O’Flynn - CC BY-SA 35

slide-36
SLIDE 36

MAPPING EQUATIONS

16/07/2012 Colin O’Flynn - CC BY-SA 36

slide-37
SLIDE 37

16/07/2012 Colin O’Flynn - CC BY-SA 37

A•B•C A•B•C A•B•C A•B•C A•B•C A•B•C A•B•C A•B•C

slide-38
SLIDE 38

16/07/2012 Colin O’Flynn - CC BY-SA 38

A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D A•B•C•D

slide-39
SLIDE 39

Section Summary

  • See ECED2200 Notes “Minimization By

Mapping” (Page 76)

  • Bebop to the Boolean Boogie Chapter 10
  • Contemporary Logic Design Chapter 2

16/07/2012 Colin O’Flynn - CC BY-SA 39

slide-40
SLIDE 40

NAND – NOR CONVERSIONS

16/07/2012 Colin O’Flynn - CC BY-SA 40

slide-41
SLIDE 41

FET Logic Gates - NAND

Source: http://commons.wikimedia.org/wiki/File:NAND_gate_(CMOS_circuit).PNG

16/07/2012 Colin O’Flynn - CC BY-SA 41

slide-42
SLIDE 42

FET Logic Gates - NOR

http://commons.wikimedia.org/wiki/File:NOR_gate_%28CMOS_circuit%29.PNG

16/07/2012 Colin O’Flynn - CC BY-SA 42

slide-43
SLIDE 43

Equivalencies

16/07/2012 Colin O’Flynn - CC BY-SA 43

A+B A B

  • A B

 A+B A B

  • A+B

A+B A B

slide-44
SLIDE 44

NAND Conversion: Step 1

  • 1. Draw complete schematic

16/07/2012 Colin O’Flynn - CC BY-SA 44

slide-45
SLIDE 45

NAND Conversion: Step 2

Convert all AND gates to NAND gates and add additional inverted input to next level:

16/07/2012 Colin O’Flynn - CC BY-SA 45

slide-46
SLIDE 46

NAND Conversion: Step 3

Convert all OR gates to NAND gates:

16/07/2012 Colin O’Flynn - CC BY-SA 46

slide-47
SLIDE 47

NAND Conversion: Step 4

If two circles connect together cancel them. If circles do not cancel on inputs to NAND gates, add inverter built from NAND.

16/07/2012 Colin O’Flynn - CC BY-SA 47

slide-48
SLIDE 48

Section Summary

  • See ECED2200 Notes “Conversion to NAND

and NOR Networks” (Page 102)

16/07/2012 Colin O’Flynn - CC BY-SA 48