ECE-7: Digital Logic Design Winter 8 Notes - Unit OPTIMIZED IMPLEMENTATION OF LOGIC FUNCTIONS BASIC TECHNIQUES: We can alas minimie logic unctions using the Boolean theorems. Hoever, more poerul methods such as Karnaugh maps and Quine-McCluske algorithm eist: the provide a deterministic a to check that the minimal orm o a Boolean unction has been reached. KARNAUGH MAPS: variables: m m m m m m 3 m m 3 = ' + ' = m +m = ' + 3 variables: m m m m 3 m 4 m 5 m 6 m 7 m m m 6 m 4 m m 3 m 7 m 5 = '' + '' + = ' + ' = ' + ' Instructor: Daniel Llamocca
ECE-7: Digital Logic Design Winter 8 4 variables: m m m m 3 m 4 m 5 m 6 m 7 m 8 m 9 m m m m 3 m 4 m 5 m m 4 m m 5 m 3 m 7 m m 6 m m 3 m 8 m 9 m 5 m m 4 m = ''' + ' + '' = '' + = ' + ' Don t care outputs X X X = ' This method appears in: The Map Method or Snthesis o Combinational Logic Circuits, Maurice Karnaugh, Transactions o the AIEE, Part I: Communication and Electronics, vol. 7, no. 5, Nov. 953, pp. 593-599. Karnaugh maps o 5, 6, 7, 8, and 9 are hinted at. Beond 9 variables, the mental gmnastics or minimiation become ormidable. The Quine-McCluske algorithm provides a simpler approach hen dealing ith a relativel large number o variables. = ' Instructor: Daniel Llamocca
ECE-7: Digital Logic Design Winter 8 QUINE-MCCLUSKEY ALGORITHM This method appears in: Minimiation o Boolean Functions, E. J. McCluske, Jr., The Bell Sstem Technical Journal, vol. 35, no. 6, Nov. 956, pp. 47-444. Literal: For an n variable unction F, it is a variable epressed as X or X. Implicant: For an n variable unction, it is an product term that can appear in an possible sum o products (canonical or non-canonical) that represents the unction. I P is an implicant, then P = implies that the unction is. Thus, ever minterm is an implicant. A graphical a to see the o a unction is to take a look at the Karnaugh map (or a relativel lo number o variables). All the possible terms e can get out o the K-map are. implicant: It is an implicant P such that the removal o an literal rom P results in non-implicant o the unction. OUTLINE. Get the unction to be minimied represented as a canonical Sum o Products: Use the minterm epansion orm. F(A, B, C, D) = m(,,,5,6,7,8,9,,4). Get the Implicants o the unction: This is done b sstematicall appling XY + XY = X to all possible minterms and resulting non-canonical product terms. So, e build the Implicants Table b determining all Implicants: We represent the minterms using the binar notation. For eample: m = A B C D =. Then, e group the minterms b the number o ones the contain. For an n variable unction, the minterms have n literals. We appl XY + XY = X to all possible pairs o minterms. This applies to pair o minterms that onl var b one literal. We attach a to ever minterm that as emploed. m, = m + m = A B C D + A B C D = A B C Note the table representation: m, = m + m = + =. The smbol " " indicates that a literal as simpliied. The resulting column consists o terms ith n literals. We keep appling XY + XY = X to all possible pair o resulting product terms. We attach a to ever term that as emploed. For each column e add, an etra literal is simpliied (or a smbol " " is added to the terms). m,,8,9 = m, + m 8.9 = A B C + AB C = B C + = I e happen to get a repeated term, e eliminate one: m,,8,9 = m,8,,9 =, m,8,,9 is eliminated When e cannot simpli an urther, e stop and look or the terms that do not have a check. These terms are called the Implicants. All the terms that appear in the table are the Implicants. Number o ones 4-literal m = 3 4 m = m = m 8 = m 5 = m 6 = m 9 = m = m 7 = m 4= 3-literal m, = - m, = - m,8 = - m,5 = - m,9 = - m,6 = - m 8,9 = - m 8, = - m, = - m 5,7 = - m 6,7 = - m 6,4 = - m,4 = - -literal m,,8,9 = -- m,,8, = -- m,8,,9 = -- m,6,,4 = -- m,,6,4 = -- -literal an urther, so e stop here F(A, B, C, D) = A C D + A BD + A BC + B C + B D + CD 3. Select a minimum set o Implicants: F is the sum o this set that contains the minimum number o literals. Build the Implicant Chart. Mark the minterms that cover each single Implicant ith an X. Get the Essential Implicants: Look or minterms that are covered b (are part o) a single Implicant: this is, look or columns ith one X. The corresponding Implicants are the Essential Implicants. The minimied F includes the Essential Implicants. Thus, e must eliminate the minterms that are part o an Essential Implicant out o the other Implicants: cross out the ros o the Essential Implicants and the columns o the covered minterms. In the eample, the Essential Implicants are: B C, CD For the remaining X s: select enough Implicants to cover all the minterms o the unction. This is a trial and error procedure: start b selecting the Implicant that crosses out (ros and columns) most o the Xs, and so on. 3 Instructor: Daniel Llamocca
ECE-7: Digital Logic Design Winter 8 Implicants 5 6 7 8 9 4 m,,8,9 B C X X X X m,,8, B D X X X X m,6,,4 CD X X X X m,5 A C D X X m 5,7 A BD X X m 6,7 A BC X X F(A, B, C, D) = B C + CD + A BD EXAMPLE: F(A, B, C, D) = m(4,8,,,,5) + d(9,4). Function ith don t care terms. Implicants Table: To help simpliing the unction, the don t care terms are included as minterms here. I a don t care term ends up being a Implicant, e delete it (otherise e are not taking advantage o the don t care terms). Number o ones 4-literal m 4 = m 8 = m 9 = m = m = m 3 = m 4= 4 m 5= 3-literal m 4, = - m 8,9 = - m 8, = - m 8, = - m 9, = - m, = - m,4 = - m,4 = - m,5 = - m 4,5 = - -literal m 8,9,, = -- m 8,,9, = -- m 8,,,4 = -- m 8,,,4 = -- m,,4,5 = -- m,4,,5 = -- -literal an urther, so e stop here F(A, B, C, D) = BC D + AB + AD + AC Implicant Chart: The don t care terms are NOT included here. Onl the minterms are included here, since e are tring to have as e X s as possible. Implicants 4 8 5 m 4, BC D X X m 8,9,, AB X X X m 8,,,4 AD X X X m,,4,5 AC X X X More than one minimal solution eist, depending on the X (in the same pink column) that e use: F(A, B, C, D) = BC D + AC + AB Or: F(A, B, C, D) = BC D + AC + AD EXAMPLE: F(A, B, C) = m(,,,5,6,7) Implicants Table: Number 3-literal o ones m = m = m = m 5 = m 6 = 3 m 7 = -literal m, = - m, = - m,5 = - m,6 = - m 5,7 = - m 6,7 = - -literal an urther, so e stop here F(A, B, C) = A B + A C + B C + BC + AC + AB 4 Instructor: Daniel Llamocca
ECE-7: Digital Logic Design Winter 8 Implicant Chart: Implicants 5 6 7 m, A B X X m, A C X X m,5 B C X X m,6 BC X X m 5,7 AC X X m 6,7 AB X X No essential prime. So, e can onl select the minimum number o Implicants (i.e., crossing out ros and columns) that covers all the minterms. The eample above shos a group o Implicants hose number o elements is the minimum (3). For this particular group, there is onl one minimal solution (recall that there can be more than one minimal solution or the same group o Implicants): F(A, B, C) = A B + BC + AC There can be more than one group o Implicants hose number o elements is the minimum (3 in this eample), as e can pick an X in a column to mark our Implicants. The eample belo shos the onl other possible minimum group o Implicants: Implicants 5 6 7 m, A B X X m, A C X X m,5 B C X X m,6 BC X X m 5,7 AC X X m 6,7 AB X X For this particular group o Implicants, there is onl one minimal solution: F(A, B, C) = A C + B C + AB EXAMPLE: F(A, B, C, D) = m(,,3,5,6,7,8,9) + d(,,,3,4,5). There are too man minterms. This ill make the process cumbersome. Instead, it might be better to optimie: F (A, B, C, D) = m(,4) + d(,,,3,4,5) Once e get the optimied orm o F, e complement it in order to get F. Implicants Table (F ) : Number o ones 4-literal m = m 4 = m = m = m = 3 m 3= m 4= 4 m 5= 3-literal m 4, = - m, = - m,4 = - m,3 = - m,4 = - m,5 = - m 3,5 = - m 4,5 = - -literal m,,4,5 = -- m,4,,5 = -- m,3,4,5 = -- m,4,3,5 = -- -literal an urther, so e stop here F (A, B, C, D) = A B C D + BC D + AC + AB 5 Instructor: Daniel Llamocca
ECE-7: Digital Logic Design Winter 8 Implicant Chart (F ): The don t care terms are NOT included. Implicants 4 m A B C D X m 4, BC D X m,,4,5 m,3,4,5 AC AB F (A, B, C, D) = A B C D + BC D F(A, B, C, D) = (A + B + C + D )(B + C + D) Note that i e appl Quine-McCluske to F, e might not get eactl the same Boolean unction F(A, B, C, D) = (A + B + C + D )(B + C + D). This is because the don t care terms are assigned and dierentl or F and F. Note that the truth table ill be the same; the don t care terms ill not be necessaril assigned the same values in each case though. ISSUES: To determine a minimal solution (i.e. solution ith the same number o literals), e need to eicientl cross out ros and columns. We can do this b trial and error, but it can become a cumbersome procedure as the number o variables increase. And as illustrated in the eamples, there can be more than one a to eicientl cross out ros and columns. There can also be more than one minimal solution (even i there is onl one a to eicientl cross out ros and columns) resulting rom this method. We can determine all possible minimal solutions b inspection, but this can become cumbersome as the number o variables increase. A sstematic a to determine all possible minimum solutions is provided b Petrick s method: given a prime implicant chart, e can determine all minimum sum-o-products solutions. This is out o the scope o this course. 6 Instructor: Daniel Llamocca