85 Chptr 6 Exri 6. From Exri 5., w know tht th ingl-rror ttor for 2-out-of-5 o (; ; ; ; ) i implmnt y th xprion: E(; ; ; ; ) = + + + + + + + + + + + + + Uing only gt from Tl 4. of th txtook w n gnrt ll prout trm ut th OR oprtion of ll 4 prout trm mut implmnt y tr of gt. To minimiz th ly in th implmnttion, w houl u NAND gt. Th gnrtion of th prout trm i on uing 3 n 4-input NAND gt from Tl 4.. A 4-input NAND howvr i not vill n houl otin omining mllr gt. Th lrg NAND gt my ompo into mllr on follow (for 4-input NAND to 2-input NAND): Th poiiliti r: Ntwork () =() +() t plh Dly A - Firt Lvl: NAND-6, NAND-8, Son Lvl: OR-2.4+.37L.64+.9L B - Firt Lvl: NAND-4, 2 NAND-5, Son Lvl: OR-3.37+.38L.7+.22L C - Firt Lvl: 2 NAND-3, 2 NAND-4, Son Lvl: OR-4.27+.38L.62+.25L Evn though th LH trnition ly ofntwork C i l thn th on for ntwork A, th HL trnition ly of ntwork C om wor whn th output lo i grtr or qul to 3. For thi ron w onir ntwork A th implmnttion of th 4-input NAND, in it i going to l uptil to output lo vlu. Th rulting iruit i prnt in Figur 6., on pg 86. Th ly of th ntwork i otin from th ritil pth NAND-4! NAND-6! OR-2 or NAND-3! NAND-8! OR-2: t phl T plh (nt) = mx(t phl (NAND-4) + t plh (NAND-6) + t plh (OR-2); t phl (NAND-3) + t plh (NAND-8) + t plh (OR-2)) = mx(:2 + :5 + :24 + :37 + :2 + :37 L; :9 + :39 + :24 + :38 + :2 + :39L) = mx(:57 + :37L; :53 + :37L) = :57 + :37L T phl (nt) = mx(t plh (NAND-4) + t phl (NAND-6) + t phl (OR-2); t plh (NAND-3) + t phl (NAND-8) + t phl (OR-2)) = mx(: + :37 + :36 + :9 + :2 + :9 L; :7 + :38 + :42 + :9 + :2+:9L) = mx(:72 + :9 L; :75 + :9L) = :75 + :9L
86 Solution Mnul - Introution to Digitl Dign - Frury 2, 999 f(,,,,) Figur 6.: Singl-rror ttor for 2-out-of-5 o Exri 6.2 Lt u u th xprion otin in Exri 5.2 (only output vril' nm wr hng): = x y in + x y in + x y in + x y in = x x y in + x y y in + x x y y + x x y in + x y y in + x x y y + x x y in + x y y in + x x y y + x y y in + x x y in + x x y y out = x y + x x y + x y y + y y in + x y in + x x in + x y in Th ojtiv of th ign i to ru th numr of gt hring untwork mong th output, th mnipultion of th xprion follow:
Solution Mnul - Introution to Digitl Dign - Frury 2, 999 87 = (x y + x y ) in +(x y + x y ) in = (x y ) in +(x y ) in = (x y ) in = x (x y in + y y in + x y y + x y in + y y in + x y y ) +x (x y in + y y in + x y y + y y in + x y in + x y y ) = x (y A + y B)+x (y A + y B) = (x y + x y )A +(x y + x y )B =(x y ) A +(x y )B whr A = x in + y in + x y n B = x in + y in + x y. It n hown tht B = A, n th xprion for om: For th out output w otin: = x y A out = x y + x A + y A = x (y + A)+y (x + A) = x (y + y A)+y (x + x A) = x y + x y A + x y A = x y +(x y + x y )A = x y +(x y )A Th xprion for A n lo trnform to th following mor onvnint form: A = x in + y in + x y = x ( in + y )+y ( in + x ) = x ( in y + y )+y ( in x + x ) = x in y + x y + y in x = (x y ) in + x y Th gt ntwork i hown in Figur 6.2 on pg 88. Exri 6.3 A high-lvl pition for thi ytm i: Input: x i iml igit rprnt in BCD. Output: two BCD igit y n z. Funtion: y + z =3x. From thi pition w n th following withing funtion: x 3 x 2 x x y 3 y 2 y y z 3 z 2 z z
88 Solution Mnul - Introution to Digitl Dign - Frury 2, 999 x y in x y A out Figur 6.2: Ntwork of Exri 6.2 Th impli withing xprion r otin from K-mp (not hown): y 3 = y 2 = y = x 3 + x 2 x x y = x 2 x + x 2x z 3 = x 2 x x + x 2 x x z 2 = x 3 + x 2 x x + x 2 x x z = x 2 x x + x 2 x x + x 2 x x z = x Th (NAND;NAND) ntwork i hown in Figur 6.3. Exri 6.4 A high-lvl pition for th ytm i: Input: A, B, oth iml igit in Ex-3 o. Output: Y 2fG; E; Sg Funtion: Y = 8 >< >: G E S if A>B if A = B othrwi Th input r rprnt A =( 3 ; 2 ; ; ) n B =( 3 ; 2 ; ; ). Th output i no : Y =(y ;y )= 8 >< >: (; ) if A<B (; ) if A = B (; ) if A>B Th ntwork oul ign pilly for th Ex-3 o, in whih it woul mk u of th orrponing on't r, or on n u 4-it inry omprtor. Th rt pproh might giv implr ntwork, ut it i iult to ign u th implition woul rquir K-mp of ight vril (or th u of om tulr minimiztion thniqu). Morovr, th
Solution Mnul - Introution to Digitl Dign - Frury 2, 999 89 y3 y2 x3 x x y x x x x x x x x x x x3 y z3 z2 x x x x x x x z z Figur 6.3: Ntwork of Exri 6.3 rution woul only vli for two-lvl ntwork, whih i quit omplx nyhow (u of th ight input vril). Conquntly, w ign 4-it inry omprtor. It i n xtnion to four it of th 2-it omprtor ri in th txtook. Thrfor, w n writ irtly th following withing xprion: Equl = w 3 w 2 w w Grtr = 3 3 + w 3 2 2 + w 3w 2 + w 3w 2 w whr w i = i i + i i Du to th o lt, th output r y = Grtr n Th ntwork i hown in Figur 6.4. y = Equl Exri 6.5: Th moition of th ntwork of Exmpl 4.6 i hown in Figur 6.5. Sin w r k to u 4 omplx gt 2-AND/NOR2, th t olution i to u thm on th lvl tht h y i n w i input. Th fourth on houl not u to gnrt z 2 in thi output i ompo of 3 prout n th omplx gt i l to hnl only 2. Mor logi i rquir to gnrt th thir prout n omin it with th output of th omplx gt (tht woul
9 Solution Mnul - Introution to Digitl Dign - Frury 2, 999 W 3 3 2 2 W W W w3 w3 w2 w w 3 3 w3 2 w2 2 w3 w2 w w3 w2 w w y y Figur 6.4: Ntwork of Exri 6.4 tk r of 2 prout). For thi ron, it i mor intrting to u th fourth omplx gt to gnrt z n kp th m trutur of gt tht w u in Exmpl 4.6 to gnrt z 2. Although th output of AN3 orrpon to z w in't u it output th ntwork output to voi th inun of th z output lo on th ly of th othr output. Th ntwork hrtriti r: Lo ftor: Fnout ftor: oniring F =2whv F (z 2 )=F (z )=F (z )=2 Ntwork iz: Th NOT gt hv iz n ll othr hv iz 2, thu th ntwork h 23 quivlnt gt. Th iz of th ntwork on Exmpl 4.6 w 38 quivlnt gt. Numroflvl: 6 Ntwork ly: onir th following tl for gt ly: gt Intir Output Lo t plh (n) t phl (n) OR3 O 4.27.43 NOT N/N4 3.3. 2-AND/NOR2 AN2/AN3 3.4.8 2-AND/NOR2 AN4.25.3 2-AND/NOR2 AN 2.32.6 NOT N2/N3 2..8 NOT N5 L :2 + :38L :5 + :7L AND3 A3.24.2 OR3 O2 L 2 :2 + :38L 2 :34 + :22L 2 Th rt ritil pth w my onir i O! N! AN! N2! A3! O2 tht rult in th following ly: T plh (x ;z 2 ) = t phl (O) + t plh (N) + t phl (AN) + t plh (N2) + t plh (A3) + t plh (O2)
Solution Mnul - Introution to Digitl Dign - Frury 2, 999 9 y2 w2 y w y w x x O N 2-AND/NOR2 AN AN2 AN3 N2 N3 N4 ANx A A2 A3 AN4 N6 O2 N5 z z2 z Figur 6.5: Ntwork for Exri 6.5 = :428 + :34 + :56 + :96 + :24 + :2 + :38L 2 =:7 + :38L 2 T phl (x ;z 2 ) = t plh (O) + t phl (N) + t plh (AN) + t phl (N2) + t phl (A3) + t phl (O2) = :272 + : + :32 + :84 + :2+:34 + :22L 2 =:32 + :22L 2 Anothr pth tht my onir i O! N! AN2! N3! AN4! N5, tht rult in th following ly: T plh (x ;z ) = t phl (O) + t plh (N) + t phl (AN2) + t plh (N3) + t phl (A4) + t plh (N5) = :428 + :34 + :84 + :96 + :28 + :2 + :38L =:99 + :38L T phl (x ;z ) = t plh (O) + t phl (N) + t plh (AN2) + t phl (N3) + t plh (A4) + t phl (N5) = :272 + : + :395 + :84 + :245 + :5 + :7L =:5 + :7L W n tht th pth from x to z 2 i till th ritil pth in thi iruit, howvr, th ly w ru whn ompr to Exmpl 4.6. Exri 6.6: A high-lvl pition for th ytm i: Input: x; y 2f; ; 2; 3g Output: z 2fG; E; Sg. Funtion: W no th output follow: z = 8 >< >: G E S if x>y if x = y if x<y
92 Solution Mnul - Introution to Digitl Dign - Frury 2, 999 From thi noing w writ: z z 2 z z G E S z 2 = G = x y + SAME(x ;y )x y z = E = SAME(x ;y )SAME(x ;y ) z = S = x y + SAME(x ;y )x y whr SAME(x; y) =xy + x y =(x y ). Sin xy, x y n SAME(x; y) r mutully xluiv, th OR oprtion my writtn n Exluiv-OR oprtion, follow: z 2 = G = x y (x y)x y z = E =(x y)(x y) z = S = x y (x y )x y Th NOT gt i implmnt uing XOR gt : x = x. Thu, w n trnform th ov xprion follow: Th gt ntwork i hown in Figur 6.6 z 2 = G = x (y ) (x y )x (y ) z = E =(x y )(x y ) z = S =(x )y (x y )(x )y y y x z2=g y y x x x x x y y z=s x z=e x Figur 6.6: Ntwork for Exri 6.6
Solution Mnul - Introution to Digitl Dign - Frury 2, 999 93 Exri 6.7 Uing XOR gt it' poil to gt th xprion for qulity or irn: SAME = x y DIFFERENT = x y Uing th xprion, w otin th xprion for h output, z 2 (GREATER), z (EQUAL) n z (LESS) : z 2 = DIFFERENT:x+ SAME: 2 z = SAME: z = DIFFERENT:y+ SAME: Th gt ntwork uing XOR n NAND gt i hown in Figur 6.7, on pg 93. x y SAME z x y 2 x DIFFERENT z2 y z Figur 6.7: Comprtor uing XOR n NAND gt Exri 6.8 Th omplmntr i ri y th xprion: z i = x i Th ntwork tht implmnt 4-it omplmntr uing only XOR gt i prnt in Figur 6.8, on pg 94. Exri 6.9 Th funtion i n : (x; y; ) =x + y n uing thi funtion w wnt to rprnt th following funtion uing mux: OR(; ) = + = + = (; ; ) NOR(; ) =( + ) = =: + = (; ;)
94 Solution Mnul - Introution to Digitl Dign - Frury 2, 999 xo z x z x3 z2 z3 Figur 6.8: Complmntr uing XOR gt NAND(; ; ) = NAND(; AND(; )) AND(; ) = +: = (; ;) NAND(; z) =(z) = + z = z +:z = ( ; ;z) Thu NAND(; ; ) = ( ; ; (; ;)) XOR(; ) = = + = ( ;;) XNOR(; ) = = + = (; ;) Exri 6. From th ntwork in Figur 6.3 w n otin th following xprion for th ltion ignl (whih ontrol th rightmot multiplxr), n th output ignl z n z 2 : = + =( ) z = + = = z 2 = + = ( + )+( + ) = + + = ( + )+( + ) = ( + )+( + ) = + + From th ooln xprion w n tht z = orrpon to th high-lvl ription: z =( + + ) mo2 n z 2 = whn 2 or mor input hv th vlu. Th qution orrpon to um n rry-out output of on-it r, with input ;, n.
Solution Mnul - Introution to Digitl Dign - Frury 2, 999 95 Exri 6. Tr of multiplxr: Prt () E(; ; ; ) = + + + + W u Shnnon' ompoition to otin th following four xprion: E(; ; ; ) = + + = + = + E(; ; ; ) = + + = + E(; ; ; ) = + = E(; ; ; ) = + = + =() From th xprion w otin th tr of multiplxr hown in Figur 6.9. E(,,,) E(,,,) E(,,,) E(,,,) E(,,,) E(,,,) Figur 6.9: Multiplxr tr for E(; ; ; ) = + + + + Prt () E(; ; ; ; ; f) = f Uing th m typ of ompoition w gt th funtion hown in th nxt tl: (; ; ; f) E(; ; ; ; ; f) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )
96 Solution Mnul - Introution to Digitl Dign - Frury 2, 999 Th tright implmnttion of th tr of multiplxr will look lik th ntwork hown in Figur 6.(). Simplifying th ntwork y rmoving th rpt trm w otin th ntwork hown in Figur 6.(), tht look mor lik linr rry thn tr, ut h th m numr of lvl n l mux. = + E(,,,,,f) f = + f E(,,,,,f) () full multiplxr tr ntwork () implifi ntwork Figur 6.: Multiplxr ntwork for Exri 6. - prt () - E(; ; ; ; ; f) =f A ttr multiplxr tr ntwork i rliz oniring th implmnttion of th XOR n XNOR funtion ymultiplxr (Exri 6.9) n th oitivity of th XOR funtion follow: f =[( ) ( )] ( f) Th ntwork for thi i prnt in Figur 6.. Orv tht it h only 3 lvl of multiplxr in th ritil pth n 7 multiplxr. Th prviou implmnttion h 5 lvl n u 9 multiplxr. Exri 6.2 From Exri 6.6, n oniring tht th input numr r rprnt x =(x ;x ) n y =(y ;y ), w hv th following xprion for th output x = y (E), x>y (G) or x<y(s): G(x ;x ;y ;y ) = x y + x y y + x x y
Solution Mnul - Introution to Digitl Dign - Frury 2, 999 97 xor E(,,,,,f) ( xor ) xor f xor f Figur 6.: Implmnttion uing XOR proprty to olv Exri 6.() - E(; ; ; ; ; f) = f By ompoition w otin: E(x ;x ;y ;y ) = (x y + x y )(x y + x y ) S(x ;x ;y ;y ) = x y + x y y + x x y G(x ;x ; ; ) = x + x + x x = x + x = (x ; ;x ) G(x ;x ; ; ) = x G(x ;x ; ; ) = x x = (x ; ;x ) G(x ;x ; ; ) = E(x ;x ; ; ) = x x = (x ; ;x ) E(x ;x ; ; ) = x x = (x ; ;x ) E(x ;x ; ; ) = x x = (x ; ;x ) E(x ;x ; ; ) = x x = (x ; ;x ) S(x ;x ; ; ) = S(x ;x ; ; ) = x x = (x ; ;x ) S(x ;x ; ; ) = x S(x ;x ; ; ) = x + x + x x = x + x = (x ; ;x ) tht orrpon to th ntwork of multiplxr hown in Figur 6.2.
98 Solution Mnul - Introution to Digitl Dign - Frury 2, 999 x x x y G x y x y x x x y y E x y x x y S x x y x y Figur 6.2: Ntwork for Exri 6.2