Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean Logic.

Slides:



Advertisements
Similar presentations
Minimization of Circuits
Advertisements

Prof. Sin-Min Lee Department of Computer Science
I NTRODUCTION TO THE K ARNAUGH M AP 1 Alan Clements.
K-Map Simplification COE 202 Digital Logic Design Dr. Aiman El-Maleh
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
CSE-221 Digital Logic Design (DLD)
Karnaugh Maps for Simplification

EET 1131 Unit 5 Boolean Algebra and Reduction Techniques
Computer Engineering (Logic Circuits) (Karnaugh Map)
Logic gate level Part 3: minimizing circuits. Improving circuit efficiency Efficiency of combinatorial circuit depends on number & arrangement of its.
IKI a-Simplification of Boolean Functions Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture.
PHY 201 (Blum)1 Karnaugh Maps References: Chapters 4 and 5 in Digital Principles (Tokheim) Chapter 3 in Introduction to Digital Systems (Palmer and Perlman)
Digital Logic Chapter 4 Presented by Prof Tim Johnson
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.
1 Simplification of Boolean Functions:  An implementation of a Boolean Function requires the use of logic gates.  A smaller number of gates, with each.
Department of Computer Engineering
1 Digital Logic Design Week 5 Simplifying logic expressions.
Karnaugh Maps References:
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7.1 – 7.2 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Digital Systems: Combinational Logic Circuits Wen-Hung Liao, Ph.D.
Chapter 5 Boolean Algebra and Reduction Techniques 1.
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.
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
CS1Q Computer Systems Lecture 7
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.
Karnaugh Mapping Digital Electronics. Karnaugh Mapping or K-Mapping This presentation will demonstrate how to Create and label two, three, & four variable.
Sum-of-Products (SOP)
Chapter 3 Special Section Focus on Karnaugh Maps.
Karnaugh Map and Circuit Design.
June 12, 2002© Howard Huang1 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are.
Karnaugh Maps (K-Map) A K-Map is a graphical representation of a logic function’s truth table.
C.S.Choy39 TERMINOLOGY Minterm –product term containing all input variables of a function in either true or complementary form Maxterm – sum term containing.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Binary Numbers For digital systems, the.
Logic Simplification-Using K-Maps
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
Lecture # 5 University of Tehran
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
Lecture 21: Combinatorial Circuits II Discrete Mathematical Structures: Theory and Applications.
Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean Logic.
©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.
CS231 Boolean Algebra1 Circuit analysis summary After finding the circuit inputs and outputs, you can come up with either an expression or a truth table.
©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.
CHAPTER 3 Simplification of Boolean Functions
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
University of Maryland Baltimore County Department of Computer Science and Electrical Engineering   CMPE 212 Laboratory (Discussion 6) Hasib Hasan
CS 352 Introduction to Logic Design
Dr. Clincy Professor of CS
Circuit analysis summary
Karnaugh Map Method.
Lecture 3 Gunjeet Kaur Dronacharya Group of Institutions
Karnaugh Maps References:
Karnaugh Maps References: Lecture 4 from last semester
Karnaugh Mapping Karnaugh Mapping Digital Electronics
Karnaugh Maps Topics covered in this presentation: Karnaugh Maps
Karnaugh Mapping Digital Electronics
Karnaugh Mapping Karnaugh Mapping Digital Electronics
Karnaugh Mapping Digital Electronics
CS Chapter 3 (3A and ) – Part 3 of 5
Chapter 3 Special Section
Karnaugh maps Last time we saw applications of Boolean logic to circuit design. The basic Boolean operations are AND, OR and NOT. These operations can.
Presentation transcript:

Boolean Algebra and Computer Logic Mathematical Structures for Computer Science Chapter 7 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Boolean Logic and Computer Logic

Section 7.3Minimization1 To design a logic network for the function, the ideal would be to have a procedure that chooses the simplest Boolean expression from the equivalence class. At any rate, it would be ideal to minimize the total number of connections that must be made and the total number of logic elements used. To discuss minimization procedures, many factors may influence the economics of the situation. If a network is to be built only once, the time spent on minimization is costlier than building the network. But if the network is to be mass-produced, then the cost of minimization time may be worthwhile.

Section 7.3Minimization2 Karnaugh Map In the canonical sum-of-products form for a truth function, we are interested in values of the input variables that produce outputs of 1. The Karnaugh map records the 1s of the function in an array that forces products of inputs differing by only one factor to be adjacent. The array form for a two-variable function is given in the figure below. Notice that the square corresponding to x 1 x 2, the upper left-hand square, is adjacent to squares x 1 x 2 and x 1 x 2, which differ in one factor from x 1 x 2. However, it is not adjacent to the x 1 x 2 square, which differs in two factors from x 1 x 2.

Section 7.3Minimization3 Example: Karnaugh Map The truth function of Table 7.10 as seen here is represented by the Karnaugh map of the figure below. At once we can observe 1s in two adjacent squares, so there are two terms in the canonical sum-of-products form differing by one variable; again from the map, we see that the variable that changes is x 1. It can be eliminated. We conclude that the function can be represented by x 2. Indeed, the canonical sum-of-products form for the function is x 1 x 2 + x 1 x 2, which, by our basic reduction rule, reduces to x 2. However, we did not have to write the canonical form  we only had to look at the map.

Section 7.3Minimization4 Karnaugh Maps Maps for three and four variables. The array forms for functions of three and four variables are shown in the figure below. In these arrays, adjacent squares also differ by only one variable. However, in Figure (a), the leftmost and rightmost squares in a row also differ by one variable, so we consider them adjacent. (They would in fact be adjacent if one wrapped the map around a cylinder and glued the left and right edges together.)

Section 7.3Minimization5 Karnaugh Maps In Figure (b), the leftmost and rightmost squares in a row are adjacent (differ by exactly one variable), and also the top and bottom squares in a column are adjacent. In three-variable maps, when two adjacent squares are marked with 1, one variable can be eliminated; when four adjacent squares are marked with 1 (either in a single row or arranged in a square), two variables can be eliminated.

Section 7.3Minimization6 Karnaugh Maps In the map in the figure below, the squares that combine for a reduction are shown as a block. These four adjacent squares reduce to x 3 (eliminate the changing variables x 1 and x 2 ). The reduction uses our basic reduction rule more than once: x 1 x 2 x 3 + x 1 x 2 x 3 + x 1 x 2 x 3 + x 1 x 2 x 3 = x 1 x 3 (x 2 + x 2 ) + x 1 x 3 (x 2 + x 2 ) = x 1 x 3 + x 1 x 3 = x 3 (x 1 + x 1 ) = x 3

Section 7.3Minimization7 Karnaugh Maps In four-variable maps, when two adjacent squares are marked with 1, one variable can be eliminated; when four adjacent squares are marked with 1, two variables can be eliminated; when eight adjacent squares are marked with 1, three variables can be eliminated. Figure (a) illustrates some instances of two adjacent marked squares.

Section 7.3Minimization8 Karnaugh Maps Figure (b) illustrates some instances of four adjacent marked squares, and Figure (c) shows instances of eight. (b) (c)

Section 7.3Minimization9 Using the Karnaugh Map How do we find a minimal sum-of-products form from a Karnaugh map (or from a truth function or a canonical sum-of-products form)? We must use every marked square of the map, and we want to include every marked square in the largest combination of marked squares possible since doing so will reduce the expression as much as possible. However, we cannot begin by simply looking for the largest blocks of marked squares on the map.

Section 7.3Minimization10 Using Karnaugh Maps Steps for using Karnaugh Maps are listed in the table as seen here:

Section 7.3Minimization11 Example: Using Karnaugh Maps Figure (a) shows the only square that cannot be combined into a larger block. In Figure (b), shows the unique two-square block for the x 1 x 2 x 3 square and the unique two-square block for the x 1 x 2 x 3 square. All marked squares are covered. The minimal sum-of-products expression is: x 1 x 2 x 3 + x 2 x 3 + x 1 x 2 Formally, the last two terms are obtained by expanding x 1 x 2 x 3 into x 1 x 2 x 3 + x 1 x 2 x 3 and then combining it with each of its neighbors.

Section 7.3Minimization12 Example: Using Karnaugh Maps Figure (a) shows the unique two-square and four-square blocks. The remaining two unused marked squares can be assigned to two-square blocks in two different ways, as shown in Figures (b) and (c). Assigning them together to a single two-square block is more efficient since it produces a sum-of-products form with three terms rather than four. The minimal sum-of-products expression is : x 1 x 3 + x 1 x 2 x 3 + x 2 x 3 x 4

Section 7.3Minimization13 Example: Using Karnaugh Maps Map of Figure (a) shows two unique four-square blocks determined by the squares with * have been chosen. In Figure (b), the remaining unmarked squares, for which there was a choice of blocks, are combined into blocks as efficiently as possible. The resulting sum-of-products form is: x 1 x 3 + x 1 x 3 + x 3 x 4 + x 1 x 2 + x 1 x 2 x 4 Yet in Figure (c), choosing a different four-square block at the top leads to a simpler sum-of-products form: x 2 x 3 + x 1 x 3 + x 3 x 4 + x 1 x 2 x 4

Section 7.3Minimization14 Quine-McCluskey Procedure A second method of reduction, the Quine-McCluskey procedure, organizes information from the canonical sum-of-products form into a table to simplify the search for terms differing by only one factor. The procedure is a two-step process paralleling the use of the Karnaugh map: First, find the groupings of terms (just as we looped together marked squares in the Karnaugh map). Then, eliminate redundant groupings and make choices for terms that can belong to several groups.

Section 7.3Minimization15 Example: Quine-McCluskey Procedure The truth function is shown in Table The eight 4-tuples of 0s and 1s producing a function value of 1 are listed in Table 7.14, which is separated into four groupings according to the number of 1s. Note that terms of the canonical sum-of-products form differing by only one factor must be in adjacent groupings, which simplifies the search for such terms.

Section 7.3Minimization16 Example: Quine-McCluskey Procedure We compare the first term, 1011, with each of the three terms of the second group, 0110, 0101, and 0011, to locate terms differing by only one factor. Such a term is The combination 1011 and 0011 reduces to  011 when the changing variable x 1 is eliminated. We shall write this reduced term with a dash in the x 1 position in the first row of a new table as seen in Table 7.15(b) on the next slide.

Section 7.3Minimization17 Example: Quine-McCluskey Procedure The original Table 7.14 from the previous slide is rewritten as Table 7.15(a), but we have also marked the two terms 1011 and 0011 in this table with a superscript 1. This superscript 1 is a pointer that indicates the row number of the reduced term in Table 7.15(b) that is formed from these two terms (numbering terms corresponds to putting loops in the Karnaugh map). Continuing this process with all the terms in Table 7.15(a) results in the completed Table 7.15(b), where the terms in this table are again grouped by the number of 1s. A numbered term may still be used in other combinations, just as a marked square in a Karnaugh map can be in more than one loop.

Section 7.3Minimization18 Example: Quine-McCluskey Procedure Another table is built by processing the terms in Table 7.15(b), where not only the groupings but also the dashes help organize the search process, since terms differing by only one variable must have dashes in the same location. Tables 7.16(a) and 7.16(b) are the same as Tables 7.15(a); 7.15(b), and Table 7.16(c) is the new table. Again, numbers on terms in Table 7.16(b) that combine serve as pointers to the reduced terms in Table 7.16(c). Once all terms have been processed in Table 7.16(b), the reduction process cannot be continued. The unnumbered terms are irreducible, so they represent the possible maximum-sized loops on a Karnaugh map.

Section 7.3Minimization19 Example: Quine-McCluskey Procedure The second step of the process compares the original terms with the irreducible terms. Form a table with the original terms as column headers and the irreducible terms (the unnumbered terms in the reduction tables just constructed) as row labels. A check in the comparison table (Table 7.17) indicates that the original term in that column eventually leads to the irreducible term in that row, which can be determined by following the pointers. If a column in the comparison table has a check in only one row, the irreducible term for that row is the only one covering the original term, so it is an essential term and must appear in the final sum-of-products form. Thus, we see from Table 7.17 that the terms  011, 0  10, 0  01, and  000 are essential and must be in the final expression.

Section 7.3Minimization20 Example: Quine-McCluskey Procedure Note that all columns with a check in row 5 also have checks in another row and so are covered by an essential reduced term already in the expression. Thus, 00  is redundant. In situations where there is more than one minimal sum-of- products form, the comparison table will have nonessential, nonredundant reduced terms. A selection must be made from these reduced terms to cover all columns not covered by essential terms.