Technical Seminar II Implementation of

Slides:



Advertisements
Similar presentations
FUNCTION OPTIMIZATION Switching Function Representations can be Classified in Terms of Levels Number of Levels, k, is Number of Unique Boolean (binary)
Advertisements

Prof. Sin-Min Lee Department of Computer Science
ECE C03 Lecture 31 Lecture 3 Two-Level Logic Minimization Algorithms Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Quine-McCluskey (Tabular) Minimization  Two step process utilizing tabular listings to:  Identify prime implicants (implicant tables)  Identify minimal.
بهينه سازي با روش Quine-McCluskey
ECE C03 Lecture 21 Lecture 2 Two Level Minimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Chapter 3 Simplification of Switching Functions
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.

ECE 331 – Digital System Design Karnaugh Maps and Determining a Minimal Cover (Lecture #7) The slides included herein were taken from the materials accompanying.
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 Programming Skills Revision Prepared by: Ghader Kurdi.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Digital Logic and Design Vishal Jethva Lecture No. 10 svbitec.wordpress.com.
Digital Logic Design Lecture # 7 University of Tehran.
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 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.
The covering procedure. Remove rows with essential PI’s and any columns with x’s in those rows.
Quine-McCluskey (Tabular) Minimization Two step process utilizing tabular listings to: Identify prime implicants (implicant tables) Identify minimal PI.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. Circuit Optimization Logic and Computer Design Fundamentals.
Two-Level Simplification Approaches Algebraic Simplification: - algorithm/systematic procedure is not always possible - No method for knowing when the.
ECE 2110: Introduction to Digital Systems PoS minimization Don’t care conditions.
UM EECS 270 Spring 2011 – Taken from Dr.Karem Sakallah Logic Synthesis: From Specs to Circuits Implementation Styles –Random –Regular Optimization Criteria.
Computer Organization CSC 405 Quine-McKluskey Minimization.
Combinational Logic Part 2: Karnaugh maps (quick).
Two Level Networks. Two-Level Networks Slide 2 SOPs A function has, in general many SOPs Functions can be simplified using Boolean algebra Compare the.
Copyright © 2004 by Miguel A. Marin Revised McGILL UNIVERSITY DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING COURSE ECSE DIGITAL SYSTEMS.
2-1 Introduction Gate Logic: Two-Level Simplification Design Example: Two Bit Comparator Block Diagram and Truth Table A 4-Variable K-map for each of the.
ECE2030 Introduction to Computer Engineering Lecture 8: Quine-McCluskey Method Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 Topic 5: Quine-McCluskey Method José Nelson Amaral.
Boolean Algebra Introduction Logical arguments are valid (or not) by virtue of their form, not content Example All men are mortal(premise 1) Harry is a.
1 ECE2030 Introduction to Computer Engineering Lecture 8: Quine-McCluskey Method Prof. Hsien-Hsin Sean Lee School of ECE Georgia Institute of Technology.
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.
Chapter3: Gate-Level Minimization Part 1 Origionally By Reham S. Al-Majed Imam Muhammad Bin Saud University.
CS2100 Computer Organisation
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:
ECE 3110: Introduction to Digital Systems Chapter #4 Review.
Sum-of-Products (SOP)
Prof. Hsien-Hsin Sean Lee
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
1 Example: Groupings on 3-Variable K-Maps BC F(A,B,C) = A ’ B ’ A BC F(A,B,C) = B ’ A
Logic Simplification-Using K-Maps
Key Observation Adjacencies in the K-Map
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).
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
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.
©2010 Cengage Learning SLIDES FOR CHAPTER 6 QUINE-McCLUSKEY METHOD Click the mouse to move to the next page. Use the ESC key to exit this chapter. This.
CHAPTER 6 Quine-McCluskey Method
Computer Organisation
Lecture #6 EGR 277 – Digital Logic
QUINE-McCLUSKEY METHOD
CS 352 Introduction to Logic Design
Digital Logic and Design
Digital Logic & Design Dr. Waseem Ikram Lecture 12.
Digital Logic & Design Dr. Waseem Ikram Lecture 13.
COE 202: Digital Logic Design Combinational Logic Part 3
Minimization of Switching Functions
Overview Part 2 – Circuit Optimization
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
CHAPTER 6 QUINE-McCLUSKEY METHOD
Presentation transcript:

Technical Seminar II Implementation of Quine-McCluskey Minimization method Using ‘C’ code

Contents Introduction Brief explain of Quine-McCluskey Method. Algorithm Execution of algorithm Application Advantage Conclusion References

Introduction The Karnaugh map is a method to simplify Boolean algebra expressions. McCluskey method is functionally identical to Karnaugh mapping, but the tabular form makes it more efficient for use in computer algorithms This method involves two steps: Finding all prime implicants of the function. Use those prime implicants in a prime implicant chart to find the essential prime implicants of the function, as well as other prime implicants that are necessary to cover the function.

(Example) Bcd checker Actual given input bits are 4.

Features 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

Quine-McCluskey Minimization Terms are initially listed as 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 1,0,- form

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 index value Easy to tell when adjacency applies; indexes must differ by power of two (one bit) Implicants identified by term nos. separated by comma; differing bit pos. in () following terms

Notation Forms (cont.) 1,0,- form - terms are identified by their binary index 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 mixed during the minimization

Example of Different Notations F(A, B, C, D) =  m(4,5,6,8,10,13) Full variable Cellular 1,0,- 1 ABCD 4 0100 ABCD 8 1000 2 ABCD 5 0101 ABCD 6 0110 ABCD 10 1010 3 ABCD 13 1101

NOTE: Don’t Cares are included Implication Table (1,0,-) Quine-McCluskey Method Tabular method to systematically find all prime implicants ƒ(A,B,C,D) = Σ m(4,5,6,8,9, 10,13) + Σ d(0,7,15) Part 1: Find all prime implicants Step 1: Fill Column 1 with active-set and DC-set minterm indices. Group by number of true variables (# of 1’s). Implication Table Column I 0000 0100 1000 0101 0110 1001 1010 0111 1101 1111 NOTE: Don’t Cares are included in this step!

Minimization - First Pass (1,0,-) Quine-McCluskey Method Tabular method to systematically find all prime implicants ƒ(A,B,C,D) = Σ m(4,5,6,8,9,10,13) + Σ d(0,7,15) Part 1: Find all prime implicants Step 2: Apply Adjacency - Compare elements of group with N 1's against those with N+1 1's. One bit difference implies adjacent. Eliminate variable and place in next column. E.g., 0000 vs. 0100 yields 0-00 0000 vs. 1000 yields -000 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. Implication Table Column I 0000  0100  1000  0101  0110  1001  1010  0111  1101  1111  Column II 0-00 -000 010- 01-0 100- 10-0 01-1 -101 011- 1-01 -111 11-1

Minimization - Second Pass (1,0,-) Quine-McCluskey Method Step 2 cont.: Apply Adjacency - Compare elements of group with N 1's against those with N+1 1's. One bit difference implies adjacent. Eliminate variable and place in next column. E.g., 0000 vs. 0100 yields 0-00 0000 vs. 1000 yields -000 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. Implication Table Column I 0000  0100  1000  0101  0110  1001  1010  0111  1101  1111  Column II 0-00 * -000 * 010-  01-0  100- * 10-0 * 01-1  -101  011-  1-01 * -111  11-1  Column III 01-- * -1-1 *

Coverage Table Coverage Chart 0,4(0-00) 0,8(-000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4 X 5 6 8 9 10 13 Note: Don’t include DCs in coverage table; they don’t have covered by the final logic expression! rows = prime implicants columns = ON-set elements place an "X" if ON-set element is covered by the prime implicant

Coverage Table (cont.) Coverage Chart rows = prime implicants 0,4(0-00) 0,8(-000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4 X 5 6 8 9 10 13 0,4(0-00) 0,8(-000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4 X 5 6 8 9 10 13 rows = prime implicants columns = ON-set elements place an "X" if ON-set element is covered by the prime implicant If column has a single X, than the implicant associated with the row is essential. It must appear in minimum cover

Coverage Table (cont.) Eliminate all columns covered by 0,4(0-00) 0,8(-000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4 X 5 6 8 9 10 13 Eliminate all columns covered by essential primes

Coverage Table (cont.) Eliminate all columns covered by 0,4(0-00) 0,8(\000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4 X 5 6 8 9 10 13 0,4(0-00) 0,8(\000) 8,9(100-) 8,10(10-0) 9,13(1-01) 4,5,6,7(01--) 5,7,13,15(-1-1) 4 X 5 6 8 9 10 13 Eliminate all columns covered by essential primes Find minimum set of rows that cover the remaining columns

Algorithm Step 1: Gather all minterms & don't care terms (if there are any) and convert them to binary form, then sort them in groups and list them in a list. Step 2: Compare group 1 with group 2 & group 2 with group 3 & group 3 with group 4, the comparison is achieved by comparing each term in the first group with all terms in the next group. The comparison concept is that if two terms have only 1 different bit, then this bit must be replaced with (-). Step 3: After the comparison is done in (List 1), move to List 2 and do the same comparison, but we will find a new element, the dash (-) that we must handle it in the comparison. When we compare two dashed terms, the comparison is legal only if the dash position is the same in the two terms, otherwise we can't compare those terms like: (00- , 01-) ==> (0--), but (00- , 0-1) is illegal. If two terms compared successfully, a check character is put next to the compared terms (say the check chr is 't'), if not, I mean that the two terms have more different bits or the dash position is not the same in the two terms, then a check character must be put next to the uncompared terms (say check chr is '*') The terms with ‘*’ indicates prime implicants.

Algorithm(cont.) Step 4: Coverage table.( Essential prime implicants) we will put the minterms horizontally & the prime implicants vertically, then we should determine which terms a prime implicant cover like (10-0) covers 8,10. and put an indicator (say 'X') in the cells corresponding to the row of prime implicant and its terms. Step 5: Traversing the columns for single ‘X’ variable. If yes identify the PI. Step 6: Traverse the row of that PI and if any ‘X’ variable is found, Nullify the element ‘X’ in that rows. Step 7: Traversing the rows which contains more no’s of ‘X’. This row represents essential PI. Identify and nullify the particular column where the ‘X’ represents.

Application It is used as a logic synthesis(in CAD) tool to minimize the Boolean expression. It finally gives out a simple expression to design circuit. CAD: VERILOG VHDL

Advantages The Quine-McCluskey (Q-M) method is a computer-based technique for simplification and has mainly two advantages over the K-map method. Firstly, it is systematic for producing a minimal function. Secondly, it is good in handling a large number of variables.

Conclusion 1. By using this technique we can get the minimized SOP or POS forms.

References [1]. Digital Design Fundamentals, 2nd Ed [Kenneth J. Breeding] [2]. http://en.wikipedia.org/wiki/Quine%E2%80%93McCluskey algorithm [3]. http://en.wikipedia.org/wiki/Petrick%27s_Method [4]. Logic Design By D.A.Godse A.P.Godse [5]. V.P. Nelson e.a., Digital Circuit Analysis and Design, Prentice Hall, 1995, pag. 234