Quine-McCluskey (Tabular) Minimization

Similar documents
UNIT 5 KARNAUGH MAPS Spring 2011

DIGITAL ELECTRONICS & it0203 Semester 3

Karnaugh Maps Objectives

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

Logic Synthesis and Verification

L6: Two-level minimization. Reading material

Lecture 6: Gate Level Minimization Syed M. Mahmud, Ph.D ECE Department Wayne State University

CHAPTER 5 KARNAUGH MAPS

Unit 6. Quine-McClusky Method. Unit 6 1

Unit 2 Session - 6 Combinational Logic Circuits

Chapter 2 Combinational Logic Circuits

CS/EE 181a 2008/09 Lecture 4

Week-I. Combinational Logic & Circuits

Lecture 6: Manipulation of Algebraic Functions, Boolean Algebra, Karnaugh Maps

Digital Circuit And Logic Design I. Lecture 4

CSE 140: Components and Design Techniques for Digital Systems

Lecture 7: Karnaugh Map, Don t Cares

Chapter 4 Optimized Implementation of Logic Functions

Logic Design I (17.341) Fall Lecture Outline

Chapter 2 Combinational Logic Circuits

Exact and heuristic minimization of Boolean functions

ELC224C. Karnaugh Maps

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

Principles of Computer Architecture. Appendix B: Reduction of Digital Logic. Chapter Contents

Simplification of Boolean Functions. Dept. of CSE, IEM, Kolkata

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

Advanced Digital Design with the Verilog HDL, Second Edition Michael D. Ciletti Prentice Hall, Pearson Education, 2011

Fundamental Algorithms for System Modeling, Analysis, and Optimization

Optimizations and Tradeoffs. Combinational Logic Optimization

Lecture 4: Four Input K-Maps

Digital Logic Design. Combinational Logic

Contents. Chapter 3 Combinational Circuits Page 1 of 36

Minimierung. Wintersemester 2018/19. Folien basierend auf Material von F. Vahid und S. Werner Vorlesender: Dr. Ing.

Logic Simplification. Boolean Simplification Example. Applying Boolean Identities F = A B C + A B C + A BC + ABC. Karnaugh Maps 2/10/2009 COMP370 1

Introduction to Karnaugh Maps

Logic Synthesis and Verification. Two-Level Logic Minimization (1/2) Quine-McCluskey Procedure. Complexity

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 2 Circuit Optimization

for Digital Systems Simplification of logic functions Tajana Simunic Rosing Sources: TSR, Katz, Boriello & Vahid

CS/EE 181a 2010/11 Lecture 4

Digital Logic Circuits - Switching Algebra - Combinational Circuits -

Gate-Level Minimization

Binary logic consists of binary variables and logical operations. The variables are

Midterm1 Review. Jan 24 Armita

Textbook: Digital Design, 3 rd. Edition M. Morris Mano

UNIT 4 MINTERM AND MAXTERM EXPANSIONS

CHAPTER III BOOLEAN ALGEBRA

Introduction to Digital Logic Missouri S&T University CPE 2210 Karnaugh Maps

Karnaugh Map & Boolean Expression Simplification

CHAPTER III BOOLEAN ALGEBRA

Number System conversions

COM111 Introduction to Computer Engineering (Fall ) NOTES 6 -- page 1 of 12

Review. EECS Components and Design Techniques for Digital Systems. Lec 06 Minimizing Boolean Logic 9/ Review: Canonical Forms

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

Systems I: Computer Organization and Architecture

REPRESENTATION AND MINIMIZATION OF BOOLEAN FUNCTIONS. Part II Minimization of Boolean Functions.

L4: Karnaugh diagrams, two-, and multi-level minimization. Elena Dubrova KTH / ICT / ES

ENG2410 Digital Design Combinational Logic Circuits

Spiral 1 / Unit 5. Karnaugh Maps

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 2

CSCI 220: Computer Architecture-I Instructor: Pranava K. Jha. BCD Codes

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

211: Computer Architecture Summer 2016

Karnaugh Maps ف ر آ ا د : ا ا ب ا م آ ه ا ن ر ا

MC9211 Computer Organization

DIGITAL TECHNICS I. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: LOGIC SYNTHESIS

Outcomes. Spiral 1 / Unit 5. Logic Function Synthesis KARNAUGH MAPS. Karnaugh Maps

Lecture 5: NAND, NOR and XOR Gates, Simplification of Algebraic Expressions

ECE 20B, Winter 2003 Introduction to Electrical Engineering, II LECTURE NOTES #2

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

Synthesis of 2-level Logic Exact and Heuristic Methods. Two Approaches

Simplifying Logic Circuits with Karnaugh Maps

Chap 2. Combinational Logic Circuits

Chapter 3. Boolean Algebra. (continued)

Logical Design of Digital Systems

CMSC 313 Lecture 19 Combinational Logic Components Programmable Logic Arrays Karnaugh Maps

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

9.1. Unit 9. Implementing Combinational Functions with Karnaugh Maps or Memories

Logic Minimization. Two-Level. University of California. Prof. Srinivas Devadas. Prof. Richard Newton Prof. Sanjit Seshia. Prof.

14:332:231 DIGITAL LOGIC DESIGN

Reduction of Logic Equations using Karnaugh Maps

Karnaugh Maps (K-Maps)

PI = { a.b.c, ac d, b cd, ab d, bd} cd

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

MODULAR CIRCUITS CHAPTER 7

Review for Test 1 : Ch1 5

DIGITAL LOGIC CIRCUITS

Logic and Computer Design Fundamentals. Chapter 2 Combinational Logic Circuits. Part 1 Gate Circuits and Boolean Equations

Minimization techniques

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

LOGIC GATES. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

CHAPTER 7. Solutions for Exercises

CMSC 313 Lecture 19 Homework 4 Questions Combinational Logic Components Programmable Logic Arrays Introduction to Circuit Simplification

CPE100: Digital Logic Design I

CMSC 313 Preview Slides

Combinational Logic. Review of Combinational Logic 1

Simlification of Switching Functions

Combinational Logic. Mantıksal Tasarım BBM231. section instructor: Ufuk Çelikcan

ESE535: Electronic Design Automation. Today. Problem. EDA Use PLA. Programmable Array Logic (PLAs) Two-Level Logic Optimization

K-map Definitions. abc

ELCT201: DIGITAL LOGIC DESIGN

Transcription:

Quine-McCluskey (Tabular) Minimization Two step process utilizing tabular listings to: Identify prime implicants (implicant tables) Identify minimal PI set (cover tables) All work is done in tabular form Number of variables is not a limitation Basis for many computer implementations Don t cares are easily handled Proper organization and term identification are key factors for correct results

Difficulty Note: Can be 2 n minterms ~ 3 n /n primes primes 3 n /n minterms 2 n Thus O(2 n ) rows and O(3 n /n ) columns and minimum covering problem is NP-complete. 2

Eample wy Karnaugh map Primes: Covering Table Solution: {,2} + (also ) F= wyz + wyz + wyz + wyz d= yz + wyz + yz + yz + wyz + wyz w yz z + + wy wy d d d z + d d d d d d is minimum prime cover. wyz wyz z wyz wyz 3 z wy

Covering Table wyz z wy Primes of f+d Minterms of f wyz wyz wyz Row singleton (essential minterm) Essential prime Definition: An essential prime is any prime that uniquely covers a minterm of f. 4

Quine-McCluskey Minimization (cont.) Terms are initially listed one per line in groups Each group contains terms with the same number of true and complemented variables Terms are listed in numerical order within group Terms and implicants are identified using one of three common notations full variable form cellular form,,- form

Eample of Different Notations F(A, B, C, D) = m (4,5,6,8,,3) Full variable Cellular,,- ABCD 4 ABCD 8 2 ABCD 5 ABCD 6 ABCD 3 ABCD 3

Notation Forms Full variable form: variables and complements in algebraic form hard to identify when adjacency applies very easy to make mistakes Cellular form: terms are identified by their decimal inde value easy to tell when adjacency applies; indees must differ by power of two (one bit),,- form: terms are identified by their binary inde value easier to translate to/from full variable form easy to identify when adjacency applies, one bit is different shows variable(s) dropped when adjacency is used Different forms may be mied during the minimization

Implication Table (,,-) Quine-McCluskey Method Tabular method to systematically find all prime implicants ƒ(a,b,c,d) = Σ m (,2.5,6,7,9,) + Σ d (,3,5) Part : Find all prime implicants Step : Fill Column with onset and DC-set minterm indices. Group by number of true variables (# of s). NOTE THAT DCs ARE INCLUDED IN THIS STEP! Column I Implication Table

Minimization - First Pass (,,-) Quine-McCluskey Method Tabular method to systematically find all prime implicants ƒ(a,b,c,d) = Σ m (,2.5,6,7,9,) + Σ d (,3,5) Part : Find all prime implicants Step 2: Apply Adjacency - Compare elements of group with N 's against those with N+ 's. One bit difference implies adjacent. Eliminate variable and place in net column. E.g., vs. yields - vs. yields - When used in a combination, mark with a check. If cannot be combined, mark with a star. These are the prime implicants. Repeat until nothing left. Column I 2 5 6 9 7 3 5 Implication Table Column II -, -,2 -,5 -,9-2,6-2, - 5,7-5,3-6,7-9,3-7,5-3,5

Minimization - Second Pass (,,-) Quine-McCluskey Method Step 2 cont.: Apply Adjacency - Compare elements of group with N 's against those with N+ 's. One bit difference implies adjacent. Eliminate variable and place in net column. E.g., vs. yields - - vs. - yields -- When used in a combination, mark with a check. If cannot be combined, mark with a star. THESE ARE THE PRIME IMPLICANTS. Repeat until nothing left. The set of constitutes the Complete Sum c Column I 2 5 6 9 7 3 5 Implication Table Column II - *, - *,2 -,5 -,9 - * 2,6 - * 2, - 5,7-5,3 - * 6.7-9,3-7,5-3,5 Column III -- *,5,9,3 - - *5,7,3,5

Prime Implicants ƒ(a,b,c,d) = Σ m (,2.5,6,7,9,) + Σ d (,3,5) C C D A B A D B Prime Implicants: - - A BC A C D - - A BD BC D - A BC -- B D -- C D Stage 2: find smallest set of prime implicants that cover the active-set Note that essential prime implicants must be in the final epression

Coverage Table rows = prime implicants columns = ON-set elements (minterms) place an "" if ON-set element is covered by the prime implicant NOTE: DON T INCLUDE DCs IN COVERAGE TABLE; THEY DON T HAVE TO BE MANDATORY COVERED Coverage Chart, - 2 5 6 7 9,2-2,6-2, - 6,7 -,5,9,3 -- 5,7,3,5 --

Row and Column Dominance Definition: Given two rows i and i 2, a row i is said to dominate i 2 if it has checks in all columns in which i 2 has checks, i.e. it is a superset of i 2 Eample: i i 2 i dominates i 2 We can remove row i 2, because we would never choose i 2 in a minimum cover since it can always be replaced by i (i 2 is anymore a prime implicant). DOMINATED ROWS CAN BE ELIMINATED 3

Row and Column Dominance Definition: Given two colums j and j 2, if the set of primes of column j 2 is contained in the set of primes of column j Eample: j 2 dominates j j j2 We can remove column j since we have to choose a prime to cover j 2, any such prime also covers j, that would result covered as well. DOMINATED COLUMNS CAN BE ELIMINATED 4

Pruning the Covering Table. Remove all rows covered by essential primes (columns in row singletons). Put these primes in the cover G. 2. Group identical rows together and remove dominated rows. 3. Remove dominating columns. For equal columns, keep just one to represent them. 4. Newly formed row singletons define n-ary essential primes. 5. Go to if covering table decreased. The algorithm may terminate successfully with a set of primes and an emty table. In case it terminate with a non empty table, the resulting reduced covering table is called the cyclic core. This has to be solved. A minimum solution for the cyclic core must be added to the resulting G. 5

Coverage Table (cont.) Coverage Chart, - 2 5 6 7 9, - 2 5 6 7 9,2 -,2-2,6-2,6-2, - 2, - 6,7-6,7 -,5,9,3 --,5,9,3 -- 5,7,3,5 -- 5,7,3,5 -- If column has a single, than the implicant associated with the row is essential. It must appear in the minimum cover

Coverage Table (cont.), - 2 5 6 7 9, - 2 5 6 7 9,2 -,2-2,6-2,6-2, - 2, - 6,7-6,7 -,5,9,3 --,5,9,3 -- 5,7,3,5 -- 5,7,3,5 -- Eliminate all columns covered by essential primes Find minimum set of rows that cover the remaining columns F = BCD + ABC + CD

Quine Mc Clunskey: Cyclic Core eample F= m (,,3,6,8,9,23,28,3,3) V = Y V = Y W W Z Z F=v w y +v w z+w y z +w yz+vw z +vw y+vwz +vwy+vw yz+vyz A B C D E F G H I J

Implication Table (,,-) Quine-McCluskey Method Tabular method to systematically find all prime implicants ƒ(v,w,,y,z) = Σm(,,3,6,8,9,23,28,3,3) Part : Find all prime implicants Step : Fill Column with activeset and DC-set minterm indices. 6 3 8 Group by number of true variables (# of s). 9 28 23 3 3 Column I Implication Table Column II - * - * - * - * - * - * - * - * - * - * A: C: 6 B: 3 E:6 8 D: 3 9 F: 8 9 I: 9 23 G:28 3 J: 23 3 H: 3 3 F=v w y +v w z+w y z +w yz+vw z +vw y+vwz +vwy+vw yz+vyz A B C D E F G H I J

Quine Mc Clunskey F= 5 (,,3,6,8,9,23,28,3,3) 3 6 8 9 23 28 3 3 A B C D E F G H I J G+J+A+D+E; G+J+B+C+F; G+J+C+B+F; G+J+D+A+E; G+J+E+A+D; G+J+F+B+C.

Quine Mc Clunskey: Cyclic Core eample F= m (,,3,6,8,9,23,28,3,3) V = Y V = Y G:28 3 J:23 3 A: D: 3 9 E:6 8 W W B: 3 C: 6 F:8 9 Z PRIME ESSENTIAL Z I: 9 23 H:3 3 F=v w y +v w z+w y z +w yz+vw z +vw y+vwz +vwy+vw yz+vyz A B C D E F G H I J G+J+A+D+E; G+J+B+C+F

Generating Primes multiple outputs Eample: f(, y, z) = m(3,5,7), f2(, y, z) = m(,2,3) f z y f2 y z - - f=yz+z -- - y z f2=z+y - - z y z y z f f2 z y z z f f2 The idea is that we can share terms: using separate optimizations 6 gates and G=2 sharing a term 5 gates and G=. -- - - f f2= (yz+z)(z+y) f f2 = yz 22

Generating Primes multiple outputs Theorem: if p is a prime implicant for f, and p 2 is a prime implicant for f 2, then if p.p 2, p.p 2 is a prime implicant of f.f 2 Theorem: if p 3 is a prime implicant for f.f 2, then there eist p for f, and p 2 for f 2, such that p 3 =p.p 2 We can conclude that all prime implicants of f.f 2 are minimal sharable products for f and f 2 : and that all prime implicants for f.f 2 are created by products of prime implicants for f and f 2 The way to use this is to make the prime implicants of f.f 2 available to the minimizations of f and f 2 by etending the table concept 23

Generating Primes multiple outputs Procedure similar to single-output function, ecept: include also the primes of the products of individual functions f minterms f 2 minterms Rows for f prime implicants: mark only f columns Rows for f 2 prime implicants: mark only f 2 columns Rows for f f 2 prime implicants: mark both f and f 2 columns

Minimize multiple-output cover f f 2 f f 2 Eample, cont. m 3 = m 5 = m 7 = m = m 2 = m 3 = m 3 = p = y z p 2 = z - - - p 3 = y p 4 = z - p 5 = y z m 3 m 5 m 7 m m 2 m 3 p p 2 p 3 p 4 p 5 f f 2 p p 3 m 3 m 3 p 5 Note that selecting p 5 and removing all columns the marks coverage is complete Min cover has 3 primes: F = { p 2, p 4, p 5 } 25