ECE 27 Digitl Logi Spring 29 Comintionl Logi Design Proess n Common Comintionl Components Digitl Design 2.7 2. Digitl Design Chpter 2: Comintionl Logi Design Slies to ompn the tetook Digitl Design, irst Eition, rnk Vhi, John Wile n Sons Pulishers, 27. http://www.vhi.om Copright 27 rnk Vhi Instrutors of ourses requiring Vhi's Digitl Design tetook (pulishe John Wile n Sons) hve permission to moif n use these slies for ustomr ourse-relte tivities, sujet to keeping this opright notie in ple n unmoifie. These slies m e poste s unnimte pf versions on pulil-essile ourse wesites.. PowerPoint soure (or pf with nimtions) m not e poste to pulil-essile wesites, ut m e poste for stuents on internl protete sites or istriute iretl to stuents other eletroni mens. Instrutors m mke printouts of the slies ville to stuents for resonle photooping hrge, without inurring rolties. An other use requires epliit permission. Instrutors m otin PowerPoint soure or otin speil use permissions from Wile see http://www.vhi.om for informtion. 2 Comintionl Logi Design Proess 2.7 Comintionl Logi Design Proess Emple: Three s Detetor Step Step Cpture the funtion Step 2 Convert to equtions Step 3 Implement s gtese Desription Crete truth tle or equtions, whihever is most nturl for the given prolem, to esrie the esire ehvior of the omintionl logi. This step is onl neessr if ou pture the funtion using truth tle inste of equtions. Crete n eqution for eh output ORing ll the minterms for tht output. Simplif the equtions if esire. or eh output, rete orresponing to the output s eqution. (Shring gtes mong multiple outputs is OK optionll.) Prolem: Detet three onseutive s in 8-it input: efgh Step : Cpture the funtion Truth tle or eqution? Truth tle too ig: 2^8=256 rows Eqution: rete terms for eh possile se of three onseutive s = + + e + ef + efg + fgh Step 2: Convert to eqution -- lre one e Step 3: Implement s gte-se f g h e efg ef fgh 3
Comintionl Logi Design Proess Emple: Numer of s Count Prolem: Output in inr on two outputs z the numer of s on three inputs Step : Cpture the funtion Truth tle or eqution? Truth tle is strightforwr Step 2: Convert to eqution = + + + z = + + + Step 3: Implement s gtese 5 z More Gtes NAND NOR XOR XNOR NAND: Opposite of AND ( NOT AND ) NOR: Opposite of OR ( NOT OR ) XOR: Etl input is, for 2-input XOR. (or more inputs -- o numer of s) XNOR: Opposite of XOR ( NOT XOR ) NAND NOR 2.8 NAND sme s AND with power & groun swithe Wh? nmos onuts s well, ut not s (resons eon our sope) -- so NAND more effiient Likewise, NOR sme s OR with power/groun swithe AND in CMOS: NAND with NOT OR in CMOS: NOR with NOT So NAND/NOR more ommon 6 Completeness of NAND Numer of Possile Boolen untions An Boolen funtion n e implemente using just NAND gtes. Wh? Nee AND, OR, n NOT NOT: -input NAND (or 2-input NAND with inputs tie together) AND: NAND followe NOT OR: NAND preee NOTs Likewise for NOR How mn possile funtions of 2 vriles? 2 2 rows in truth tle, 2 hoies for eh 2 (22 ) = 2 = 6 possile funtions N vriles 2 N rows 2 (2N ) possile funtions f f f2 f3 f f5 f6 f7 f8 f9 f or 2 hoies or 2 hoies or 2 hoies or 2 hoies 2 = 6 possile funtions f f2 f3 f f5 AND XOR OR NOR XNOR NAND 7 8 2
Deoers n Mues 2.9 N-it Mu Deoer: Populr omintionl logi uiling lok, in ition to logi gtes Converts input inr numer to one high output 2-input eoer: four possile input inr numers So hs four outputs, one for eh possile input inr numer Internl esign AND gte for eh output to etet input omintion Deoer with enle e Outputs ll if e= Regulr ehvior if e= n-input eoer: 2 n outputs i 3 i i i 2 i 2 i i i i i ii ii 3 2 3 i i i 2 i 3 i i 2 e 3 i i e 2 3 2 3 Wht output of 38 eoer will e sserte if ii =?. = 2. 3 = 3. 6 =. 7 = i i 38 e 2 3 5 6 7 9 Multipleor (Mu) Mu Internl Design Mu: Another populr omintionl uiling lok Routes one of its N t inputs to its one output, se on inr vlue of selet inputs input mu nees 2 selet inputs to inite whih input to route through 8 input mu 3 selet inputs N inputs log 2 (N) selets Like rilr swith 2 i i s 2 mu i i 2 s i i i3 s s i i 2 s i i i3 i i s i (*i=i) i (+i=i) mu s s 2 3
N-it Mu Emple: Two -it inputs, A (3 2 ), n B (3 2 ) -it 2 mu (just four 2 mues shring selet line) n selet etween A or B s 3 3 2 2 i 2 i s i 2 i s i 2 i s i 2 i s A I B I -it 2 D C s s Simplifing nottion: C is short f or 3 2 N-it Mu If A=5, B=2, wht is the output of the -it 2 mu if s =?. 2. 5 3. 2. 7 A I B I -it 2 D C s s 3 N-it Mu Emple Non-Iel Gte Behvior -- Del Rel gtes hve some el Outputs on t hnge immeitel fter inputs hnge our possile ispl items Temperture (T), Averge miles-per-gllon (A), Instntneous mpg (I), n Miles remining (M) -- eh is 8-its wie Choose whih to ispl using two inputs n Use 8-it mu 5 6
Enoers In Clss Eerise Enoer: Comintionl logi uiling lok with opposite funtionlit of eoer Outputs inr enoing for input signl tht is 2 enoer woul hve four inputs n 2 outputs e 2 e 3 e 2 e 3 e 2 e 3 e 2 e 3 Design 2 enoer using AND, OR, n NOT gtes. Wht if two inputs re? Cn use priorit enoer Gives priorit to the highest input tht is, n outputs inr enoing for tht input Emple: If 3= n =, will output e= n e= euse 3 hs priorit e 2 e 3 7 8 5