ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 6 Dr. Shi Dept. of Electrical and Computer Engineering.

Slides:



Advertisements
Similar presentations
ENGIN112 L9: More Karnaugh Maps September 22, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 9 More Karnaugh Maps and Don’t Cares.
Advertisements

Digital Circuits.
Prof. Sin-Min Lee Department of Computer Science
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.
Gate-level Minimization
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ENGIN112 L8: Minimization with Karnaugh Maps September 19, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 8 Minimization with Karnaugh.
Chapter 3 Simplification of Switching Functions
Give qualifications of instructors: DAP
Gate Logic: Two Level Canonical Forms
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)
CS 151 Digital Systems Design Lecture 8 Minimization with Karnaugh Maps.
بهينه سازي با نقشة کارنو Karnaugh Map. 2  Method of graphically representing the truth table that helps visualize adjacencies 2-variable K-map 3-variable.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Overview of Chapter 3 °K-maps: an alternate approach to representing Boolean functions °K-map representation can be used to minimize Boolean functions.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Boolean Algebra and Digital Circuits
K-map Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
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.
9/16/04UCB EECS150 D. Culler Fa04 1 EECS Components and Design Techniques for Digital Systems Lec 06 – Minimizing Boolean Logic 9/16-04 David Culler.
Optimization Algorithm
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 5: Quine-McCluskey Method José Nelson Amaral.
Gate-level Minimization
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.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
Computer Engineering (Logic Circuits) (Karnaugh Map)
Chapter3: Gate-Level Minimization Part 1 Origionally By Reham S. Al-Majed Imam Muhammad Bin Saud University.
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.
CHAPTER 3: PRINCIPLES OF COMBINATIONAL LOGIC
LOGIC GATES & BOOLEAN ALGEBRA
Ahmad Almulhem, KFUPM 2010 COE 202: Digital Logic Design Combinational Logic Part 3 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
Lecture 11 Combinational Design Procedure
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
THE K-MAP.
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).
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
Chapter 3 Simplification of Switching Functions. Simplification Goals Goal -- minimize the cost of realizing a switching function Cost measures and other.
1 EENG 2710 Chapter 3 Simplification of Switching Functions.
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC:K-Map. K-Map (1)  Karnaugh Map provides a systematic method for simplifying Boolean expressions and may produce.
Speaker: Fuw-Yi Yang 楊伏夷 伏夷非征番, 道德經 察政章(Chapter 58) 伏者潛藏也
CHAPTER 3 Simplification of Boolean Functions
Lecture 3: Incompletely Specified Functions and K Maps
Computer Organisation
CS 352 Introduction to Logic Design
Optimized Implementation of Logic Function
Digital Logic and Design
Lecture 3: Incompletely Specified Functions and K Maps
Optimized Implementation of Logic Function
CSE 370 – Winter 2002 – Logic minimization - 1
Optimization Algorithm
Lecture 6 Logistics Last lecture Today’s lecture
Lecture 7 Logistics Last lecture Today HW2 due now Lab2 going on
Chapter 3 Gate-level Minimization.
Lecture 6 Karnaugh maps (K-maps) K-maps with “don’t cares”
Optimized Implementation of Logic Function
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’
Lecture 7 Logistics Last lecture Today HW2 due now Lab2 going on
Laws & Rules of Boolean Algebra
Dept of Electronics Engineering
Presentation transcript:

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 6 Dr. Shi Dept. of Electrical and Computer Engineering

KARNAUGH MAPS

Overview  K-maps: an approach to minimize Boolean functions  Easy conversion from truth table to K-map to minimized SOP representation.  Simple rules (steps) used to perform minimization  Leads to minimized SOP representation.  Much faster and more more efficient than previous minimization techniques with Boolean algebra.

Example: One-bit Adder Adder Cin Cout S B A Cout = A’*B*Cin + A*B’*Cin+A*B*Cin’ + A*B*Cin Requires: 8 ANDs, 3 Ors How to simplify???

xyF xyF Karnaugh maps 01 y x y x 0 1 x’y’ xy’xy x’y F = Σ(m 0,m 1 ) = x’y + x’y’

xyF xyF Karnaugh maps  Alternate way of representing Boolean function  All rows of truth table represented with a square  Each square represents a minterm  Easy to convert between truth table, K-map, and SOP  Unoptimized form: number of 1’s in K-map equals number of minterms (products) in SOP  Optimized form: reduced number of minterms 01 y x y x 0 1 x’y’ xy’xy x’y x y F = Σ(m 0,m 1 ) = x’y + x’y’

Karnaugh Maps  A Karnaugh map is a graphical tool for assisting in the general simplification procedure.  Two variable maps. 0 A 10 1 B F=AB +A ’ B 0 A 11 1 B °Three variable maps. 0 A BC F=AB’C’ +A B C + ABC +A BC + A’B’C + A’BC’ F=AB + AB + AB AB C F

Rules for K-Maps  We can reduce functions by circling 1’s in the K- map  Each circle represents minterm reduction  Following circling, we can deduce minimized and-or form. Rules to consider 1. Every cell containing a 1 must be included at least once. 2. The largest possible “power of 2 rectangle” must be enclosed. 3. The 1’s must be enclosed in the smallest possible number of rectangles.

Karnaugh Maps  A Karnaugh map is a graphical tool for assisting in the general simplification procedure.  Two variable maps. 0 A 10 1 B F=AB +A ’ B 0 A 11 1 B F=A + B °Three variable maps. F=A + B C + BC 0 A BC F=AB + AB + AB F=AB’C’ +A B C + ABC +A BC + A’B’C + A’BC’

Karnaugh maps  Numbering scheme based on Gray–code  e.g., 00, 01, 11, 10  Only a single bit changes in code for adjacent map cells  This is necessary to observe the variable transitions 0001 AB C C B A F(A,B,C) =  m(0,4,5,7) G(A,B,C) = 0011 C B A C B A A = AC + B’C’

More Karnaugh Map Examples  Examples g = b' a b c ab a b c ab f = a cout = ab + bc + ac f = a 1. Circle the largest groups possible. 2. Group dimensions must be a power of Remember what circling means!

Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A ABCinSCout S = A’B’Cin + A’BCin’ + AB’Cin’ + ABCin Cout = A’BCin + A B’Cin + ABCin’ + ABCin = A’BCin + ABCin + AB’Cin + ABCin + ABCin’ + ABCin = BCin + ACin + AB = (A’ + A)BCin + (B’ + B)ACin + (Cin’ + Cin)AB = 1·BCin + 1· ACin + 1· AB How to use a Karnaugh Map instead of the Algebraic simplification?

Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. A B Cin

A B Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = ACin

A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = Acin + AB

A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for Cout Now we have to cover all the 1s in the Karnaugh Map using the largest rectangles and as few rectangles as we can. Cout = ACin + AB + BCin

A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for S S = A’BCin’

A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for S S = A’BCin’ + A’B’Cin

A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for S S = A’BCin’ + A’B’Cin + ABCin

A B Cin Application of Karnaugh Maps: The One-bit Adder Adder Cin Cout S B A Karnaugh Map for S S = A’BCin’ + A’B’Cin + ABCin + AB’Cin’ No Possible Reduction! Can you draw the circuit diagrams?

Summary  Karnaugh map allows us to represent functions with new notation  Representation allows for logic reduction.  Implement same function with less logic  Each square represents one minterm  Each circle leads to one product term  Not all functions can be reduced  Each circle represents an application of:  Distributive rule -- x(y + z) = xy + xz  Complement rule – x + x’ = 1

MORE KARNAUGH MAPS

Overview  Karnaugh maps with four inputs  Same basic rules as three input K-maps  Understanding prime implicants  Related to minterms  Covering all implicants  Using Don’t Cares to simplify functions  Don’t care outputs are undefined  Summarizing Karnaugh maps

Karnaugh Maps for Four Input Functions  Represent functions of 4 inputs with 16 minterms  Use same rules developed for 3-input functions  Note bracketed sections shown in example.

 F(A,B,C,D) =  m(0,2,3,5,6,7,8,10,11,14,15) F = C+ B’D’ Karnaugh map: 4-variable example D A B C + A’BD

A' B' D + A' C + B' C D B C' D' + A C' + A B D' LT= EQ= GT= K-map for LTK-map for GT Design examples D A B C K-map for EQ D A B C D A B C Can you draw the truth table for these examples? A'B'C'D' + A'BC'D + ABCD + AB'CD’

ABCDABCD EQ Physical Implementation °Step 1: Truth table °Step 2: K-map °Step 3: Minimized sum-of- products °Step 4: Physical implementation with gates K-map for EQ D A B C

Karnaugh Maps  Four variable maps. F=BC +CD + AC+ AD 0 AB CD F=ABC + ACD + ABC + AB CD + ABC + AB C °Need to make sure all 1’s are covered °Try to minimize total product terms. °Design could be implemented using NANDs and NORs

Product of Sums

SoP from PoS

Sum of Products

SoP and PoS

Quine-McClasky Algorithm  Willard van Orman Quine  Professor at Harvard University  Edward McCluskey, Jr  Preofessor at Stanford University  Hundreds of students in academia and industry  Jacob Abraham (UT Austin) W. Kent Fuchs (Cornell) Weiping Shi

DON’T CARES (ISFs)

Karnaugh maps: Don’t cares  In some cases, outputs are undefined  We “don’t care” if the logic produces a 0 or a 1  This knowledge can be used to simplify functions. 01 X0X1X0X1 D A 1 110X110X 00 B C CD AB Treat X’s like either 1’s or 0’s - Very useful - OK to leave some X’s uncovered

+ C’D Karnaugh maps: Don’t cares  f(A,B,C,D) =  m(1,3,5,7,9) + d(6,12,13)  without don't cares f = 01 X0X1X0X1 D A 1 110X110X 00 B C A’D CD AB Cf X D XX XX00 A B

Don’t Care Conditions  In some situations, we don’t care about the value of a function for certain combinations of the variables.  these combinations may be impossible in certain contexts  or the value of the function may not matter in when the combinations occur  In such situations we say the function is incompletely specified and there are multiple (completely specified) logic functions that can be used in the design.  so we can select a function that gives the simplest circuit  When constructing the terms in the simplification procedure, we can choose to either cover or not cover the don’t care conditions.

Map Simplification with Don’t Cares F=ACD+B+AC 0 AB xx CD 0 x x x 0 AB xx CD 0 x x x F=ABCD+ABC+BC+AC °Alternative covering.

Karnaugh maps: don’t cares (cont’d)  f(A,B,C,D) =  m(1,3,5,7,9) + d(6,12,13)  f = A'D + B'C'Dwithout don't cares  f = with don't cares don't cares can be treated as 1s or 0s depending on which is more advantageous 01 X0X1X0X1 D A1 110X110X 00 B C A'D by using don't care as a "1" a 2-cube can be formed rather than a 1-cube to cover this node + C'D