Digital Design. Chapter 4: Datapath Components

Size: px
Start display at page:

Download "Digital Design. Chapter 4: Datapath Components"

Transcription

1 Digitl Design Chpter 4: Dtpth Components Slides to ccompny the textbook Digitl Design, with RTL Design, VHDL, nd Verilog, 2nd Edition, by, John Wiley nd Sons Publishers, 2. Copyright 2 Instructors of courses requiring Vhid's Digitl Design textbook (published by John Wiley nd Sons) hve permission to modify nd use these slides for customry course-relted ctivities, subject to keeping this copyright notice in plce nd unmodified. These slides my be posted s unnimted pdf versions on publicly-ccessible course websites.. PowerPoint source (or pdf with nimtions) Digitl my Design not be posted 2e to publicly-ccessible websites, but my be posted for students on internl protected sites or distributed directly to students by other electronic mens. Instructors my Copyright mke printouts 2 of the slides vilble to students for resonble photocopying chrge, without incurring roylties. Any other use requires explicit permission. Instructors my obtin PowerPoint source or obtin specil use permissions from Wiley see for informtion.

2 Introduction 4. Chpts 2 & 3: Introduced incresingly complex digitl building blocks Gtes, multiplexors, decoders, bsic registers, nd controllers Controllers good for systems with control inputs/outputs Control input: Single bit (or few), representing environment event or stte Ex: bit representing button pressed Dt input: Multiple bits representing single entity Ex: 7 bits representing temperture in binry Need ppropite building blocks for dt Dtpth components (register-trnsfer-level, or RTL) components: store/trnsform dt Combine dtpth components to form dtpth Chpt 4 introduces some dtpth components nd simple dtpths Next chpter will combine controllers nd dtpths into processors Digitl Design 2e Copyright 2 Note: Slides with nimtion re denoted with smll red "" ner the nimted items Approprite building blocks: Tires, set, pedls Not: Rubber, glue, metl 2

3 Registers 4.2 N-bit register: Stores N bits, N is the width Common widths:, 6, 32 Storing dt into register: Loding Opposite of storing: Reding (does not lter contents) Bsic register of Ch 3: Loded every cycle Useful for implementing FSM stores encoded stte b clk Combintionl logic s s Stte register n n x lod clk I3 D Q I2 D Q I D Q I 4-bit register D Q I3 I2 I I reg(4) Q3 Q2 Q Q Q3 Q2 Q Q Bsic register lods on every clock cycle How extend to only lod on certin cycles? Digitl Design 2e Copyright 2 3

4 Register with Prllel Lod Add 2x mux to front of ech flip-flop Register s lod input selects mux input to pss lod=: existing flip-flop vlue; lod=: new input vlue I3 I2 I I lod 2x D Q Q3 D Q Q2 D Q Q D Q Q I3 I2 I I lod Q3 Q2 Q Q block symbol lod= I3 D I2 D I D I D lod= I3 D I2 D I D I D Q Q Q Q Q Q Q Q Digitl Design 2e Copyright 2 Q3 Q2 Q Q Q3 Q2 Q Q 4

5 Register Exmple using the Lod Input: Weight Smpler Scle hs two displys Present weight Sved weight Useful to compre present item with previous item Use 4-bit prllel lod register to store weight Pressing button lods present weight into register Register contents lwys displyed s Sved weight, even when new present weight ppers Scle 3 pounds Sved weight Weight Smpler Sve b I3 I2 I I 32 pounds lod Present weight clk Q3 Q2 Q Q Digitl Design 2e Copyright 2 5

6 Buses N-bit bus: N wires to crry N-bit dt item Scle Weight Smpler Circuit drwings cn become cluttered Sve b lod I3 I2 I I Convention for drwing buses Present weight clk Q3 Q2 Q Q Single bold line nd/or smll ngled line cross Sved weight ld Digitl Design 2e Copyright 2 6

7 Register Exmple: Above-Mirror Disply C d lod reg T Loded on clock edge Ch2 ex: Four simultneous vlues from cr s computer To reduce wires: Computer writes only vlue t time, lods into one of four registers Ws: +++ = 32 wires Now: +2+ = wires Digitl Design 2e Copyright 2 lod 2x4 d i i d2 d3 e lod reg lod reg2 lod reg3 A I M i i i2 -bit 4 d i3 s s x y 7 D

8 Register Exmple: Computerized Checkerbord Ech register holds vlues for one column of LEDs lights LED Microprocessor lods one register t time Occurs fst enough tht user sees entire bord chnge t once R7 d7 R6 d6 R5 d5 R4 d4 R3 d3 R2 d2 R d R d e i2 i i 3x decoder D microprocessor () LED Q lit LED from microprocessor I R lod from decoder (b) Digitl Design 2e Copyright 2

9 Register Exmple: Computerized Checkerbord LED lit LED R7 R6 R5 R4 R3 R2 R R D i2,i,i e clk (R) (R) (R2) (R3) (R4) (R5) (R6) (R7) Digitl Design 2e Copyright 2 9

10 Shift Register Shift right Move ech bit one position right Rightmost bit is dropped Assume shifted into leftmost bit Register contents before shift right Register contents fter shift right Q: Do four right shifts on, showing vlue fter ech shift A: (originl) Implementtion: Connect flip-flop output to next flip-flop s input shr_in Digitl Design 2e Copyright 2

11 Shift Register To llow register to either shift or retin, use 2x muxes shr: mens retin, shift shr_in: vlue to shift in My be, or shr_in shr 2x D Q Q3 D Q Q2 D Q Q D Q Q () Left-shift register lso esy to design shr= 2x D Q Q3 shr_in shr D Q Q2 (b) D Q Q Q3 Q2 Q Q D Q Q Digitl Design 2e Copyright 2 (c)

12 Rotte Register Rotte right: Like shift right, but leftmost bit comes from rightmost bit Register contents before shift right Register contents fter shift right Digitl Design 2e Copyright 2 2

13 Shift Register Exmple: Above-Mirror Disply Erlier exmple: +2+ = wires from cr s computer to bove-mirror disply s four registers Better thn 32 wires, but still lot wnt fewer for smller wire bundles Use shift registers Wires: +2+=4 Computer sends one vlue t time, one bit per clock cycle Digitl Design 2e Copyright 2 From the cr's centrl computer e d3 lod C d 2 4 d i i d2 d3 e lod lod lod lod reg reg reg2 reg3 T A I M i -bit 4 i i2 d i3 s s Note: this line is wire, rther thn like before c x y shr_in d shr reg T s s 2x4 i shr_in 4 d shr reg A i i i shr_in d d2 shr reg2 I shift shr_in shr reg3 M x i2 i3 y 3 To the bove mirror disply D D

14 Multifunction Registers Mny registers hve multiple functions Lod, shift, cler (lod ll s) And retin present vlue, of course Esily designed using muxes Just connect ech mux input to chieve desired function s s Functions: Opertion Mintin present vlue Prllel lod Shift right (unused - let's lod s) shr_in I3 I2 I I s s 3 2 4x D Q 3 2 D Q 3 2 D Q 3 2 D Q shr_in s s I3 Q3 I2 I I Q2 Q Q Q3 Q2 Q Q (b) Digitl Design 2e Copyright 2 () 4

15 Multifunction Registers s s Opertion Mintin present vlue Prllel lod Shift right Shift left I3 I2 I I shr_in shl_in 3 2 D 3 2 D 3 2 D 3 2 D shl_in shr_in s s I3 I2 I I Q Q Q Q Q3 Q2 Q Q Q3 Q2 () Q Q (b) Digitl Design 2e Copyright 2 5

16 Multifunction Registers with Seprte Control Inputs ld shr shl Truth tble for combintionl circuit Inputs ld shr shl Opertion Mintin present vlue Shift left Shift right Shift right shr hs priority over shl Prllel lod Prllel lod ld hs priority Prllel lod ld hs priority shr_in Prllel lod ld hs priority ld Outputs s s Note Opertion Mintin vlue Shift left Shift right Shift right Prllel lod Prllel lod Prllel lod Prllel lod shr shl combintionl? circuit shr_in s s I3 Q3 I3 Q3 I2 I I I2 I I shl_in Q2 Q Q Q2 Q Q shl_in s = ld *shr *shl + ld *shr*shl + ld *shr*shl s = ld *shr *shl + ld s s Opertion Mintin present vlue Prllel lod Shift right Shift left Digitl Design 2e Copyright 2 6

17 Register Opertion Tble Register opertions typiclly shown using compct version of tble X mens sme opertion whether vlue is or One X expnds to two rows Two Xs expnd to four rows Put highest priority control input on left to mke reduced tble simple Inputs ld shr shl Outputs s s Note Opertion ld shr shl Opertion Mintin vlue Shift left Shift right Shift right Prllel lod Prllel lod Prllel lod Prllel lod X X X Mintin vlue Shift left Shift right Prllel lod Digitl Design 2e Copyright 2 7

18 Register Design Process Cn design register with desired opertions using simple four-step process Digitl Design 2e Copyright 2

19 Digitl Design 2e Copyright 2 Register Design Exmple Desired register opertions Lod, shift left, synchronous cler, synchronous set Wnt unique control input for ech opertion Step : Determine mux size 5 opertions: bove, plus mintin present vlue (don t forget this one!) Use x mux Step 2: Crete mux opertion tble Step 3: Connect mux inputs Step 4: Mp control lines s2 = clr *set s = clr *set *ld *shl + clr s = clr *set *ld + clr clr Inputs set ld X X X s2 s s shl X X X s2 s Outputs s2 s s s D Q Opertion Mintin present vlue Prllel lod Shift left Synchronous cler Synchronous set Mintin present vlue Mintin present vlue Mintin present vlue Qn In Opertion Mintin present vlue Shift left Prllel lod Set to ll s Cler to ll s 9 from Qn-

20 Register Design Exmple I3 I2 I I shl ld set clr combintionl circuit s2 s s I3 Q3 I2 I I shl_in Q2 Q Q shl_in Q3 Q2 Q Q Step 4: Mp control lines s2 = clr *set s = clr *set *ld *shl + clr s = clr *set *ld + clr Digitl Design 2e Copyright 2 clr Inputs set ld X X X shl X X X Outputs s2 s s Opertion Mintin present vlue Shift left Prllel lod Set to ll s Cler to ll s 2

21 Digitl Design 2e Copyright 2 2 Adders Adds two N-bit binry numbers 2-bit dder: dds two 2-bit numbers, outputs 3-bit result e.g., + = ( + 3 = 4) Cn design using combintionl design process of Ch 2, but doesn t work well for typicl N Why not? 4.3 s s c b b Inputs Outputs

22 Why Adders Aren t Built Using Stndrd Digitl Design 2e Copyright 2 Combintionl Design Process Truth tble too big 2-bit dder s truth tble shown Hs 2 (2+2) = 6 rows -bit dder: 2 (+) = 65,536 rows 6-bit dder: 2 (6+6) = ~4 billion rows 32-bit dder:... Big truth tble with numerous s/s yields big logic Plot shows number of trnsistors for N-bit dders, using stte-of-the-rt utomted combintionl design tool Q: Predict number of trnsistors for 6-bit dder A: trnsistors for N=5, doubles for ech increse of N. So trnsistors = *2 (N-5). Thus, for N=6, trnsistors = *2 (6-5) = *24 = 2,4,. Wy too mny! Inputs N Size comes from implementing with two levels of gtes. Following pproch uses more levels to chieve smller size. Trnsistors b b c Outputs s s

23 Alterntive Method to Design n Adder: Imitte Adding by Hnd Alterntive dder design: mimic how people do ddition by hnd One column t time Compute sum, dd crry to next column A: B: Digitl Design 2e Copyright 2 23

24 Alterntive Method to Design n Adder: Imitte Crete component for ech column Adds tht column s bits, genertes sum nd crry bits Adding by Hnd A: B: + A: + B: b ci b ci b ci b co s co s co s co s SUM Digitl Design 2e Copyright 2 Full-dders Hlf-dder 24

25 Hlf-Adder Hlf-dder: Adds 2 bits, genertes sum nd crry Design using combintionl design process from Ch 2 Step : Cpture the function Inputs b Outputs co s A: + B: b ci co s b ci co s b ci co s b co s SUM Step 2A: Crete equtions co = b s = b + b (sme s s = xor b) b b Hlf-dder (HA) Step 2B: Implement s circuit co () s co (b) s Digitl Design 2e Copyright 2 25

26 Digitl Design 2e Copyright 2 Full-Adder Full-dder: Adds 3 bits, genertes sum nd crry Design using combintionl design process from Ch 2 A: + B: Step : Cpture the function Step 2A: Crete equtions Inputs b ci Outputs co s b ci co s co = bc + b c + bc + bc co = bc +bc +b c +bc +bc +bc co = ( +)bc + (b +b)c + (c +c)b co = bc + c + b s = b c + bc + b c + bc s = (b c + bc ) + (b c + bc) s = (b xor c) + (b xor c) s = xor b xor c b ci co s b ci co s b co s SUM Step 2B: Implement s circuit b Full dder (FA) co ci s 26

27 Crry-Ripple Adder Using hlf-dder nd full-dders, we cn build dder tht dds like we would by hnd Clled crry-ripple dder 4-bit dder shown: Adds two 4-bit numbers, genertes 5-bit output 5-bit output cn be considered 4-bit sum plus -bit crry out Cn esily build ny size dder 3 b3 2 b2 b b b FA co ci s b FA co ci s b FA co ci s co b HA s 32 b3b2bb 4-bit dder co s3 s2 s s co s3 s2 s () s (b) Digitl Design 2e Copyright 2 27

28 Crry-Ripple Adder Using full-dder insted of hlf-dder for first bit, we cn include crry in bit in the ddition Useful lter when we connect smller dders to form bigger dders 3 b3 2 b2 b b ci b ci b ci b ci b ci 32 b3b2bb FA FA FA FA 4-bit dder ci co s co s co s co s co s3 s2 s s co s3 s2 s () s (b) Digitl Design 2e Copyright 2 2

29 Crry-Ripple Adder s Behvior b ci FA co s b ci b ci b ci FA FA FA co s co s co s Assume ll inputs initilly Digitl Design 2e Copyright 2 + b ci FA b ci FA b ci FA b ci FA co s co s co s co s co2 co co (nswer should be ) Output fter 2 ns (FA dely) Wrong nswer is there problem? No just need more time for crry to ripple through the chin of full dders. 29

30 Crry-Ripple Adder s Behvior b ci b ci b ci b ci FA FA FA FA co s co s co s co s co (b) + (nswer should be ) Outputs fter 4ns (2 FA delys) b ci b ci b ci b ci FA FA FA FA co s co s co s co s co2 (c) Outputs fter 6ns (3 FA delys) Digitl Design 2e Copyright 2 b ci FA co s b ci b ci b ci FA FA FA co s co s co s (d) Correct nswer ppers fter 4 FA delys Output fter ns (4 FA delys) 3

31 Cscding Adders 7654 b7b6b5b4 32 b3b2bb 32 b3b2bb 4-bit dder ci 32 b3b2bb 4-bit dder ci 7.. b7.. b -bit dder ci + co s3 s2 s s co s3 s2 s s co s7.. s co s7 s6 s5 s4 () s3 s2 s s (b) C (c) Block symbol Simplified block symbol Digitl Design 2e Copyright 2 3

32 Adder Exmple: DIP-Switch-Bsed Adding Clcultor Gol: Crete clcultor tht dds two -bit binry numbers, specified using DIP switches DIP switch: Dul-inline pckge switch, move ech switch up or down Solution: Use -bit dder DIP switches co 7.. b7..b -bit crry-ripple dder s7..s ci CALC LEDs Digitl Design 2e Copyright 2 32

33 Adder Exmple: DIP-Switch-Bsed Adding Clcultor To prevent spurious vlues from ppering t output, cn plce register t output Actully, the light flickers from spurious vlues would be too fst for humns to detect but the principle of registering outputs to void spurious vlues being red by externl devices (which normlly ren t humns) pplies here. DIP switches 7.. b7..b -bit dder ci co s7..s clk e ld -bit register CALC Digitl Design 2e Copyright 2 LEDs 33

34 Adder Exmple: Compensting Weight Scle Weight scle with compenstion mount of -7 To compenste for inccurte sensor due to physicl wer Use -bit dder weight sensor Dil, cn be set by user 7.. b7..b -bit dder ci co s7..s clk ld disply register Weight Adjuster Digitl Design 2e Copyright 2 to disply 34

35 Incrementer Adds to input A 3 Inputs 2 c s3 Outputs s2 s s crries: unused () co b HA co s s3 b HA co s s2 b HA co s s b HA co s s Incrementer (+) co s3 s2 s s (b) Could design using combintionl design process, but smller design uses crry-ripple, only need hlf-dders Digitl Design 2e Copyright 2 35

36 Comprtors 4.4 N-bit equlity comprtor: Outputs if two N-bit numbers re equl 4-bit equlity comprtor with inputs A nd B 3 must equl b3, 2 = b2, = b, = b Two bits re equl if both, or both eq = (3b3 + 3 b3 ) * (2b2 + 2 b2 ) * (b + b ) * (b + b ) Note tht function inside prentheses is XNOR eq = (3 xnor b3) * (2 xnor b2) * ( xnor b) * ( xnor b) 3 b3 2 b2 b b =? 32 b3b2bb 4-bit equlity comprtor eq = eq Digitl Design 2e Copyright 2 36

37 Mgnitude Comprtor N-bit mgnitude comprtor: Two N-bit inputs A nd B, outputs whether A>B, A=B, or A<B, for How design? Consider compring by hnd. First compre 3 nd b3. If equl, compre 2 nd b2. And so on. Stop if comprison not equl (the two bits re nd, or nd ) whichever of A or B hs the is thus greter. If never see unequl bit pir, then A=B. A= B= Equl Equl Not equl So A > B Digitl Design 2e Copyright 2 37

38 Mgnitude Comprtor By-hnd exmple leds to ide for design Strt t left, compre ech bit pir, pss results to the right Ech bit pir clled stge Ech stge hs 3 inputs tking results of higher stge, outputs new results to lower stge 3 b3 2 b2 b b b b b b Igt Ieq Ilt in_gt in_eq in_lt out_gt out_eq out_lt in_gt in_eq in_lt out_gt out_eq out_lt in_gt in_eq in_lt out_gt out_eq out_lt in_gt in_eq in_lt out_gt out_eq out_lt AgtB AeqB AltB Stge 3 Stge 2 Stge Stge How design ech stge? Digitl Design 2e Copyright 2 Igt Ieq Ilt 32 b3b2bb AgtB AeqB AltB 4-bit mgnitude comprtor > = < 3

39 Mgnitude Comprtor 3 b3 2 b2 b b b b b b Igt Ieq Ilt in_gt in_eq in_lt out_gt out_eq out_lt in_gt in_eq in_lt out_gt out_eq out_lt in_gt in_eq in_lt out_gt out_eq out_lt in_gt in_eq in_lt out_gt out_eq out_lt AgtB AeqB AltB Stge 3 Stge 2 Stge Stge Ech stge: out_gt = in_gt + (in_eq * * b ) A>B if lredy determined in higher stge, or if higher stges equl but in this stge = nd b= out_lt = in_lt + (in_eq * * b) A<B if lredy determined in higher stge, or if higher stges equl but in this stge = nd b= out_eq = in_eq * ( XNOR b) A=B (so fr) if lredy determined in higher stge nd in this stge =b too Simple circuit inside ech stge, just few gtes (not shown) Digitl Design 2e Copyright 2 39

40 Mgnitude Comprtor How does it work? =? = 3 b3 2 b2 b b Ieq= cuses this stge to compre Igt Ieq Ilt in_gt in_eq in_lt b out_gt out_eq out_lt in_gt in_eq in_lt b out_gt out_eq out_lt in_gt in_eq in_lt b out_gt out_eq out_lt in_gt in_eq in_lt b out_gt out_eq out_lt AgtB AeqB AltB Stge3 Stge2 () Stge Stge = 3 b3 2 b2 b b Igt Ieq Ilt in_gt in_eq in_lt b out_gt in_gt out_eq in_eq out_lt in_lt b out_gt out_eq out_lt in_gt in_eq in_lt b out_gt out_eq out_lt in_gt in_eq in_lt b out_gt out_eq out_lt AgtB AeqB AltB Digitl Design 2e Copyright 2 Stge3 Stge2 (b) Stge Stge 4

41 Mgnitude Comprtor =? > 3 b3 2 b2 b b Igt in_gt out_gt in_gt out_gt Ieq in_eq out_eq in_eq out_eq Ilt in_lt out_lt in_lt out_lt b b in_gt out_gt in_eq out_eq in_lt out_lt b b in_gt out_gt in_eq out_eq in_lt out_lt Stge3 Stge2 Stge Stge (c) 3 b3 2 b2 b b b b b b Igt in_gt out_gt in_gt out_gt in_gt out_gt in_gt out_gt Ieq in_eq out_eq in_eq out_eq in_eq out_eq in_eq out_eq Ilt in_lt out_lt in_lt out_lt in_lt out_lt in_lt out_lt AgtB AeqB AltB AgtB AeqB AltB Finl nswer ppers on the right Tkes time for nswer to ripple from left to right Thus clled crry-ripple style fter the crry-ripple dder Even though there s no crry involved Digitl Design 2e Copyright 2 Stge3 Stge2 (d) Stge Stge 4

42 Mgnitude Comprtor Exmple: Minimum of Two Numbers Design combintionl component tht computes the minimum of two -bit numbers Solution: Use -bit mgnitude comprtor nd -bit 2x mux If A<B, pss A through mux. Else, pss B. MIN A B Igt Ieq Ilt A B -bit mgnitude comprtor () AgtB AeqB AltB s I I -bit 2x mux C A B Min C (b) Digitl Design 2e Copyright 2 42

43 Multiplier Arry Style 4.5 Cn build multiplier tht mimics multipliction by hnd Notice tht multiplying multiplicnd by is sme s ANDing with Digitl Design 2e Copyright 2 43

44 Multiplier Arry Style Generlized representtion of multipliction by hnd Digitl Design 2e Copyright 2 44

45 Multiplier design rry of AND gtes Multiplier Arry Style 3 2 b pp b pp2 b2 + (5-bit) b3 pp4 pp3 + (6-bit) A * P B + (7-bit) Block symbol Digitl Design 2e Copyright 2 p7..p 45

46 Subtrctors nd Signed Numbers Cn build subtrctor s we built crry-ripple dder Mimic subtrction by hnd Compute the borrows from columns on left Use full-subtrctor component: wi is borrow by column on right, wo borrow from column on left - st column - 2nd column 3rd column - - 4th column b3 2 b2 b b wi b wi b wi b wi b wi 3 2 b3 b2 b b FS FS FS FS 4-bit subtrctor wi wo s wo s wo s wo s wo s3s2ss wo s3 s2 (b) s s (c) Digitl Design 2e Copyright 2 46

47 Subtrctor Exmple: DIP-Switch Bsed Adding/Subtrcting Clcultor Extend erlier clcultor exmple Switch f indictes whether wnt to dd (f=) or subtrct (f=) Use subtrctor nd 2x mux clk f e A B -bit dder co S ld ci DIP switches A B wi -bit subtrctor wo S 2x -bit register CALC LEDs Digitl Design 2e Copyright 2 47

48 Subtrctor Exmple: Color Spce Converter RGB to CMYK Color Often represented s weights of three colors: red, green, nd blue (RGB) Perhps bits ech (-255), so specific color is 24 bits White: R= (255), G=, B= Blck: R=, G=, B= Other colors: vlues in between, e.g., R=, G=, B= would be reddish purple Good for computer monitors, which mix red, green, nd blue lights to form colors Printers use opposite color scheme Becuse inks bsorb light Use complementry colors of RGB: Cyn (bsorbs red), reflects green nd blue, Mgent (bsorbs green), nd Yellow (bsorbs blue) Digitl Design 2e Copyright 2 4

49 Subtrctor Exmple: Color Spce Converter RGB to CMYK Printers must quickly convert RGB to CMY C=255-R, M=255-G, Y=255-B Use subtrctors s shown R G B C M Y Digitl Design 2e Copyright 2 49

50 Subtrctor Exmple: Color Spce Converter RGB to CMYK Try to sve colored inks Expensive Imperfect mixing C, M, Y doesn t yield good-looking blck Solution: Fctor out the blck or gry from the color, print tht prt using blck ink e.g., CMY of (25,2,2)= (2,2,2) + (5,,). (2,2,2) is drk gry use blck ink Digitl Design 2e Copyright 2 5

51 Cll blck prt K Subtrctor Exmple: Color Spce Converter RGB to CMYK (2,2,2): K=2 (Letter B lredy used for blue) Compute minimum of C, M, Y vlues R G B R G B RGB to CMY C M Y Use MIN component designed erlier, using C M Y comprtor nd mux, to MIN compute K Output resulting K vlue, nd subtrct K vlue from MIN C, M, nd Y vlues K Ex: Input of (25,2,2) yields output of (5,,,2) Digitl Design 2e Copyright 2 C2 M2 Y2 K 5

52 Representing Negtive Numbers: Two s Complement Negtive numbers common How represent in binry? Signed-mgnitude Use leftmost bit for sign bit So -5 would be: using four bits using eight bits Better wy: Two s complement Big dvntge: Allows us to perform subtrction using ddition Thus, only need dder component, no need for seprte subtrctor component Digitl Design 2e Copyright 2 52

53 Ten s Complement Before introducing two s complement, let s consider ten s complement But, be wre tht computers DO NOT USE TEN S COMPLEMENT. Introduced for intuition only. Complements for ech bse ten number shown to right. Complement is the number tht when dded results in Digitl Design 2e Copyright 2 53

54 Ten s Complement Nice feture of ten s complement Insted of subtrcting number, dding its complement results in nswer exctly too much So just drop the results in subtrcting using ddition only 2 complements Digitl Design 2e Copyright =3 7+6=3 3 Adding the complement results in n nswer tht is exctly too much dropping the tens column gives the right nswer. 54

55 Two s Complement is Esy to Compute: Just Invert Bits nd Add Hold on! Sure, dding the ten s complement chieves subtrction using ddition only But don t we hve to perform subtrction to hve determined the complement in the first plce? E.g., we only know tht the complement of 4 is 6 by subtrcting -4=6 in the first plce. True. But in binry, it turns out tht the two s complement cn be computed esily Two s complement of is, becuse + is Could compute complement of s = Esier method: Just invert ll the bits, nd dd The complement of is + =. It works! Q: Wht is the two s complement of? A: += (check: +=) Q: Wht is the two s complement of? A: += Digitl Design 2e Copyright 2 55

56 Two s Complement Two s complement cn represent negtive numbers Suppose hve 4 bits Positive numbers to 7: to Negtive numbers -: Tke two s complement of : + = -2: + = -: + = So - to -: to Leftmost bit indictes sign of number, known s sign bit. mens negtive. Signed vs. unsigned N-bit number Unsigned: to 2 N - Ex. Unsigned -bit: to 255 Signed (two s complement): -2 N- to 2 N- - Ex. Signed -bit: -2 to 27 Digitl Design 2e Copyright 2 Quick method to determine mgnitude of negtive number 4-bit: subtrct right 3 bits from. Ex. : -( 6) = -2 Or just tke two s complement gin: -(+) = - = -2 56

57 Two s Complement Subtrctor Built with n Adder Using two s complement A B = A + (-B) A B = A + (two s complement of B) = A + invert_bits(b) + N-bit So build subtrctor using dder by inverting B s bits, nd setting crry in to A Adder B cin S Digitl Design 2e Copyright 2 57

58 Adder/Subtrctor Adder/subtrctor: control input determines whether dd or subtrct Cn use 2x mux sub input psses either B or inverted B Alterntively, cn use XOR gtes if sub input is, B s bits pss through; if sub input is, XOR inverts B s bits A N-bit 2x A B Adder cin S B N-bit sub b7 b6 dder s B inputs sub Digitl Design 2e Copyright 2 5

59 Adder/Subtrctor Exmple: Clcultor Previous clcultor used seprte dder nd subtrctor Improve by using dder/subtrctor, nd two s complement numbers DIP swi tches clk f e sub DIP switches A B -bit dder/subtrctor S ld -bit register LEDs CALC A B -bit dder co S ci A B wi -bit subtrctor wo S Digitl Design 2e Copyright 2 clk f e ld 2x -bitregister LEDs CALC 59

60 Overflow Sometimes result cn t be represented with given number of bits Either too lrge mgnitude of positive or negtive Ex. 4-bit two s complement ddition of + (7+=). But 4-bit two s complement cn t represent number >7 + = WRONG nswer, in two s complement is -, not + Adder/subtrctor should indicte when overflow hs occurred, so result cn be discrded Digitl Design 2e Copyright 2 6

61 Detecting Overflow: Method For two s complement numbers, overflow occurs when the two numbers sign bits re the sme but differ from the result s sign bit If the two numbers sign bits re initilly different, overflow is impossible Adding positive nd negtive cn t exceed lrgest mgnitude positive or negtive Simple overflow detection circuit for 4-bit dder overflow = 3 b3 s3 + 3b3s3 Include overflow output bit on dder/subtrctor sign bits Digitl Design 2e Copyright 2 overflow () overflow (b) no overflow (c) If the numbers sign bits hve the sme vlue, which differs from the result s sign bit, overflow hs occurred. 6

62 Detecting Overflow: Method 2 Even simpler method: Detect difference between crry-in to sign bit nd crry-out from sign bit Yields simpler circuit: overflow = c3 xor c overflow () overflow (b) no overflow (c) If the crry into the sign bit column differs from the crry out of tht column, overflow hs occurred. Digitl Design 2e Copyright 2 62

63 Arithmetic-Logic Unit: ALU 4.7 ALU: Component tht cn perform vrious rithmetic (dd, subtrct, increment, etc.) nd logic (AND, OR, etc.) opertions, bsed on control inputs Digitl Design 2e Copyright 2 63

64 Multifunction Clcultor without n ALU Cn build using seprte components for ech opertion, nd muxes Too mny wires, lso wstes power computing opertions when only use one result t given time + DIP switches A B + AND OR XOR NOT Wsted power x s2 y -bit x s z s clk e Id -bit register A lot of wires CALC Digitl Design 2e Copyright 2 LEDs 64

65 ALU More efficient design uses ALU ALU design not just seprte components multiplexed (sme problem s previous slide) Insted, ALU design uses single dder, plus logic in front of dder s A nd B inputs Logic in front is clled n rithmetic-logic extender Extender modifies A nd B inputs so desired opertion ppers t output of the dder A B 7 b7 6 b6 b x y z AL-extender x y z AL-extender Digitl Design 2e Copyright 2 ALU IA IB Adder cin IS S () bext bext bext cinext i7 ib7 i6 ib6 i ib cin (b) 65

66 Arithmetic-Logic Extender in Front of ALU A B 7 b7 6 b6 b x y z AL-extender x y z AL-extender IA IB Adder cin IS ALU S () bext bext bext cinext i7 ib7 i6 ib6 i ib xyz= Wnt S=A+B : just pss to i, b to ib, nd set cin= xyz= Wnt S=A-B : pss to i, b to ib nd set cin= (two s complement) xyz= Wnt S=A+ : pss to i, set ib=, nd set cin= xyz= Wnt S=A : pss to i, set ib=, nd set cin= xyz= Wnt S=A AND B : set i=*b, b=, nd cin= Others: likewise Bsed on bove, crete logic for i(x,y,z,,b) nd ib(x,y,z,,b) for ech bext, nd crete logic for cin(x,y,z), to complete design of the AL-extender component (b) cin Digitl Design 2e Copyright 2 66

67 ALU Exmple: Multifunction Clcultor DIP swi tches A B + Ð + AND OR XOR NOT Wst ed pow er DIP switches x y s bit s z s e Id -bit regist er clk A lot of wi res. LEDs CALC Design using ALU is elegnt nd efficient No mss of wires No big wste of power clk x y z e A A x y z ld ALU S -bit register B B CALC LEDs Digitl Design 2e Copyright 2 67

68 Shifters Shifting (e.g., left shifting yields ) useful for: Mnipulting bits Converting seril dt to prllel (remember erlier bove-mirror disply exmple with shift registers) Multiply/divide by 2 (unsigned numbers only) Shift left once is sme s multiplying by 2. Ex: (3) becomes (6) Why? Essentilly ppending -- Note tht multiplying deciml number by ccomplished just be ppending, i.e., by shifting left (55 becomes 55) Shift right once sme s dividing by 2 i3 i2 i i 4. i3 i2 i i i3 i2 i i inr inl in in sh shl shr s s << Symbol Digitl Design 2e Copyright 2 q3 q2 q q Left shifter q3 q2 q q Shifter with left shift or no shift q3 q2 q q Shifter with left shift, right shift, nd no shift 6

69 Shifter Exmple: Temperture Averger Four registers storing history of tempertures Wnt to output the verge of those tempertures Add Use three dders Then divide by four Sme s shift right by 2 (7) () (2) (5) T clk ld R Rb Rc Rd ld shift in (42) divide by 4 >>2 () Note rounding Rvg ld Tvg Digitl Design 2e Copyright 2 69

70 Strength Reduction Mny multiplictions not by power of 2 constnts (2, 4,, ) E.g., by 5, or Could use multiplier component, but shifters re smll nd fst Replce multipliction by shifts nd dds Opertor strength reduction (multiply is stronger thn shift/dd) E.g., 5*C 4*C + C (4*C sme s C<<2) Replcing division by shifts nd dds slightly hrder Approximte frction using frction hving power of 2 denomintor E.g., C/5 =.2*C, pprox. equls (2/52)*C =.99*C (2/52)*C = C*( )/52 = (C*64 + C*32 + C*4+C*2)/52 = ((C<<6) + (C<<5) + (C<<2) + (C<<)) >> 9 Digitl Design 2e Copyright 2 7

71 Celsius to Fhrenheit Converter F = C*9/ F = C + C*4/ F = C + 4*(C*64+C*32+C*4+C*2)/ (/5 from prev. slide) F = C + (C*64+C*32+C*4+C*2)/2+32 C 6 <<6 <<5 <<2 << Note: Uses wider buses, pdded on the left, to void losing bits during shifts Determine biggest possible internl vlues, set width ccordingly Do divisions s lte s possible to reduce rounding errors + >>7 + 6 F = C +(C*64+C*32+C*4+C*2)/ Digitl Design 2e Copyright 2 7

72 Brrel Shifter i3 i2 i i A shifter tht cn shift by ny mount 4-bit brrel left shift cn shift left by,, 2, or 3 positions -bit brrel left shifter cn shift left by,, 2, 3, 4, 5, 6, or 7 positions (Shifting n -bit number by positions is pointless -- you just lose ll the bits) Could design using x muxes Too mny wires More elegnt design Chin three shifters: 4, 2, nd Cn chieve ny shift of..7 by enbling the correct combintion of those three shifters, i.e., shifts should sum to desired mount Digitl Design 2e Copyright 2 q3 q2 q q in sh Shift by shifter uses 2x muxes. x mux solution for -bit brrel shifter: too mny wires. Q: xyz=??? to shift by 5? x y z sh sh sh Net result: shift by 5: I <<4 in <<2 in << in Q 72

73 Counters nd Timers 4.9 N-bit up-counter: N-bit register tht cn increment (dd ) to its own vlue on ech clock cycle,,,,...,,, Count rolls over from to Terminl (lst) count, tc, equls during vlue just before rollover Internl design Register, incrementer, nd N-input AND gte to detect terminl count clr cnt tc 4-bit up-counter clr cnt clr Id tc 4-bit up-counter C bit register C + 4 Digitl Design 2e Copyright 2 73

74 Counter Exmple: Turnstile with Disply Count people pssing through turnstile Assume turnstile genertes -clock pulse on P Connect count to disply Button cn reset count Simple solution using upcounter reset from turnstile P clk clr cnt 32-bit up-counter tc unused Disply 32,46 Digitl Design 2e Copyright 2 74

75 Up/Down-Counter Cn count either up or down Includes both incrementer nd decrementer Use dir input to select, vi 2x mux: dir= mens up Likewise, dir selects pproprite terminl count vlue (ll s or ll s) dir clr cnt clr ld 4-bit up/down counter 2x tc 4-bit 2 x 4 4-bit register C Digitl Design 2e Copyright 2 75

76 Counter with Lod Up-counter tht cn be loded with externl vlue Designed using 2x mux. ld input selects incremented vlue or externl vlue Lod the internl register when loding externl vlue or when counting Note tht ld hs priority over cnt ld cnt clr Id clr tc L 4 4-bit 2x 4 4-bit register C + Digitl Design 2e Copyright 2 76

77 Counter with Prllel Lod Useful to crete pulses t specific multiples of clock Not just t N-bit counter s nturl wrp-round of 2 N Exmple: Pulse every 9 clock cycles Use 4-bit down-counter with prllel lod Set prllel lod input to () Use terminl count to relod When count reches, next cycle lods. Why lod nd not 9? Becuse is included in count sequence:, 7, 6, 5, 4, 3, 2,, 9 counts clk ld cnt tc 4 L 4-bit down-counter 4 C Digitl Design 2e Copyright 2 77

78 Counter Exmple: New Yer s Eve Countdown Disply Chpter 2 exmple previously used microprocessor to count from 59 down to in binry Cn use -bit (or 7- or 6-bit) down-counter insted, initilly loded with 59 Digitl Design 2e Copyright 2 59 L clk Hz ld clr cnt c c c2 c3 c4 c5 c6 c7 -bit downcounter tc i i i2 i3 i4 i5 6x64 dcd d d d2 d3 d5 d59 d6 d6 d62 d Hppy New Yer! fireworks Note: Use - bit counter, not 6-bit counter 7

79 Common Counter Use: Clock Divider Suppose hve 52 Hz oscilltor, but wnt 2 Hz pulse Thus, wnt divide fst clock by 256 Design using -bit upcounter, use tc output s pulse Counts from to 255 (256 counts), so pulses tc every 256 cycles cnt -bit up-counter tc C osc 52 MHz p (unused) 2 MHz Digitl Design 2e Copyright 2 79

80 Clock Division by Amount not Power of 2 Exmple: Hz Pulse Genertor from 6 Hz Clock Exmple: U.S. electricity stndrd uses 6 Hz signl Device my convert tht to Hz signl to count seconds Use 6-bit up-counter Up counter: Detected count of 59 clers counter to ; tc thus pulses every 6 cycles Note: Detect 59, not 6 (becuse the first number,, is included) Down counter pproch lso possible: When count reches, lod 59 clr osc 6 Hz cnt 6-bit up-counter tc C p osc 6 Hz ld cnt tc 6-bit down-counter C p unused Hz Hz Digitl Design 2e Copyright 2

81 Mesuring Time Between Events using n Up-Counter Initilly cler to. st event: Set cnt=. 2 nd event: Set cnt=. Then, multiply counted clock cycles by clock period to determine time Ex: Highwy speed mesurement system Two sensors nd b in rod Use FSM to detect becoming, set cnt=. Set cnt= when b If clock is khz (period is ms), then time is C *.s If nd b seprted by. miles, then vehicle speed in mph is:. miles / (time * ( hour / 36 seconds)) E.g., if C is 5, then speed is. / ((5*.) / 36) = 72 mph b Speed Mesurer vehicle b Speed Mesurer s S S S2 clr= cnt= cnt= (compute time nd output speed) b clr cnt C 6 Digitl Design 2e Copyright 2

82 Timers Pulses output t userspecified timer intervl when enbled Ticks like clock Intervl specified s multiple of bse time unit If bse is microsec nd user wnts pulse every 3 ms, lods 3, into timer Cn design using oscilltor, register, nd down-counter () Q (b) lod enble microsec oscilltor ld ld cnt (c) tc M Q bit register 4-bit 2x 32-bit down-counter 32 C unused M lod enble 32-bit -microsec Q timer Digitl Design 2e Copyright 2 2

83 Timer Exmple: Lser Surgery System Recll Chpt 3 lser surgery exmple Clock ws ns, wnted 3 ns, used 3 sttes. Wht if wnted 3 ms? Adding 3 million sttes is not resonble. Use timer Controller FSM lods timer, enbles, then wits for Q= Digitl Design 2e Copyright 2 Inputs: b, Q x= ld= en= x= ld= en= b Outputs:ld, en, x Off Strt (c) b' Q On b clk Q' x= ld= en= clk b Controller clk Inputs: b Q Stte Outputs: x ld en Off Lser Surgery System ns () ld en Q x (b) lser ptient 3, (in binry) M lod enble 32-bit microsec timer Q ms... Off Off Off Strt On... On... (d) Off x

84 Register Files 4. Accessing one of severl registers is: OK if just few registers Problemtic when mny Ex: Erlier bove-mirror disply, with 6 registers Much fnout (brnching of wire): Wekens signl Mny wires: Congestion Digitl Design 2e Copyright 2 C 4 lod lod C d d 4x62 4 d i i3-ii d2 e 32 d3 d5 e lod lod reg reg too much lodfnout reg lod reg2 lod lod reg3 reg5 T A I M bit registers tolerble 6 32-bit registers begins to hve fnout nd wire problems huge mux i i 32-bit -bit 6x 4 i d d DD 32 i2 congestion i5i3 s s s3-s x y 4 6*32 = 52 wires

85 Register File MxN register file: Efficient design for one-t--time write/red of mny registers Consider 6 32-bit registers Clled write port 32-bit dt to write 4-bit ddress specifies which register to write Enble (lod) line: Reg written on next clock 32 4 W_dt W_ddr W_en 6 32 register file R_dt R_ddr R_en bit dt tht is red 4-bit ddress to specifies which register to red Enble red red port Digitl Design 2e Copyright 2 5

86 Register File Internl design uses drivers nd bus d driver d q=d c q Boosts signl three-stte driver q 9 W_dt W_ddr W_en i i 2x4 32 d d d2 write decoder d3 e lod lod lod lod 4x32 register file reg reg reg2 reg bus driver R_dt d d d2 2x4 i i red decoder d3 e Internl design of 4x32 RF; 6x32 RF follows similrly R_ddr R_en c=: q=d d q c=: q= Z d q like no connection Note: Ech driver in figure ctully represents 32 -bit drivers Digitl Design 2e Copyright 2 6

87 Register File Timing Digrm Cn write one register nd red one register ech clock cycle My be sme register clk W_dt W_ddr W_en R_dt cycle cycle 2 cycle 3 cycle 4 cycle 5 cycle Z X X X X 2 3 Z Z 9 Z R_ddr X X 3 X 3 R_en 32 2 W_dt W_ddr R_dt R_ddr 32 2 : : 2: 3:???? : : 2: 3:??? 9 : : 2: 3:? 22? 9 : : 2: 3:? 22? 9 : : 2: 3:? 22? 9 : : 2: 3:? : : 2: 3:? W_en 4x32 register file R_en Digitl Design 2e Copyright 2 7

88 Register-File Exmple: Above-Mirror Disply 6 32-bit registers tht cn be written by cr s computer, nd displyed Use 6x32 register file Simple, elegnt design Register file hides complexity internlly And becuse only one register needs to be written nd/or red t time, internl design is simple C lod 4 i3-i e 32 d 4 6 d5 C WA lod lod lod reg 32too much fnout W_dt 4 W_ddr 32 OLD design W_en R_en d D 6x32 32 register file RA congestion reg5 huge mux 32 i bit D R_dt 6x 4 R_ddr i5 s3-s Digitl Design 2e Copyright 2

89 Chpter Summry Need dtpth components to store nd operte on multi-bit dt Also known s register-trnsfer-level (RTL) components Components introduced Registers Adders Comprtors Multipliers Subtrctors Arithmetic-Logic Units Shifters Counters nd Timers Register Files Next chpter combines knowledge of combintionl logic design, sequentil logic design, nd dtpth components, to build digitl circuits tht cn perform generl nd powerful computtions Digitl Design 2e Copyright 2 9

Chapter 4: Datapath Components. Instructor: Dr. Hyunyoung Lee. Copyright Based on slides by Frank Vahid. Frank Vahid

Chapter 4: Datapath Components. Instructor: Dr. Hyunyoung Lee. Copyright Based on slides by Frank Vahid. Frank Vahid Chpter 4: Dtpth Components Instructor: Dr. Hyunyoung Lee Bsed on slides by Copyright 2 Instructors of courses requiring Vhid's Digitl Design textbook (published by John Wiley nd Sons) hve permission to

More information

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers Wht do ll those bits men now? bits (...) Number Systems nd Arithmetic or Computers go to elementry school instruction R-formt I-formt... integer dt number text chrs... floting point signed unsigned single

More information

Chapter 1: Introduction

Chapter 1: Introduction Chpter : Introduction Slides to ccompny the textbook, First Edition, by, John Wiley nd Sons Publishers, 7. http://www.ddvhid.com Copyright 7 Instructors of courses requiring Vhid's textbook (published

More information

ECE 274 Digital Logic. Digital Design. Datapath Components Subtractors, Two s Complement, Overflow, ALUs, Register Files Digital Design

ECE 274 Digital Logic. Digital Design. Datapath Components Subtractors, Two s Complement, Overflow, ALUs, Register Files Digital Design ECE 27 Digital Logic Subtractors,, Overflow, ALUs, Register Files Digital Design..0 Digital Design Chapter : Slides to accompany the textbook Digital Design, First Edition, by Frank Vahid, John Wiley and

More information

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers

What do all those bits mean now? Number Systems and Arithmetic. Introduction to Binary Numbers. Questions About Numbers Wht do ll those bits men now? bits (...) Number Systems nd Arithmetic or Computers go to elementry school instruction R-formt I-formt... integer dt number text chrs... floting point signed unsigned single

More information

Questions About Numbers. Number Systems and Arithmetic. Introduction to Binary Numbers. Negative Numbers?

Questions About Numbers. Number Systems and Arithmetic. Introduction to Binary Numbers. Negative Numbers? Questions About Numbers Number Systems nd Arithmetic or Computers go to elementry school How do you represent negtive numbers? frctions? relly lrge numbers? relly smll numbers? How do you do rithmetic?

More information

Digital Design. Chapter 1: Introduction. Digital Design. Copyright 2006 Frank Vahid

Digital Design. Chapter 1: Introduction. Digital Design. Copyright 2006 Frank Vahid Chpter : Introduction Copyright 6 Why Study?. Look under the hood of computers Solid understnding --> confidence, insight, even better progrmmer when wre of hrdwre resource issues Electronic devices becoming

More information

Digital Design. Chapter 6: Optimizations and Tradeoffs

Digital Design. Chapter 6: Optimizations and Tradeoffs Digitl Design Chpter 6: Optimiztions nd Trdeoffs Slides to ccompny the tetbook Digitl Design, with RTL Design, VHDL, nd Verilog, 2nd Edition, by Frnk Vhid, John Wiley nd Sons Publishers, 2. http://www.ddvhid.com

More information

12-B FRACTIONS AND DECIMALS

12-B FRACTIONS AND DECIMALS -B Frctions nd Decimls. () If ll four integers were negtive, their product would be positive, nd so could not equl one of them. If ll four integers were positive, their product would be much greter thn

More information

Basics of Logic Design Arithmetic Logic Unit (ALU)

Basics of Logic Design Arithmetic Logic Unit (ALU) Bsics of Logic Design Arithmetic Logic Unit (ALU) CPS 4 Lecture 9 Tody s Lecture Homework #3 Assigned Due Mrch 3 Project Groups ssigned & posted to lckord. Project Specifiction is on We Due April 9 Building

More information

Section 10.4 Hyperbolas

Section 10.4 Hyperbolas 66 Section 10.4 Hyperbols Objective : Definition of hyperbol & hyperbols centered t (0, 0). The third type of conic we will study is the hyperbol. It is defined in the sme mnner tht we defined the prbol

More information

Representation of Numbers. Number Representation. Representation of Numbers. 32-bit Unsigned Integers 3/24/2014. Fixed point Integer Representation

Representation of Numbers. Number Representation. Representation of Numbers. 32-bit Unsigned Integers 3/24/2014. Fixed point Integer Representation Representtion of Numbers Number Representtion Computer represent ll numbers, other thn integers nd some frctions with imprecision. Numbers re stored in some pproximtion which cn be represented by fixed

More information

5 Regular 4-Sided Composition

5 Regular 4-Sided Composition Xilinx-Lv User Guide 5 Regulr 4-Sided Composition This tutoril shows how regulr circuits with 4-sided elements cn be described in Lv. The type of regulr circuits tht re discussed in this tutoril re those

More information

Subtracting Fractions

Subtracting Fractions Lerning Enhncement Tem Model Answers: Adding nd Subtrcting Frctions Adding nd Subtrcting Frctions study guide. When the frctions both hve the sme denomintor (bottom) you cn do them using just simple dding

More information

ECEN 468 Advanced Logic Design Lecture 36: RTL Optimization

ECEN 468 Advanced Logic Design Lecture 36: RTL Optimization ECEN 468 Advnced Logic Design Lecture 36: RTL Optimiztion ECEN 468 Lecture 36 RTL Design Optimiztions nd Trdeoffs 6.5 While creting dtpth during RTL design, there re severl optimiztions nd trdeoffs, involving

More information

1. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES)

1. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES) Numbers nd Opertions, Algebr, nd Functions 45. SEQUENCES INVOLVING EXPONENTIAL GROWTH (GEOMETRIC SEQUENCES) In sequence of terms involving eponentil growth, which the testing service lso clls geometric

More information

Engineer To Engineer Note

Engineer To Engineer Note Engineer To Engineer Note EE-186 Technicl Notes on using Anlog Devices' DSP components nd development tools Contct our technicl support by phone: (800) ANALOG-D or e-mil: dsp.support@nlog.com Or visit

More information

CS2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

CS2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014 CS DIGITAL LOGIC & STATE MACHINE DESIGN SPRING DUE : April 7, HOMEWOR V READ : Relted portions of Chpters III, IV, VI, VII nd VIII ASSIGNMENT : There re seven questions Solve ll homework nd exm problems

More information

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits

Systems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits Systems I Logic Design I Topics Digitl logic Logic gtes Simple comintionl logic circuits Simple C sttement.. C = + ; Wht pieces of hrdwre do you think you might need? Storge - for vlues,, C Computtion

More information

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus

Unit #9 : Definite Integral Properties, Fundamental Theorem of Calculus Unit #9 : Definite Integrl Properties, Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl

More information

Computer Arithmetic Logical, Integer Addition & Subtraction Chapter

Computer Arithmetic Logical, Integer Addition & Subtraction Chapter Computer Arithmetic Logicl, Integer Addition & Sutrction Chpter 3.-3.3 3.3 EEC7 FQ 25 MIPS Integer Representtion -it signed integers,, e.g., for numeric opertions 2 s s complement: one representtion for

More information

Before We Begin. Introduction to Spatial Domain Filtering. Introduction to Digital Image Processing. Overview (1): Administrative Details (1):

Before We Begin. Introduction to Spatial Domain Filtering. Introduction to Digital Image Processing. Overview (1): Administrative Details (1): Overview (): Before We Begin Administrtive detils Review some questions to consider Winter 2006 Imge Enhncement in the Sptil Domin: Bsics of Sptil Filtering, Smoothing Sptil Filters, Order Sttistics Filters

More information

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork

MA1008. Calculus and Linear Algebra for Engineers. Course Notes for Section B. Stephen Wills. Department of Mathematics. University College Cork MA1008 Clculus nd Liner Algebr for Engineers Course Notes for Section B Stephen Wills Deprtment of Mthemtics University College Cork s.wills@ucc.ie http://euclid.ucc.ie/pges/stff/wills/teching/m1008/ma1008.html

More information

Geometric transformations

Geometric transformations Geometric trnsformtions Computer Grphics Some slides re bsed on Shy Shlom slides from TAU mn n n m m T A,,,,,, 2 1 2 22 12 1 21 11 Rows become columns nd columns become rows nm n n m m A,,,,,, 1 1 2 22

More information

Section 3.1: Sequences and Series

Section 3.1: Sequences and Series Section.: Sequences d Series Sequences Let s strt out with the definition of sequence: sequence: ordered list of numbers, often with definite pttern Recll tht in set, order doesn t mtter so this is one

More information

COMP 423 lecture 11 Jan. 28, 2008

COMP 423 lecture 11 Jan. 28, 2008 COMP 423 lecture 11 Jn. 28, 2008 Up to now, we hve looked t how some symols in n lphet occur more frequently thn others nd how we cn sve its y using code such tht the codewords for more frequently occuring

More information

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment

File Manager Quick Reference Guide. June Prepared for the Mayo Clinic Enterprise Kahua Deployment File Mnger Quick Reference Guide June 2018 Prepred for the Myo Clinic Enterprise Khu Deployment NVIGTION IN FILE MNGER To nvigte in File Mnger, users will mke use of the left pne to nvigte nd further pnes

More information

Parallel Square and Cube Computations

Parallel Square and Cube Computations Prllel Squre nd Cube Computtions Albert A. Liddicot nd Michel J. Flynn Computer Systems Lbortory, Deprtment of Electricl Engineering Stnford University Gtes Building 5 Serr Mll, Stnford, CA 945, USA liddicot@stnford.edu

More information

x )Scales are the reciprocal of each other. e

x )Scales are the reciprocal of each other. e 9. Reciprocls A Complete Slide Rule Mnul - eville W Young Chpter 9 Further Applictions of the LL scles The LL (e x ) scles nd the corresponding LL 0 (e -x or Exmple : 0.244 4.. Set the hir line over 4.

More information

SIMPLIFYING ALGEBRA PASSPORT.

SIMPLIFYING ALGEBRA PASSPORT. SIMPLIFYING ALGEBRA PASSPORT www.mthletics.com.u This booklet is ll bout turning complex problems into something simple. You will be ble to do something like this! ( 9- # + 4 ' ) ' ( 9- + 7-) ' ' Give

More information

EECS150 - Digital Design Lecture 23 - High-level Design and Optimization 3, Parallelism and Pipelining

EECS150 - Digital Design Lecture 23 - High-level Design and Optimization 3, Parallelism and Pipelining EECS150 - Digitl Design Lecture 23 - High-level Design nd Optimiztion 3, Prllelism nd Pipelining Nov 12, 2002 John Wwrzynek Fll 2002 EECS150 - Lec23-HL3 Pge 1 Prllelism Prllelism is the ct of doing more

More information

Stack Manipulation. Other Issues. How about larger constants? Frame Pointer. PowerPC. Alternative Architectures

Stack Manipulation. Other Issues. How about larger constants? Frame Pointer. PowerPC. Alternative Architectures Other Issues Stck Mnipultion support for procedures (Refer to section 3.6), stcks, frmes, recursion mnipulting strings nd pointers linkers, loders, memory lyout Interrupts, exceptions, system clls nd conventions

More information

9 4. CISC - Curriculum & Instruction Steering Committee. California County Superintendents Educational Services Association

9 4. CISC - Curriculum & Instruction Steering Committee. California County Superintendents Educational Services Association 9. CISC - Curriculum & Instruction Steering Committee The Winning EQUATION A HIGH QUALITY MATHEMATICS PROFESSIONAL DEVELOPMENT PROGRAM FOR TEACHERS IN GRADES THROUGH ALGEBRA II STRAND: NUMBER SENSE: Rtionl

More information

6.2 Volumes of Revolution: The Disk Method

6.2 Volumes of Revolution: The Disk Method mth ppliction: volumes by disks: volume prt ii 6 6 Volumes of Revolution: The Disk Method One of the simplest pplictions of integrtion (Theorem 6) nd the ccumultion process is to determine so-clled volumes

More information

2 Computing all Intersections of a Set of Segments Line Segment Intersection

2 Computing all Intersections of a Set of Segments Line Segment Intersection 15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design

More information

Register Transfer Level (RTL) Design

Register Transfer Level (RTL) Design CSE4: Components nd Design Techniques for Digitl Systems Register Trnsfer Level (RTL) Design Tjn Simunic Rosing Where we re now Wht we hve covered lst time: Register Trnsfer Level (RTL) design Wht we re

More information

MIPS I/O and Interrupt

MIPS I/O and Interrupt MIPS I/O nd Interrupt Review Floting point instructions re crried out on seprte chip clled coprocessor 1 You hve to move dt to/from coprocessor 1 to do most common opertions such s printing, clling functions,

More information

Fig.1. Let a source of monochromatic light be incident on a slit of finite width a, as shown in Fig. 1.

Fig.1. Let a source of monochromatic light be incident on a slit of finite width a, as shown in Fig. 1. Answer on Question #5692, Physics, Optics Stte slient fetures of single slit Frunhofer diffrction pttern. The slit is verticl nd illuminted by point source. Also, obtin n expression for intensity distribution

More information

Dynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012

Dynamic Programming. Andreas Klappenecker. [partially based on slides by Prof. Welch] Monday, September 24, 2012 Dynmic Progrmming Andres Klppenecker [prtilly bsed on slides by Prof. Welch] 1 Dynmic Progrmming Optiml substructure An optiml solution to the problem contins within it optiml solutions to subproblems.

More information

George Boole. IT 3123 Hardware and Software Concepts. Switching Algebra. Boolean Functions. Boolean Functions. Truth Tables

George Boole. IT 3123 Hardware and Software Concepts. Switching Algebra. Boolean Functions. Boolean Functions. Truth Tables George Boole IT 3123 Hrdwre nd Softwre Concepts My 28 Digitl Logic The Little Mn Computer 1815 1864 British mthemticin nd philosopher Mny contriutions to mthemtics. Boolen lger: n lger over finite sets

More information

Today s Lecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Recursive Example. Review: The C / C++ code. Recursive Example (Continued)

Today s Lecture. Basics of Logic Design: Boolean Algebra, Logic Gates. Recursive Example. Review: The C / C++ code. Recursive Example (Continued) Tod s Lecture Bsics of Logic Design: Boolen Alger, Logic Gtes Alvin R. Leeck CPS 4 Lecture 8 Homework #2 Due Ferur 3 Outline Review (sseml recursion) Building the uilding locks Logic Design Truth tles,

More information

EECS 281: Homework #4 Due: Thursday, October 7, 2004

EECS 281: Homework #4 Due: Thursday, October 7, 2004 EECS 28: Homework #4 Due: Thursdy, October 7, 24 Nme: Emil:. Convert the 24-bit number x44243 to mime bse64: QUJD First, set is to brek 8-bit blocks into 6-bit blocks, nd then convert: x44243 b b 6 2 9

More information

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1

a < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1 Mth 33 Volume Stewrt 5.2 Geometry of integrls. In this section, we will lern how to compute volumes using integrls defined by slice nlysis. First, we recll from Clculus I how to compute res. Given the

More information

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming

Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming Lecture 10 Evolutionry Computtion: Evolution strtegies nd genetic progrmming Evolution strtegies Genetic progrmming Summry Negnevitsky, Person Eduction, 2011 1 Evolution Strtegies Another pproch to simulting

More information

Course Administration

Course Administration /4/7 Spring 7 EE 363: Computer Orgniztion Arithmetic for Computers Numer Representtion & ALU Avinsh Kodi Deprtment of Electricl Engineering & Computer Science Ohio University, Athens, Ohio 457 E-mil: kodi@ohio.edu

More information

INTRODUCTION TO SIMPLICIAL COMPLEXES

INTRODUCTION TO SIMPLICIAL COMPLEXES INTRODUCTION TO SIMPLICIAL COMPLEXES CASEY KELLEHER AND ALESSANDRA PANTANO 0.1. Introduction. In this ctivity set we re going to introduce notion from Algebric Topology clled simplicil homology. The min

More information

1 Quad-Edge Construction Operators

1 Quad-Edge Construction Operators CS48: Computer Grphics Hndout # Geometric Modeling Originl Hndout #5 Stnford University Tuesdy, 8 December 99 Originl Lecture #5: 9 November 99 Topics: Mnipultions with Qud-Edge Dt Structures Scribe: Mike

More information

In the last lecture, we discussed how valid tokens may be specified by regular expressions.

In the last lecture, we discussed how valid tokens may be specified by regular expressions. LECTURE 5 Scnning SYNTAX ANALYSIS We know from our previous lectures tht the process of verifying the syntx of the progrm is performed in two stges: Scnning: Identifying nd verifying tokens in progrm.

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology

More information

Study Guide for Exam 3

Study Guide for Exam 3 Mth 05 Elementry Algebr Fll 00 Study Guide for Em Em is scheduled for Thursdy, November 8 th nd ill cover chpters 5 nd. You my use "5" note crd (both sides) nd scientific clcultor. You re epected to no

More information

10.5 Graphing Quadratic Functions

10.5 Graphing Quadratic Functions 0.5 Grphing Qudrtic Functions Now tht we cn solve qudrtic equtions, we wnt to lern how to grph the function ssocited with the qudrtic eqution. We cll this the qudrtic function. Grphs of Qudrtic Functions

More information

9.1 apply the distance and midpoint formulas

9.1 apply the distance and midpoint formulas 9.1 pply the distnce nd midpoint formuls DISTANCE FORMULA MIDPOINT FORMULA To find the midpoint between two points x, y nd x y 1 1,, we Exmple 1: Find the distnce between the two points. Then, find the

More information

Stack. A list whose end points are pointed by top and bottom

Stack. A list whose end points are pointed by top and bottom 4. Stck Stck A list whose end points re pointed by top nd bottom Insertion nd deletion tke plce t the top (cf: Wht is the difference between Stck nd Arry?) Bottom is constnt, but top grows nd shrinks!

More information

CS201 Discussion 10 DRAWTREE + TRIES

CS201 Discussion 10 DRAWTREE + TRIES CS201 Discussion 10 DRAWTREE + TRIES DrwTree First instinct: recursion As very generic structure, we could tckle this problem s follows: drw(): Find the root drw(root) drw(root): Write the line for the

More information

CSCI 104. Rafael Ferreira da Silva. Slides adapted from: Mark Redekopp and David Kempe

CSCI 104. Rafael Ferreira da Silva. Slides adapted from: Mark Redekopp and David Kempe CSCI 0 fel Ferreir d Silv rfsilv@isi.edu Slides dpted from: Mrk edekopp nd Dvid Kempe LOG STUCTUED MEGE TEES Series Summtion eview Let n = + + + + k $ = #%& #. Wht is n? n = k+ - Wht is log () + log ()

More information

Simplifying Algebra. Simplifying Algebra. Curriculum Ready.

Simplifying Algebra. Simplifying Algebra. Curriculum Ready. Simplifying Alger Curriculum Redy www.mthletics.com This ooklet is ll out turning complex prolems into something simple. You will e le to do something like this! ( 9- # + 4 ' ) ' ( 9- + 7-) ' ' Give this

More information

ECE 468/573 Midterm 1 September 28, 2012

ECE 468/573 Midterm 1 September 28, 2012 ECE 468/573 Midterm 1 September 28, 2012 Nme:! Purdue emil:! Plese sign the following: I ffirm tht the nswers given on this test re mine nd mine lone. I did not receive help from ny person or mteril (other

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology

More information

Fig.25: the Role of LEX

Fig.25: the Role of LEX The Lnguge for Specifying Lexicl Anlyzer We shll now study how to uild lexicl nlyzer from specifiction of tokens in the form of list of regulr expressions The discussion centers round the design of n existing

More information

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications.

Fall 2018 Midterm 1 October 11, ˆ You may not ask questions about the exam except for language clarifications. 15-112 Fll 2018 Midterm 1 October 11, 2018 Nme: Andrew ID: Recittion Section: ˆ You my not use ny books, notes, extr pper, or electronic devices during this exm. There should be nothing on your desk or

More information

Integration. September 28, 2017

Integration. September 28, 2017 Integrtion September 8, 7 Introduction We hve lerned in previous chpter on how to do the differentition. It is conventionl in mthemtics tht we re supposed to lern bout the integrtion s well. As you my

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology

More information

CSE 401 Midterm Exam 11/5/10 Sample Solution

CSE 401 Midterm Exam 11/5/10 Sample Solution Question 1. egulr expressions (20 points) In the Ad Progrmming lnguge n integer constnt contins one or more digits, but it my lso contin embedded underscores. Any underscores must be preceded nd followed

More information

Address/Data Control. Port latch. Multiplexer

Address/Data Control. Port latch. Multiplexer 4.1 I/O PORT OPERATION As discussed in chpter 1, ll four ports of the 8051 re bi-directionl. Ech port consists of ltch (Specil Function Registers P0, P1, P2, nd P3), n output driver, nd n input buffer.

More information

Introduction to Computer Engineering EECS 203 dickrp/eecs203/ CMOS transmission gate (TG) TG example

Introduction to Computer Engineering EECS 203  dickrp/eecs203/ CMOS transmission gate (TG) TG example Introduction to Computer Engineering EECS 23 http://ziyng.eecs.northwestern.edu/ dickrp/eecs23/ CMOS trnsmission gte TG Instructor: Robert Dick Office: L477 Tech Emil: dickrp@northwestern.edu Phone: 847

More information

Integration. October 25, 2016

Integration. October 25, 2016 Integrtion October 5, 6 Introduction We hve lerned in previous chpter on how to do the differentition. It is conventionl in mthemtics tht we re supposed to lern bout the integrtion s well. As you my hve

More information

MATH 25 CLASS 5 NOTES, SEP

MATH 25 CLASS 5 NOTES, SEP MATH 25 CLASS 5 NOTES, SEP 30 2011 Contents 1. A brief diversion: reltively prime numbers 1 2. Lest common multiples 3 3. Finding ll solutions to x + by = c 4 Quick links to definitions/theorems Euclid

More information

LAB L Hardware Building Blocks

LAB L Hardware Building Blocks LAB L Hrdwre Building Blocks Perform the following groups of tsks: LL1.v 1. In previous l we creted the 2-to-1 mux shown in the left prt of the figure elow nd found tht it cts s n if sttement. c c 0 1

More information

UT1553B BCRT True Dual-port Memory Interface

UT1553B BCRT True Dual-port Memory Interface UTMC APPICATION NOTE UT553B BCRT True Dul-port Memory Interfce INTRODUCTION The UTMC UT553B BCRT is monolithic CMOS integrted circuit tht provides comprehensive MI-STD- 553B Bus Controller nd Remote Terminl

More information

Matrices and Systems of Equations

Matrices and Systems of Equations Mtrices Mtrices nd Sstems of Equtions A mtri is rectngulr rr of rel numbers. CHAT Pre-Clculus Section 8. m m m............ n n n mn We will use the double subscript nottion for ech element of the mtri.

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology

More information

Angle properties of lines and polygons

Angle properties of lines and polygons chievement Stndrd 91031 pply geometric resoning in solving problems Copy correctly Up to 3% of workbook Copying or scnning from ES workbooks is subject to the NZ Copyright ct which limits copying to 3%

More information

COMPUTER SCIENCE 123. Foundations of Computer Science. 6. Tuples

COMPUTER SCIENCE 123. Foundations of Computer Science. 6. Tuples COMPUTER SCIENCE 123 Foundtions of Computer Science 6. Tuples Summry: This lecture introduces tuples in Hskell. Reference: Thompson Sections 5.1 2 R.L. While, 2000 3 Tuples Most dt comes with structure

More information

Unit 5 Vocabulary. A function is a special relationship where each input has a single output.

Unit 5 Vocabulary. A function is a special relationship where each input has a single output. MODULE 3 Terms Definition Picture/Exmple/Nottion 1 Function Nottion Function nottion is n efficient nd effective wy to write functions of ll types. This nottion llows you to identify the input vlue with

More information

Engineer To Engineer Note

Engineer To Engineer Note Engineer To Engineer Note EE-169 Technicl Notes on using Anlog Devices' DSP components nd development tools Contct our technicl support by phone: (800) ANALOG-D or e-mil: dsp.support@nlog.com Or visit

More information

4452 Mathematical Modeling Lecture 4: Lagrange Multipliers

4452 Mathematical Modeling Lecture 4: Lagrange Multipliers Mth Modeling Lecture 4: Lgrnge Multipliers Pge 4452 Mthemticl Modeling Lecture 4: Lgrnge Multipliers Lgrnge multipliers re high powered mthemticl technique to find the mximum nd minimum of multidimensionl

More information

Functor (1A) Young Won Lim 8/2/17

Functor (1A) Young Won Lim 8/2/17 Copyright (c) 2016-2017 Young W. Lim. Permission is grnted to copy, distribute nd/or modify this document under the terms of the GNU Free Documenttion License, Version 1.2 or ny lter version published

More information

Functor (1A) Young Won Lim 10/5/17

Functor (1A) Young Won Lim 10/5/17 Copyright (c) 2016-2017 Young W. Lim. Permission is grnted to copy, distribute nd/or modify this document under the terms of the GNU Free Documenttion License, Version 1.2 or ny lter version published

More information

Engineer To Engineer Note

Engineer To Engineer Note Engineer To Engineer Note EE-188 Technicl Notes on using Anlog Devices' DSP components nd development tools Contct our technicl support by phone: (800) ANALOG-D or e-mil: dsp.support@nlog.com Or visit

More information

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis

CS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis CS143 Hndout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexicl Anlysis In this first written ssignment, you'll get the chnce to ply round with the vrious constructions tht come up when doing lexicl

More information

Rational Numbers---Adding Fractions With Like Denominators.

Rational Numbers---Adding Fractions With Like Denominators. Rtionl Numbers---Adding Frctions With Like Denomintors. A. In Words: To dd frctions with like denomintors, dd the numertors nd write the sum over the sme denomintor. B. In Symbols: For frctions c nd b

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology

More information

Enginner To Engineer Note

Enginner To Engineer Note Technicl Notes on using Anlog Devices DSP components nd development tools from the DSP Division Phone: (800) ANALOG-D, FAX: (781) 461-3010, EMAIL: dsp_pplictions@nlog.com, FTP: ftp.nlog.com Using n ADSP-2181

More information

Eliminating left recursion grammar transformation. The transformed expression grammar

Eliminating left recursion grammar transformation. The transformed expression grammar Eliminting left recursion grmmr trnsformtion Originl! rnsformed! 0 0! 0 α β α α α α α α α α β he two grmmrs generte the sme lnguge, but the one on the right genertes the rst, nd then string of s, using

More information

Essential Question What are some of the characteristics of the graph of a rational function?

Essential Question What are some of the characteristics of the graph of a rational function? 8. TEXAS ESSENTIAL KNOWLEDGE AND SKILLS A..A A..G A..H A..K Grphing Rtionl Functions Essentil Question Wht re some of the chrcteristics of the grph of rtionl function? The prent function for rtionl functions

More information

CHAPTER III IMAGE DEWARPING (CALIBRATION) PROCEDURE

CHAPTER III IMAGE DEWARPING (CALIBRATION) PROCEDURE CHAPTER III IMAGE DEWARPING (CALIBRATION) PROCEDURE 3.1 Scheimpflug Configurtion nd Perspective Distortion Scheimpflug criterion were found out to be the best lyout configurtion for Stereoscopic PIV, becuse

More information

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy Recognition of Tokens if expressions nd reltionl opertors if è if then è then else è else relop

More information

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards A Tutology Checker loosely relted to Stålmrck s Algorithm y Mrtin Richrds mr@cl.cm.c.uk http://www.cl.cm.c.uk/users/mr/ University Computer Lortory New Museum Site Pemroke Street Cmridge, CB2 3QG Mrtin

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd processes. Introducing technology

More information

Example: 2:1 Multiplexer

Example: 2:1 Multiplexer Exmple: 2:1 Multiplexer Exmple #1 reg ; lwys @( or or s) egin if (s == 1') egin = ; else egin = ; 1 s B. Bs 114 Exmple: 2:1 Multiplexer Exmple #2 Normlly lwys include egin nd sttements even though they

More information

Small Business Networking

Small Business Networking Why network is n essentil productivity tool for ny smll business Effective technology is essentil for smll businesses looking to increse the productivity of their people nd business. Introducing technology

More information

CMU Fall VLSI CAD

CMU Fall VLSI CAD CMU Fll 01 18-760 VLSI CAD [120 pts] Homework 2. Out Thu Sep 13, Due Thu Sep 27 01. 1. BDD ordering [10 pts] We sw tht vrible order is highly significnt for something s simple s multiplexor. How bout something

More information

ECEN 468 Advanced Digital System Design

ECEN 468 Advanced Digital System Design ECEN 468 Advnced Digitl ystem Design Lecture 7: RTL Design Copyright 2 Instructor: J. Hu High-Level tte Mchines (HLMs) 5.2 ome behviors too complex for equtions, truth tbles, or FMs Ex: od dispenser c:

More information

Voltage Monitoring Products

Voltage Monitoring Products Voltge Monitoring Products Spring 2005 CONTENTS 3-Led Reset Genertor Circuits.. 2 4-Led Reset Genertors with Mnul Reset............ 3 Wtchdog Supervisory Circuits... 4 Bttery-Bckup Supervisory Circuits...........

More information

50 AMC LECTURES Lecture 2 Analytic Geometry Distance and Lines. can be calculated by the following formula:

50 AMC LECTURES Lecture 2 Analytic Geometry Distance and Lines. can be calculated by the following formula: 5 AMC LECTURES Lecture Anlytic Geometry Distnce nd Lines BASIC KNOWLEDGE. Distnce formul The distnce (d) between two points P ( x, y) nd P ( x, y) cn be clculted by the following formul: d ( x y () x )

More information

Pipeline Example: Cycle 1. Pipeline Example: Cycle 2. Pipeline Example: Cycle 4. Pipeline Example: Cycle 3. 3 instructions. 3 instructions.

Pipeline Example: Cycle 1. Pipeline Example: Cycle 2. Pipeline Example: Cycle 4. Pipeline Example: Cycle 3. 3 instructions. 3 instructions. ipeline Exmple: Cycle 1 ipeline Exmple: Cycle X X/ /W X X/ /W $3,$,$1 lw $,0($5) $3,$,$1 3 instructions 8 9 ipeline Exmple: Cycle 3 ipeline Exmple: Cycle X X/ /W X X/ /W sw $6,($7) lw $,0($5) $3,$,$1 sw

More information

Transparent neutral-element elimination in MPI reduction operations

Transparent neutral-element elimination in MPI reduction operations Trnsprent neutrl-element elimintion in MPI reduction opertions Jesper Lrsson Träff Deprtment of Scientific Computing University of Vienn Disclimer Exploiting repetition nd sprsity in input for reducing

More information

Concepts Introduced. A 1-Bit Logical Unit. 1-Bit Half Adder (cont.) 1-Bit Half Adder

Concepts Introduced. A 1-Bit Logical Unit. 1-Bit Half Adder (cont.) 1-Bit Half Adder oncepts Introduced A -Bit Logicl Unit sic rithmetic/logic unit clocks ltches nd ip-ops registers SRAMs nd RAMs nite stte mchines Below is -it logicl unit tht performs AN nd OR opertions Both the AN nd

More information