07 KM Page 1 ECEn/CS 224 Karnaugh Maps. 07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating.

Slides:



Advertisements
Similar presentations
Karnaugh Maps ECEn/CS 224.
Advertisements

Based on slides by: Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 8 – Systematic Simplification.
Chapter 3 Simplification of Switching Functions. Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table.
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ECE 301 – Digital Electronics Karnaugh Maps (Lecture #7) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design,
Examples Simplify: ab’c + abc + a’bc Show that X + X’Y = X + Y
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Give qualifications of instructors: DAP
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 4-1 Chapter #2: Two-Level Combinational Logic Section 2.3, Switches and Tools.
Computer Engineering (Logic Circuits) (Karnaugh Map)
بهينه سازي با نقشة کارنو Karnaugh Map. 2  Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable.
Simplifying Boolean Expressions Using K-Map Method
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
K-map Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
1 Chapter 5 Karnaugh Maps Mei Yang ECG Logic Design 1.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
Chapter 3 The Karnaugh Map. These K-maps are described by the location. Next, each square will be 1 or 0 depending on the value of the function. ABfm.
Department of Computer Engineering
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. K-Map (1)  Karnaugh Mapping is used to minimize the number of logic gates that are required in a digital circuit.
1 Digital Logic Design Week 5 Simplifying logic expressions.
Optimization Algorithm
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
Examples. Examples (1/11)  Example #1: f(A,B,C,D) =  m(2,3,4,5,7,8,10,13,15) Fill in the 1’s. 1 1 C A B CD AB D 1 1.
Combinational Logic Part 2: Karnaugh maps (quick).
Converting to Minterms Form
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 5: Quine-McCluskey Method José Nelson Amaral.
1 Quine-McCluskey Method. 2 Motivation Karnaugh maps are very effective for the minimization of expressions with up to 5 or 6 inputs. However they are.
Computer Engineering (Logic Circuits) (Karnaugh Map)
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Combinational Logic Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
05 BA2 Page 1 ECEn/CS 224 Boolean Algebra – Part 2.
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Prof. Hsien-Hsin Sean Lee
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
BR 2/1/991 Truth Tables (again) Recall that a boolean equation can be represented by a Truth Table A B C F
THE K-MAP.
C.S.Choy39 TERMINOLOGY Minterm –product term containing all input variables of a function in either true or complementary form Maxterm – sum term containing.
1 Example: Groupings on 3-Variable K-Maps BC F(A,B,C) = A ’ B ’ A BC F(A,B,C) = B ’ A
 Seattle Pacific University EE Logic System DesignKMaps-1 Two-Level Simplification All Boolean expressions can be represented in two- level forms.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 4: Cost of Logic Circuits and Karnaugh Maps José Nelson Amaral.
Karnaugh Maps (K maps).
ECE 301 – Digital Electronics Minimizing Boolean Expressions using K-maps, The Minimal Cover, and Incompletely Specified Boolean Functions (Lecture #6)
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC:K-Map. K-Map (1)  Karnaugh Map provides a systematic method for simplifying Boolean expressions and may produce.
©2010 Cengage Learning SLIDES FOR CHAPTER 5 KARNAUGH MAPS Click the mouse to move to the next page. Use the ESC key to exit this chapter. This chapter.
Computer Organisation
Plotting functions not in canonical form
CS 352 Introduction to Logic Design
CSCE 211: Digital Logic Design
Optimized Implementation of Logic Function
CSCE 211: Digital Logic Design
Optimized Implementation of Logic Function
CSCE 211: Digital Logic Design
CSCE 211: Digital Logic Design
CSCE 211: Digital Logic Design
ECE 331 – Digital System Design
CHAPTER 5 KARNAUGH MAPS 5.1 Minimum Forms of Switching Functions
Karnaugh Maps Introduction Venn Diagrams 2-variable K-maps
Chapter 3 Gate-level Minimization.
Optimized Implementation of Logic Function
CSCE 211: Digital Logic Design
COE 202: Digital Logic Design Combinational Logic Part 3
Overview Part 2 – Circuit Optimization
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
CSCE 211: Digital Logic Design
Chapter 4 Combinational Logic Design Principles. Overview Objectives -Define combinational logic circuit -Analysis of logic circuits (to describe what.
ECE 331 – Digital System Design
Presentation transcript:

07 KM Page 1 ECEn/CS 224 Karnaugh Maps

07 KM Page 2 ECEn/CS 224 What are Karnaugh Maps? A simpler way to handle most (but not all) jobs of manipulating logic functions. Hooray !!

07 KM Page 3 ECEn/CS 224 Karnaugh Map Advantages Can be done more systematically Much simpler to find minimum solutions Easier to see what is happening (graphical) Almost always use instead of boolean minimization…

07 KM Page 4 ECEn/CS 224 Truth Table Adjacencies F = A’ These are adjacent in a gray code sense - they differ by 1 bit We can apply XY + XY’ = X A’B’ + A’B = A’(B’+B) = A’(1) = A’ F = B Same idea: A’B + AB = B Key idea: Gray code adjacency allows use of simplification theorem> Problem: Physical adjacency in truth table  gray code adjacency

07 KM Page 5 ECEn/CS Variable Karnaugh Map A=0, B=0 A=0, B=1 A=1, B=0 A=1, B=1 A different way to draw a truth table by folding it

07 KM Page 6 ECEn/CS 224 KMap Physical adjacency does imply gray code adjacency F = A’B + AB = BF =A’B’ + A’B = A’

07 KM Page 7 ECEn/CS Variable Karnaugh Map

07 KM Page 8 ECEn/CS Variable Karnaugh Map

07 KM Page 9 ECEn/CS Variable Karnaugh Map

07 KM Page 10 ECEn/CS Variable Karnaugh Map F = A’B’ + A’B = A’

07 KM Page 11 ECEn/CS Variable Karnaugh Map A = 0 B = 0 or 1 F = A’B’ + A’B = A’

07 KM Page 12 ECEn/CS 224 Another Example F = A’B + AB’ + AB = A + B Each ‘1’ must be covered at least once

07 KM Page 13 ECEn/CS 224 Yet Another Example F = A’B’ + A’B + AB’ + AB = 1 Groups of more than two 1’s can be combined

07 KM Page 14 ECEn/CS Variable Karnaugh Map Showing Minterm Locations ABC=010 ABC = 101 Note the order of the B C variables:

07 KM Page 15 ECEn/CS 224 Adjacencies Adjacent squares differ by exactly one variable There is wrap-around: top and bottom rows are adjacent

07 KM Page 16 ECEn/CS 224 Truth Table to Karnaugh Map

07 KM Page 17 ECEn/CS 224 Solution Example A’BC+A’BC’ = A’B AB’C+ABC = AC F = A’B + AC

07 KM Page 18 ECEn/CS 224 Another Example A’B’C+A’BC = A’C AB’C’+ABC’ = AC’ F = A’C + AC’ = A ⊕ C

07 KM Page 19 ECEn/CS 224 Minterm Expansion to KMap F =  m( 1, 3, 4, 6 ) Minterms are the 1’s, everything else is 0

07 KM Page 20 ECEn/CS 224 Maxterm Expansion to KMap F = π M(0, 2, 5, 7) Maxterms are the 0’s, everything else is 1

07 KM Page 21 ECEn/CS 224 Yet Another Example A’B’C’+AB’C’+A’B’C+AB’C = B’ AB’C+ABC = AC F = B’ + AC 2 n 1’s can be circled at a time 1, 2, 4, 8, … OK 3 not OK The larger the group of 1’s – the simpler the resulting product term

07 KM Page 22 ECEn/CS 224 Boolean Algebra to Karnaugh Map Plot: ab ’ c ’ + bc + a ’

07 KM Page 23 ECEn/CS 224 Boolean Algebra to Karnaugh Map Plot: ab ’ c ’ + bc + a ’

07 KM Page 24 ECEn/CS 224 Boolean Algebra to Karnaugh Map Plot: ab ’ c ’ + bc + a ’

07 KM Page 25 ECEn/CS 224 Boolean Algebra to Karnaugh Map Plot: ab ’ c ’ + bc + a ’ Remaining spaces are 0

07 KM Page 26 ECEn/CS 224 Boolean Algebra to Karnaugh Map F = B’C’ + BC + A’ This is a simpler equation than we started with. Do you see how it was arrived at?

07 KM Page 27 ECEn/CS 224 Mapping Sum of Product Terms The 3 variable map has 12 possible groups of 2 spaces These become terms with 2 literals

07 KM Page 28 ECEn/CS 224 Mapping Sum of Product Terms The 3 variable map has 6 possible groups of 4 spaces These become terms with 1 literal

07 KM Page 29 ECEn/CS Variable Karnaugh Map Note the row and column orderings Required for adjacency D A’BC AB’C’ F = A’BC + AB’C’ + D

07 KM Page 30 ECEn/CS 224 Find a POS Solution Find solutions to groups of 0’s to find F’ Invert to get F using DeMorgan’s C’D F’ = C’D + BC’ + AB’CD’ F = (C+D’)(A’+B+C’+D)(B’+C) AB’CD’ BC’

07 KM Page 31 ECEn/CS 224 Dealing With Don’t Cares A’B’C+AB’C+A’BC+ABC = C F = C Circle the x’s that help get bigger groups of 1’s (or 0’s if POS) Don’t circle the x’s that don’t F =  m(1, 3, 7) +  d(0, 5)

07 KM Page 32 ECEn/CS 224 Minimal K-Map Solutions Some Terminology and An Algorithm to Find Them

07 KM Page 33 ECEn/CS 224 Prime Implicants A group of 1’s which are adjacent and can be combined on a Karnaugh Map is called an implicant. The biggest group of 1’s which can be circled to cover a 1 is called a prime implicant. –they are the only implicants we care about.

07 KM Page 34 ECEn/CS 224 Prime Implicants Non-prime Implicants Are there any additional prime implicants in the map that are not shown above?

07 KM Page 35 ECEn/CS 224 All The Prime Implicants Prime Implicants When looking for a minimal solution – only circle prime implicants… A minimal solution will never contain non-prime implicants

07 KM Page 36 ECEn/CS 224 Essential Prime Implicants Not all prime implicants are required… A prime implicant which is the only cover of some 1’s is essential – a minimal solution requires it. Essential Prime ImplicantsNon-essential Prime Implicants

07 KM Page 37 ECEn/CS 224 A Minimal Solution Example Minimum Not required… F = AB’ + BC + AD

07 KM Page 38 ECEn/CS 224 Another Example Minimum A’B’ is not required… Every one one of its locations is covered by multiple implicants After choosing essentials, everything is covered… F = A’D + BCD + B’D’

07 KM Page 39 ECEn/CS 224 Finding the Minimum Sum of Products 1. Find each essential prime implicant and include it in the solution. 2. Determine if any minterms are not yet covered. 3. Find the minimal # of remaining prime implicants which finish the cover.

07 KM Page 40 ECEn/CS 224 Essentials: A’D’ and AD Non-essentials: A’C and CD Solution: A’D’ + AD + A’C or A’D’ + AD+ CD Yet Another Example (Use of non-essential primes) AD CD A’C A’D’

07 KM Page 41 ECEn/CS 224 K-Map Solution Summary Identify prime implicants Add essentials to solution Find minimum # non-essentials required to cover rest of map

07 KM Page 42 ECEn/CS and 6-Variable K-Maps

07 KM Page 43 ECEn/CS Variable Karnaugh Map The planes are adjacent to one another (one is above the other in 3D) This is the A=0 planeThis is the A=1 plane

07 KM Page 44 ECEn/CS 224 Some Implicants in a 5-Variable KMap A=0A=1 D’E’ AB’C’D A’BCD B’C’DE’ ABC’DE

07 KM Page 45 ECEn/CS Variable KMap Example A=0A=1 F = B’D’ + BCD + A’BDE Find the minimum sum-of-products for: F =  m (0,1,4,5,11,14,15,16,17,20,21,30,31)

07 KM Page 46 ECEn/CS Variable Karnaugh Map AB=00 AB=01 AB=10 AB=11

07 KM Page 47 ECEn/CS 224 AB=10 AB=11 = CDEF= AC’D’ Solution = AC’D’ + CDEF AB=00 AB=01

07 KM Page 48 ECEn/CS 224 KMap Summary A Kmap is simply a folded truth table –where physical adjacency implies logical adjacency KMaps are most commonly used hand method for logic minimization KMaps have other uses for visualizing boolean equations –you may seem some later.