0% found this document useful (0 votes)
27 views

Ch3-Gate Level Minimization

Gate Level Minimization

Uploaded by

Ahmed Mohamed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
27 views

Ch3-Gate Level Minimization

Gate Level Minimization

Uploaded by

Ahmed Mohamed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 38
Imam Abdulrahman Bin Faisal — 7 College of Computer Science & IT Department of Computer Engineering CS 314: Digital Hardware Chapter#3: Gate-Level Minimization Sninecrchaters + 3.2 The Map Method + 3.3 For-Variable K-Map + 3.4 Product-of-Sum Simplification + 3.5 Don’t-care Conditions + 3.6 NAND and NOR Implementation + 3.8 Exclusive-OR Function 2 The Ma etho: The Boolean functions can also be simplified by map method known as Karnaugh map or K-map. The map is made up of squares, with each square representing one minterm of the function. This produces a circuit diagram with a minimum number of gates and the minimum number of inputs to the gate. It_is sometimes possible to find two or more expressions that satisfy the minimization criteria. ak 46 ale Go _ *@ xg \ ¥ wd p4l4 17) oo 3) Saeoemralenap + Two-variable has four minterms, and consists of four squares. + Mo+ m1 + M2 + M3 = xy’ + x’y + xy’ + xy (a) (b) Fig. 3-1 Two-variable Map y y y yoo ee y —— = 9 t NO 0 mo | om of xy | oxy 0 1 m, | om3 zh) oe | 1 1 1 1 (a) xy (b) x+y Fig. 3-2 Representation of Functions in the Map — EE 7 Three-Variable map + Note that the minierms are not arranged in a_ binary sequence, but similar to the Gray code. + For simplifying Boolean functions, we must recognize the basic property possessed by adjacent squares. + M5tm7= xy’z + xyz = xz(y’ + y) = xz cancel (a) (be) Fig.3-3 Threc-variable Map 5. FIGURE 3.4 Map for Example 3.1, F(x, y, 2) = 3(2, 3, 4, 5) = x’y + xy’ + Example 3.2: Simplify F(x, y, z) = (3, 4, 6; 7) xyz! Note: xy'z' + xyz’ = xz" FIGURE 3.5 Map for Example 3.2, F (x, y, z) = %(3, 4, 6, 7) = yz + xz’ adjacent squares + A larger number of adjacent squares are combined, we obtain a product term with fewer literals. o_1 square = 1 minterm = three literals. o 2 adjacent squares = 1 term = two literals. o 4 adjacent squares = 1 term = one literal. o 8 adjacent squares encompass the entire map and_produce_a function that is always equal to 1. + It is obviously to know the number of adjacent squares is combined in a power of two such as 1,2,4, and 8. Penis 3 Ex. 3-3 F(x, y, Zz) = >(0, 2, 4, 5, 6 F=z+xy’ yz a x 00 01° 10 o| 1| fa Alara] |b Zz FIGURE 3.6 Map for Example 3.3, F (x, y, z) = =(0, 2, 4, 5, 6) = z’ + xy’ Example 3.4 > EX A = AB'C + BC a) Express it in sum of minterms. b) Find the minimal sum of products expression. Answer: F(A, B, C) (1, 2, 3, 5, 7) Figure 3.7 Map for Example 3.4, A'C + A'B + AB'C + BC =C+A'B isquare = mint =Hiterak + 2 adjacent squares = 1 term = 3 literals + 4 adjacent squares = 1 term = 2 literals + 8 adjacent squares = 1 term = 1 literal + 16 adjacent squares = 1 yz y w\00 01 11 10 mo | om m3 | my 00 Jw'x'y’z'Pa'x'y'z | w'x'yz Pw'x'yz" ms | ms | m7 | mo OL Jaw'xy'z'| w'xy’z | w'xyz | w'xye? my | m3 | mys | myg 11 | wxy'z’ | wexy'z | owxyz | wexye! w ms my | my | mio 10 | wx'y'z!| wa'y’z | wex'yz | aex'yz” z (a) Fig. 3-8 Four-variable Map (b) Feay'twz'+xz' Figure 3.9 Map for Example 3-5; F(w, x y¥, 9 = (0, 1, 2, 4, 5, 6, 8, 9, 12, 13, 14) = y' + w'z' +xz’ 413 a | Example 3.6 : xP a \4’B'C'D! A 00 OL i 10 mm oO 1 L 1 A'B'CD' ol ITT ACD" Note: A’ BIC D! + AB" fag fens Pon Pe B bi 1 AB'CD' AB'C'D' D ABYC’ Figure 3.10 Map for Example 3-6; ABC FOR ABODE 45@ sia sea4@pr) 14 wx on 10 Je 00 ol i 10 wx on 10 Je 00 ol i 10 Essential Prime implicant (1) all the minterms of the function are covered when we combine the squares, (2) the number of terms in the expression is minimized, and (3) there are no redundant terms (i.e., minterms already covered by other terms). Sometimes there may be two or more expressions that satisfy the simplification criteria. The procedure for combining squares in the map may be made more systematic if we understand the meaning of two special types of terms. A prime implicant is a product term obtained by combining the maximum possible number of adjacent squares in the map. If a minterm in a square is covered by only one prime implicant, that prime implicant is said to be essential. "Essential Prime implicant ¢ three _minterms_can be covered with prime implicants. Minterm ms can be covered with either prime implicant CD or prime implicant B’C. Minterm mo can be covered with either AD or AB’. Minterm mii is covered with any one of the four prime implicants. The simplified expression is obtained from the logical sum of the two essential prime implicants and any two prime implicants that cover minterms m3, mo, and mi. There are four possible ways that the function can be expressed with four product terms of two literals each: Essential Prime implicant a7 Ss! eim Essential prime implicant is a prime implicant that cover an output of the function that no combination of other prime implicants can cover. Let's observe these two pictures bellow. The first picture represents all prime implicants while the second picture represents only essential prime implicants: cD c 3-4 Product of Sums(POS) Srnpinention + The procedure for obtaining a minimized function in product-of-sums (POS) form follows the basic properties of Boolean functions. + If we mark the empty squares by 0’s rather than 1’s and combine them into valid adjacent squares, we obtain the complement of the function, F’. + Aftrer that use the DeMorgan’s theorem to get the product of sums. Ex.3-7 Simplit B f (a) sum of products (b) product of sums F(A, B, C, D) = X(0, 1, 2, 5, 8, 9, 10) (a) SOPs Fe pp +BC +A'CD (b) POSs F’= AB+CD + BD’ By DeMorgan’s theorem F= (A’+B’ .(C’+D’ .(B’+D) ~) ) D FIGURE 3.12 Map for Example 3.7, F(A, B,C, D) = 3(0,1, 2, 5, 8, 9,10) = B'D' + B'C’ + A'C'D = (A’ + BCC! + D')(B' + D) (@)F=BD'+ BC +ACD (b) P= (A’ + B')(C’ + D)(B’ + D) FIGURE 3.13 \ Gate implementations of the function of Example 3 “ob a x get ess pee ah “> et vd A c ae ow eso’ ws 2 oe “ hee x 21 ~~ Exchange minterm and maxterm + Consider the truth table thatdefines sae the function F in Table 3-1. Truth Table of Function F x Y z F Sum of minterms —_ 0 0 0 0 F(x, y, z) = >(1, 3, 4, 6) 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 1 ° r 1 1 1 0 Product of maxterms F(x, y, 2) = [](0, 2, 5, 7) :_In the other words, the 1's of the x 00 01° 11 10 function _represent_the minterms, and the 0's represent the maxterms 9 ' ' ° - xfi} 1 foo | o fa Map for the Function of Table 3-1 22 Consi a ” = Combine maxterms: ye 2 For the sum of products, we combine the 1’s to obtain x oo OL ul 10 en a =, , ol o 7 1 exe FP=x'z+xz sa For the product of sums, we combine the 0’s to obtain xed 1 0 0 1 Fl =xz + x'z' z By DeMorgan’s theorem we Complement of F’ = (XZ +X’Z’)’ FIGURE 3.14 Map for the function of Table3.1 (XZ) (X'Z’Y’ (X°+Z’). (X+Z) + Truth Table + Minterm Z(A,B,C,) = ¥(1,3,6,7) + d(2) * Maxterm Z(A,B,C) = [](0,4,5) + d(2) Notice: Don’t cares are same for both minterm and maxterm. * K-map * Gate Implementation 00 or 1110 A KA awe of? (TP | c b (D pp Zaacr ‘Loe [Uy Bo Z=B+A’C don’t-care conditions d(w, x, y, Z) = >(0, 2, 5) ye y ye y oo 01 ~1 10 we 00 01 10 oof x Joa fal] x) of x foi ffi] x of o | x fa fo af o | x fia | o x x ufo | o Joa | o ufo f o Joa ]o wf] o | o | a] o wl o | o | a |] o (a) F = yz + w'x’ (a) P= yz + w'z In part (a) with minterms 0 and 2 2} F=yz+w’x’ In part (b) with minterm5 (] F=yz+w’z "3-6 NAND and NOR implementation — AR AB + ANAND gate is said to be a universal gate because any logic circuit can be implemented with it. + The NAND gate can be used to express the basic gates, TC — ld E_ Ae Inverter x Por RO & — A ae cS & ap 5 7 AND > xy _ x C psd) HWY gales ent pow rary oo SY or b yt Rah? y ss a y _ ey) ay HO FIGURE 3.16 Logic operations with NAND Gate” 25" 26 Two aan eres for NAND gate +_In part (b), we can place a bubble (NOT) in each input and apply the DeMorgan’s theorem, then get a Boolean function in NAND type. - 5 oy ig BTS pod ipieneniBen 4 cue FO) GEE ‘>= a a 6 8 tc y (xyz)! y vityl +z! = (xyz) (a) AND-invert (b) Invert-OR k = A pase 3.17 % Two graphic symbols for a three-input Ane ina apt why oO ecb) inperwet ye 6 A pe SED AE 6 ST pement MOR apt erry, 5 . Double complementation, ‘so can be removed FIGURE 3.18 Three ways to implement F = AB+ CD Multilevel NAND ames + To convert a multilevel AND-OR diagram into an all-NAND diagram using mixed notation is as follows: 1. Convert all AND gates to NAND gates with AND-invert graphic symbols. 2. Convert all OR gates to NAND gates with invert-OR graphic symbols. 3.__Check all the bubbles in the diagram. For every bubble that is not compensated by another small circle along the same line, insert an inverter or complement the input literal c ) )\— ,>___t —}> B A ee c (a) AND-OR gates > > p——| B A B c. (b) NAND gates FIGURE 3.20 Implementing F = A(CD + B) + BC’ ~—NORimplementation -—>—Fhe NOR gate is another universal gate-used to implement— any Boolean function. + The NOR operation is the dual of the NAND operation, all procedures and rules for NOR logic are the dual of NAND logic. CD v Inverter x or? >> xty y AND —_)>— Wwtyy aay y >| FIGURE 3.22 Logic operations with NOR gates at -——tn- part {b), we-can-place-a bubble (NOT) in each input-and— apply the DeMorgan’s theorem, then get_a Boolean function in NOR type. x x y @tytzy 4 )——-x'y's) = (ety $2)! z z (a) OR-invert (b) Invert-AND Ax or FIGURE 3.23 > Two graphic symbols for the NOR gate b= \ An ACL 0 <--> ~ 28 2 A 23) ~ as Consider the Boolean Function F = (AB’ + A'BY\(C + D’) + To compensate for the bubbles in four inputs, it is necessary to complement the corresponding input literals. 7 >.) Fig. 3-27 Implementing F = (AB' + A'B)(C + D') with NOR Gates 3-8. Exclusive-OR function + The XOR symbol denote as ©, the Boolean operation: xX @y=xy +xy + The X-NOR symbol! denote as ©, the Boolean operation: xOy=(x@y) =xytxy + The identities of the XOR operation: x@0=x x@1 =x’ x@®x=0 xex=1 x@y =x @y=(x@y) + Commutative and associative: A@B=BoA (A®B)®C=A0(B@C)=AOBOC x? + yy’ )x +(x? ty y= xy’ + x’y=x@ — Db 7 Y (a) Exclusive-OR with AND-OR-NOT gates [8 i (b) Exclusive-OR with NAND gates FIGURE 3.30 Exclusive-OR implementations 35 sti. unction The exclusive-OR operation with three or more variables can be converted into_an ordinary Boolean function by replacing the ® symbol with its equivalent Boolean expression. Boolean expression of three-variable of the XOR: A@BoC =(AB’ +A’B)C’ + (AB+A’B’)C = AB’C’ + A’BC’ + ABC + A’B’C = (1, 2, 4, 7 * The Boolean expression clearly indicates that the three-variable exclusive-OR function is equal to 1 if only one variable is equal to 1 or if all three variables are equal to 1. * Contrary to the two-variable case, in which only one variable must be equal to 1. + In the case of three or more variables the requirement is that an odd number of variables be equal to 1. + As a consequence, the multiple-variable exclusive-OR operation is defined as an odd function. 38 + An odd function defined as the logical sum of the 2"/2 minterms whose binary numerical values have an odd number of 1’s. + The definition of an odd function can be clarified by plotting it in a map. Figure 3.31 (a) shows the map for the three-variable exclusive-OR function. * The complement of an odd function is an even function. As shown in Fig. 3.31 (b), the three-variable even function is equal to 1 when an even number of its variables is equal to 1 (including the condition that none of the variables is equal to 1). BC 8 BC B 4\ oo to A wo a no mm re [mm 0 1 1 of a 1 mls (“Ye {= p= pe pre Avi} 1 1 ay 1 1 c c (a) Odd function F= A BEC (b) Fven function F= (A@B®C) FIGURE 3.31 Map for a three-variable exclusive-OR function Dap: FIGURE 3.32 Logic diagram of odd and even functions

You might also like