Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 7 – Karnaugh Maps.

Slides:



Advertisements
Similar presentations
KU College of Engineering Elec 204: Digital Systems Design
Advertisements

Prof. Sin-Min Lee Department of Computer Science
Overview Part 1 – Gate Circuits and Boolean Equations
K-Map Simplification COE 202 Digital Logic Design Dr. Aiman El-Maleh
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.
Gate-level Minimization
Boolean Algebra and Combinational Logic
ECE 301 – Digital Electronics Karnaugh Maps (Lecture #7) The slides included herein were taken from the materials accompanying Fundamentals of Logic Design,
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 – Part 4.
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
Circuit Optimization Goal: To obtain the simplest implementation for a given function Optimization is a more formal approach to simplification that is.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 2 – Combinational.
Karnaugh Maps for Simplification
Computer Engineering (Logic Circuits) (Karnaugh Map)
SYEN 3330 Digital Systems Jung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 – Part 5.
EECC341 - Shaaban #1 Lec # 7 Winter Combinational Circuit Minimization Canonical sum and product logic expressions do not provide a circuit.
Simplifying Boolean Expressions Using K-Map Method
Computer Organization and Assembly Language: Chapter 7 The Karnaugh Maps September 30, 2013 By Engineer. Bilal Ahmad.
IKI a-Simplification of Boolean Functions Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
KU College of Engineering Elec 204: Digital Systems Design
1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)
1 Logic Gates Digital Computer Logic Kashif Bashir WWW:
Chapter 3.5 Logic Circuits. How does Boolean algebra relate to computer circuits? Data is stored and manipulated in a computer as a binary number. Individual.
Boolean Algebra and Digital Circuits
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 2 – Combinational.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
Department of Computer Engineering
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. Circuit Optimization Logic and Computer Design Fundamentals.
Combinational Logic Part 2: Karnaugh maps (quick).
Circuit Minimization. It is often uneconomical to realize a logic directly from the first logic expression that pops into your head. Canonical sum and.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
Gate-Level Minimization
Gate-level Minimization
Computer Engineering (Logic Circuits) (Karnaugh Map)
Chapter3: Gate-Level Minimization Part 1 Origionally By Reham S. Al-Majed Imam Muhammad Bin Saud University.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Unit 1 Minimization Techniques and Logic Gates. Introduction to Digital Systems Analog devices and systems process time-varying signals that can take.
CS1Q Computer Systems Lecture 7
Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 6 – Canonical Forms.
February 2, 2004CS 2311 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are AND, OR and.
Karnaugh Maps (K-Maps)
CS231 Boolean Algebra1 Summary so far So far: – A bunch of Boolean algebra trickery for simplifying expressions and circuits – The algebra guarantees us.
Floyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd Chapter 4 © 2008 Pearson Education.
CS151 Introduction to Digital Design Chapter Map Simplification.
Karnaugh Maps (K-Maps)
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
ECE/CS 352 Digital System Fundamentals1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapter 2 – Part 5 Tom Kaminski & Charles R. Kime.
EE2420 – Digital Logic Summer II 2013 Hassan Salamy Ingram School of Engineering Texas State University Set 5: Karnaugh Maps.
Karnaugh Map (K-Map) By Dr. M. Khamis Mrs. Dua’a Al Sinari.
1 Gate Level Minimization EE 208 – Logic Design Chapter 3 Sohaib Majzoub.
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
Karnaugh Maps (K maps).
Chapter 4 OPTIMIZED IMPLEMENTATION OF LOGIC FUNCTIONS.
Introduction to Digital Electronics Lecture 5: Function Minimisation.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
Digital Systems Design 1 Signal Expressions Multiply out: F = ((X + Y)  Z) + (X  Y  Z) = (X  Z) + (Y  Z) + (X  Y  Z)
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
CHAPTER 3 Simplification of Boolean Functions
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
ECE/CS 352 Digital Systems Fundamentals
SYEN 3330 Digital Systems Chapter 2 – Part 4 SYEN 3330 Digital Systems.
Overview Part 2 – Circuit Optimization
Lecture 3: Incompletely Specified Functions and K Maps
Circuit Simplification and
Presentation transcript:

Based on slides by:Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. ECE/CS 352: Digital System Fundamentals Lecture 7 – Karnaugh Maps

Chapter 2 2 Outline  Circuit Optimization Literal cost Gate input cost  Two-Variable Karnaugh Maps  Three-Variable Karnaugh Maps

Chapter 2 3 Circuit Optimization  Goal: To obtain the simplest implementation for a given function  Optimization is a more formal approach to simplification that is performed using a specific procedure or algorithm  Optimization requires a cost criterion to measure the simplicity of a circuit  Two distinct cost criteria we will use: Literal cost (L) Gate input cost (G) Gate input cost with NOTs (GN)

Chapter 2 4 D  Literal – a variable or its complement  Literal cost – the number of literal appearances in a Boolean expression corresponding to the logic circuit diagram  Examples: F = BD + A C + A F = BD + A C + A + AB F = (A + B)(A + D)(B + C + )( + + D) Which solution is best? Literal Cost D B C B B DC B C L=8 L=11 L=10

Gate Input Cost  Gate input costs - the number of inputs to the gates in the implementation corresponding exactly to the given equation or equations. (G - inverters not counted, GN - inverters counted)  For SOP and POS equations, it can be found from the equation(s) by finding the sum of: all literal appearances the number of terms excluding terms consisting only of a single literal,(G) and optionally, the number of distinct complemented single literals (GN).  Example: F = BD + A C + A F = BD + A C + A + AB F = (A + )(A + D)(B + C + )( + + D) Which solution is best? D B C B B DC B DB C G=11,GN=14 G=15,GN=18 G=14,GN=17

Chapter 2 6  Example 1:  F = A + B C + Cost Criteria (continued) A B C F B C L = 5  L (literal count) counts the AND inputs and the single literal OR input. G = L + 2 = 7  G (gate input count) adds the remaining OR gate inputs GN = G + 2 = 9  GN(gate input count with NOTs) adds the inverter inputs

Chapter 2 7  Example 2:  F = A B C +  L = 6 G = 8 GN = 11  F = (A + )( + C)( + B)  L = 6 G = 9 GN = 12  Same function and same literal cost  But first circuit has better gate input count and better gate input count with NOTs  Select it! Cost Criteria (continued) B C A A B C F C B F A B C A

Chapter 2 8 Why Use Gate Input Counts?  CMOS logic gates:  Each input adds:  P-type transistor to pull-up network  N-type transistor to pull-down network

Chapter 2 9 Boolean Function Optimization  Minimizing the gate inputs reduces circuit cost.  Some important questions: When do we stop trying to reduce the cost? Do we know when we have a minimum cost?  Two-level SOP & POS optimum or near-optimum functions  Karnaugh maps (K-maps) Graphical technique useful for up to 5 inputs

Chapter 2 10 Two Variable K-Maps  A 2-variable Karnaugh Map: Similar to Gray Code Adjacent minterms differ by one variable y = 0 y = 1 x = 0 m 0 = m 1 = x = 1 m 2 = m 3 = yx yx yx yx

Chapter 2 11 K-Map and Truth Tables  The K-Map is just a different form of the truth table.  Example – Two variable function: We choose a,b,c and d from the set {0,1} to implement a particular function, F(x,y). Function Table K-Map y = 0 y = 1 x = 0 a b x = 1 c d

Chapter 2 12 Karnaugh Maps (K-map)  A K-map is a collection of squares Each square represents a minterm The collection of squares is a graphical representation of a Boolean function Adjacent squares differ in the value of one variable Alternative algebraic expressions for the same function are derived by recognizing patterns of squares  The K-map can be viewed as A reorganized version of the truth table

Chapter 2 13 Some Uses of K-Maps  Finding optimum or near optimum SOP and POS standard forms, and two-level AND/OR and OR/AND circuit implementations for functions with small numbers of variables  Demonstrate concepts used by computer- aided design programs to simplify large circuits

Chapter 2 14 K-Map Function Representation  Example: F(x,y) = x  For function F(x,y), the two adjacent cells containing 1’s can be combined using the Minimization Theorem: F = x y = 0 y = 1 x = x = xyxyx)y,x(F 

Chapter 2 15 K-Map Function Representation  Example: G(x,y) = x + y  For G(x,y), two pairs of adjacent cells containing 1’s can be combined using the Minimization Theorem: G = x+y y = 0 y = 1 x = x =  yxyxxyyxyx)y,x(G  Duplicate x y

Chapter 2 16 Three Variable Maps  A three-variable K-map:  Where each minterm corresponds to the product terms:  Note that if the binary value for an index differs in one bit position, the minterms are adjacent on the K-Map yz=00 yz=01 yz=11 yz=10 x=0 m0m0 m1m1 m3m3 m2m2 x=1 m4m4 m5m5 m7m7 m6m6 yz=00 yz=01 yz=11 yz=10 x=0 x=1 zyx zyx zyxzyx zyx zyx zyx zyx

Chapter 2 17 Alternative Map Labeling  Map use largely involves: Entering values into the map, and Reading off product terms from the map.  Alternate labelings are useful: y z x x y z z y y z z x x

Chapter 2 18 Example Functions  By convention, we represent the minterms of F by a "1" in the map and leave the minterms of blank  Example:  Learn the locations of the 8 indices based on the variable order shown (x, most significant and z, least significant) on the map boundaries y x z x y z F

Chapter 2 19 Combining Squares  By combining squares, we reduce number of literals in a product term, reducing the literal cost, thereby reducing the other two cost criteria  On a 3-variable K-Map: One square represents a minterm with three variables Two adjacent squares represent a product term with two variables Four “adjacent” terms represent a product term with one variable Eight “adjacent” terms is the function of all ones (no variables) = 1.

Chapter 2 20 Example: Combining Squares  Example: Let  Applying the Minimization Theorem three times:  Thus the four terms that form a 2 × 2 square correspond to the term "y". y  zyyz  zyxzyxzyxzyx)z,y,x(F  x y z

Chapter 2 21 Three-Variable Maps  Reduced literal product terms for SOP standard forms correspond to rectangles on K-maps containing cell counts that are powers of 2.  Rectangles of 2 cells represent 2 adjacent minterms; of 4 cells represent 4 minterms that form a “pairwise adjacent” ring.  Rectangles can contain non-adjacent cells due to wrap-around at edges

Chapter 2 22 Three-Variable Maps  Topological warp of 3-variable K-maps that shows all adjacencies:

Chapter 2 23 Three-Variable Maps  Example Shapes of 2-cell Rectangles: y x z X’Y’ YZ X’Z’

Chapter 2 24 Three-Variable Maps  Example Shapes of 4-cell Rectangles:  Read off the product terms for the rectangles shown y x z Y’ Z Z’

Chapter 2 25 Three Variable Maps z)y,F(x,  y 11 x z 11 1 z z yx  yx  K-Maps can be used to simplify Boolean functions by systematic methods. Terms are selected to cover the “1s”in the map.  Example: Simplify

Chapter 2 26 Summary  Circuit Optimization Literal cost Gate input cost  Two-Variable Karnaugh Maps  Three-Variable Karnaugh Maps