We start by describing a one bit memory circuit built of a couple of two inputs NAND gates.

Size: px
Start display at page:

Download "We start by describing a one bit memory circuit built of a couple of two inputs NAND gates."

Transcription

1 Chapter 4: Sequetial Logic ( copyright by aiel Seider) Util ow we discussed circuits that are combiatioal. This meas that their outputs were fuctios of the iputs, ad oly the iputs, at all times. For each combiatio at the iputs of the circuit, we got a certai output. Wheever that iput combiatio is chaged, the output chages accordigly. There is aother kid of circuits i which the outputs do ot deped solely o the iputs but also o the previous values of the outputs. This kid of circuits icludes closed loops, sometimes called feedback coectios. These circuits have the ability of rememberig their state uder some coditios ad ca therefore be used to build memory devices. These circuits are called sequetial logic. I this chapter we discuss sequetial logic. We start by describig a oe bit memory circuit built of a couple of two iputs NAN gates. 4.) SR latch A Set-Reset latch (SR latch) is a bit memory device which is built of two NAN gates. The output of the upper NAN gate is coected to oe of the iputs of the lower NAN gate. The output of the lower NAN gate is coected to oe of the iputs of the upper NAN gate, thus, closig a loop. These coectios are the feedback coectios. We will immediately see that this circuit has two stable states. We mark the upper output by ad the lower by, sice as we ll soo see, i most of the cases is the NOT of. These two NAN gates with the feedback coectios cosist a latch. Latches are sometimes mistakely referred to as Flip-Flops i literature. The differece betwee Latches ad Flip-flops will be explaied later i this chapter. S R Figure 4. SR latch We deoted the two iputs of the latch as S ad R. Let us first aalyze the behavior of this latch whe we put a logical level of 0 i the two iputs S ad R. Let s assume that =. Therefore, the lower NAN gate has i both iputs ad we must have = 0. This 0 forces to stay. So, we coclude that the combiatio of = ad = 0 is a stable combiatio.

2 Chapter 4: Sequetial Logic 2 ( copyright by aiel Seider) Let us assume ow that = 0. Therefore, the lower NAN gate must output a. This meas that we have i both iputs of the upper NAN ad so we still force to stay 0. This meas that the combiatio of = 0 ad = is also a stable combiatio. Let us assume that we have a 0 i ad i. We immediately see that both of the NAN gates have 0 i their iputs. This meas that they both wat to chage their output to. Let us suppose that the upper gate is a little bit faster tha the lower gate. So, the becomes before the is chagig. We therefore reached oe of the two stable states metioed above, i.e., the latch remais i the state of = ad = 0. I case the lower gate is faster, the latch will reach the other stable state. We coclude that 0 i both, ad, is a ustable situatio. A similar behavior is see whe we start with i ad i. Both NAN gates have s i both their iputs. Both outputs wish to become 0. The faster gate wis this race ad so we will evetually fid the latch i oe of the stable states. We ow wat to use this latch as a bit memory device. The output will have the value remembered by this device. Whe we wat to set to be we eed to put i the S iput for a short time. The forces the to be sice after the iverter we have a 0 as a iput to the upper NAN gate, which forces i its output. We already kow that i causes 0 i the sice both iputs of the lower NAN gate are. Note that this sequece of evets took some time. The i the S iput propagated through the iverter ad the through the upper NAN gate ad the through the lower NAN gate. I case all those gates has the same propagatio delay t pd the after 3t pd we have 0 i the output of the latch. This meas that we ca ow remove the from the S iput, sice the is already 0 ad will keep the i the. (Oe might wait a extra t pd just to be sure that the 0 of the holds the i, but o more tha that). This process is described i Figure 4.2 below. S After iverter t pd Sim ilarl t pd t pd Figure 4.2 Settig the

3 Chapter 4: Sequetial Logic 3 ( copyright by aiel Seider) y, i order to reset the to be 0, we eed to put i the R iput for a short time. Sice the circuit is symmetric, the same process causes to become which, i tur, causes to become 0. Figure 4.3 describes the waveforms whe we set the latch twice ad the reset it ad set it agai: S R set set reset set Figure 4.3 Settig ad resettig the We call the situatio i which S = R = 0, the idifferet iput combiatio. I this situatio the iputs of the latch do ot force the value of the outputs. The outputs determie their ow state i such case, i.e., their state remais the same as it was before we reached the idifferet iput combiatio. Let us ow describe the truth table of the SR-latch: S R ?

4 Chapter 4: Sequetial Logic 4 ( copyright by aiel Seider) This table tells us what is the value of the after the + evet of settig or resettig it. The case of S=R= 0 is the idifferet situatio i which the latch stays i its previous state. Thus, + i this case is the same as. Whe S= 0 ad R= we reset the latch therefore causig to be 0. Whe S= ad R= 0 we set the latch therefore causig to be. What about havig both S ad R to be? Lookig at Figure 4. we see that i this case both outputs, ad are. We already discussed such a case ad decided that it is a ustable situatio. But this is oly ustable whe the two iputs are 0. I our case we claim that they are. So, why did we put the questio mark there? It is correct that both the outputs are whe both iputs are. However, we eed to remember how we used the latch. We issued pulses i the iputs. We should have used pulses as iputs to the truth-table: S R ? So what will the be after issuig such a pulse to the two iputs at the exact same time? Whe the pulse eds, we have = = but ow the two iputs are 0. Sice = = is a ustable state, we would get to oe of the two stable states of the latch. But, which oe? No oe kows. Therefore, we put the questio mark i the table. Therefore this combiatio of the iputs is called forbidde ad should be avoided. 4.2) Addig a gate to the SR latch Let us ow cosider the followig circuit: S R G Figure 4.4 A gated SR latch

5 Chapter 4: Sequetial Logic 5 ( copyright by aiel Seider) Its truth table is: G S R + 0 X X ? Whe G is 0, we are i the idifferet situatio, sice it is idetical to the case i which S=R= 0. Whe we issue a pulse i G, we eable the S ad R iputs to ifluece o the latch the way they did i the regular SR latch. We ca imagie ow a system i which we issue a pulse i G every so ad so secods. The umber we attached to i the truth-table, makes more sese ow. is the value of followig the -th pulse i G. S R G Figure 4.5 Settig ad resettig the

6 Chapter 4: Sequetial Logic 6 ( copyright by aiel Seider) Notice that here, the chace of havig ukow output still exists sice if S=R=, a pulse i G defiitely brigs us ito the doubtful temporary situatio of havig both output i ad, whe the pulse eds, two iputs i 0. Figure 4.5 describes the whe R ad S have the 4 possible combiatios. I each G pulse the output follows the truth-table. So we first set to sice we have S= ad R= 0. The, stays uchaged although we issued a pulse at G, sice we had S=R= 0. The, S= 0 ad R= chages to 0. Evetually, we issue a pulse i G whe S=R=. From the time this pulse eds, we do ot kow what is util Aother pulse i G with S R. 4.3) A -latch We saw that the SR latch is capable of storig oe bit of data. However, it seems a little bit complicated to set it ad reset it usig two iputs. We probably would prefer to use a simpler versio of that latch which gets a sigle bit at its iput ad stores it wheever G is. A additioal iverter will do this miracle: G Figure 4.6 latch This ew latch, called a -latch is simpler to use.

7 Chapter 4: Sequetial Logic 7 ( copyright by aiel Seider) From its truth-table G + 0 X 0 0 we see that the -latch is trasparet whe G=, i.e., the output follows the iput (with a small delay). Whe G is chaged to 0 the circuit becomes locked. It latches the data that was i the iput (ad therefore also at the output) at the miute of chagig the G from to 0. G locked locked locked trasparet trasparet Figure 4.7 -latch waveforms Istead of drawig the 4 NAN gates formig the -latch, we have a special drawig for - latch: G Figure latch

8 Chapter 4: Sequetial Logic 8 ( copyright by aiel Seider) We ca build a shift register usig -latches. A 3 bits shift register is built of 3 -latches coected i series. The output of the st -latch is coected to the iput of the ext -latch ad so o, as draw below: ata i 0 0 ata out G G G GF Figure A shift register made of latches Let us assume that the data iside the shift register is 00 as i Figure 4.9. We wat to eter a to the first (the left had side) latch. The we wat the data i the register to move or to shift oe positio to the right. Whe issuig a short pulse i G, the latches become trasparet. So each iput data goes through the latch to the output as we desired. However, there is a chace that the 2d latch reacts so fast that the data propagates through 2 latches durig the same pulse i G. There are several solutios to avoid this disastrous behavior. The simplest way is to add delay elemets betwee the latches, each havig a delay larger tha the width of the pulse give at G. This esures that the old data at the iput of a latch, stays there durig the period of time i which G is ad the latch is trasparet. The data i the iput will therefore chage oly after the latch becomes locked ad so there is o dager of propagatio of the data through two or more stages. ata i tpd tpd G G G G t pulse < t pd Figure A shift register made of latches ad delay elemets This way of hadlig the race betwee the data propagatig through the register ad the pulse i G, is ot the cosidered as good practice owadays. The preferred solutio is to covert the

9 Chapter 4: Sequetial Logic 9 ( copyright by aiel Seider) latches ito a Master-Slave Flip Flops. Before turig to explai that solutio we would like to discuss oe or two last examples of latches. 4.4) The JK-latch The JK latch behaves similarly to the SR-latch with oe exceptio. Here a i both iput is allowed. J K G Figure 4. A JK latch The aalysis of this latch is similar to the aalysis doe for the SR-latch. We see that havig G= 0 is equal to havig J=K= 0 which is idetical to havig S=R= 0 i the SR-latch. We ca see that o matter what is the iitial state of the latch, havig J= ad K= 0 causes to become which i tur causes to become 0. The oly chage here is that this 0 i the eutralizes the i the J iput. But this happes after the chage, i.e., whe the is already i its correct state. Whe J=K= we ca cosider the feedback lies we added as coectig the to the S iput of a SR-latch ad coectig the to the R iput of a SR-latch. This meas that the latch will ivert its state sice whe we have = ad = 0 we force 0 to S ad to R ad vice versa. So we get the followig truth-table:

10 Chapter 4: Sequetial Logic 0 ( copyright by aiel Seider) G J K + 0 X X A latch that chages its state i every pulse i G is called a T-latch where T stads for toggle. Whe we have J=K=, the JK-latch behaves as a regular T-latch. It is uderstood that we ca create a T-latch easily by coectig the of a SR-latch to the R iput ad the to the S iput. We otice that T-latch or a JK-latch with i the J ad K iputs have also a race problem. Whe G= the latch chages its state. Now, whe this chage is completed, the feedback to the iputs is also iverted. Therefore, if the pulse i G is too log, there might be aother toggle of the latch, back to its origial state! Agai, we ca solve this problem by addig delay elemets i the two feedback lies. Agai, the preferred solutio is to use the Master-Slave method. 4.5) A Master-Slave -FF As we will see i a miute, the memory device we itroduce ow will be edge sesitive ad ot level sesitive. By that we mea that the -latch was trasparet whe the level at the G iput was. A Mater-Slave -FF (MS -FF), will acquire, or sample, the data i its iput at the risig edge of the Clock iput (). We cosider all memory devices which are level sesitive as latches ad all the memory devices that are edge sesitive as Flip-Flops. Latches are trasparet at certai times, Flip-Flops are ever trasparet.

11 Chapter 4: Sequetial Logic ( copyright by aiel Seider) The followig drawig describes a Master-Slave -FF: P R Figure 4.2 A Master-Slave -FF This circuit is actually two -latches i series as show below: G G Figure MS -FF as two -latches The priciple of operatio is simple. Whe the clock sigal () is 0 the left had side latch, called the Master, is trasparet. Therefore follows the iput. At this time, the right had side latch, called the slave, is locked ad stays without a chage. Whe the chages from 0 to, i.e., exactly at the risig edge of the, the Master latch gets locked, keepig its output,, as it was exactly before the risig edge of the. At the same time, the slave becomes trasparet. Therefore, we get the value of i. The result is that we have a bit memory device which is loaded at the risig edge of the, with the data that was i its iput just before the risig edge of the. Chagig the data at the iput whe the is has

12 Chapter 4: Sequetial Logic 2 ( copyright by aiel Seider) o ifluece o the output sice at that time the master latch is locked. Whe is chaged to 0, the Master latch becomes trasparet, but the output still does ot chage eve if the iput is chagig sice at that exact time, the Slave latch gets locked ad so it keeps the output util the ext risig edge of the. This is show i Figure 4.4 below: Master is trasparet. follows the iput Master is locked does t chage. Slave is trasparet so gets Figure MS -FF behavior Note that we could have built the FF to be sesitive to the fallig edge by just movig the iverter from the Master latch to the Slave latch. We cosider a Master-Slave -FF as a device lookig at the data at its iput at the time of the risig edge of the sigal. That data appears at the output immediately after the risig edge of the. This is the exact way we should aalyze ay system havig MS -FFs. The P ad R iputs are sometimes used to Preset or Reset the -FF asychroously, i.e., with o relatio to the, e.g., at system iitializatio.

13 Chapter 4: Sequetial Logic 3 ( copyright by aiel Seider) Before we go ito some timig issues i detail, we would like to show that this ew setup eables us to build a shift register. We use a special drawig for -FFs. It is very similar to the -latch except that the iput is marked by a small triagle. (I FFs which are sesitive to the fallig edge of the we also add a circle to the iput). Figure 4.5a - A risig edge triggered -FF Figure 4.5b - A fallig edge triggered -FF A shift register will therefore look like this: ata i 0 0 Figure Shift register made of FFs Whe is, the outputs of the masters, i.e., the s, are trasferred to the FFs outputs. Let us assume that i this case we see the combiatio of 00 i the register (i the 3 outputs), as i Figure 4.6 above. Whe goes low, the slaves get locked, so the 3 outputs do ot chage. However, the masters become trasparet, so ew data goes ito the s, i.e., ito the middle of the FFs, as is described by the arrows i Figure 4.7 below. The data stays there, waitig for the risig edge of the. ata i 0 0 = Figure Shift register with = 0

14 Chapter 4: Sequetial Logic 4 ( copyright by aiel Seider) Whe the risig edge of the comes, the masters get locked right away. The slaves the become trasparet, ad trasfer the data that was i the middle of the FFs to the outputs: ata i 0 = Figure Shift register with = Although the data propagated through oe FF, it caot cotiue to propagate through the ext FF sice the masters are locked. This meas that i every risig edge of the, the data will be shifted oe positio to the right, which is exactly what we wat. Note that we ca use groups of flip-flops arraged as a shift register, but we ca also arrage those as a register gettig separate bits at its iput, thus keepig a bits umber. Sice all FFs are coected to the sigal, wheever the risig edge of the arrives, this register will sample its iput lies ad will update the umber it keeps. We usually draw such a register as a sigle box as show i the right had side of Figure 4.9 below. 0 0 [-:0] [-:0] - - Figure 4.9 A bits register

15 Chapter 4: Sequetial Logic 5 ( copyright by aiel Seider) 4.6) Timig issues i MS FFs We uderstad that the data at the iput of a MS -FF is sampled at the risig edge of the. What if we chage the data exactly at that time? We, ad the FF, caot decide which is the right value to be sampled ito the FF. So, a iterestig questio is: How log before the risig edge of the should the data be valid at the iput of the FF? The aswer is that we have to set to its fial value, i.e., the value we wat to be stored i the FF by the risig edge of the, leavig eough time for the delays of the iverter ad the 2 NAN gates at the iput of the Master latch, ad for the delays of the two NAN gates cosistig the Master latch, so the value is updated to the fial value before we are allowed to give the risig edge of the. If we will ot leave the iput data hagig there for eough time, we might issue the risig edge at a time i which both outputs of the Master are equal (which happes oly for a short time). I such a case we caot be sure that the output of the Master will have the value we meat it to have, sice we just did ot let the circuit eough time to stabilize. The requited time we eed to keep the data valid ad stable at the iput prior to the risig edge of the is called the setup time. Aother iterestig questio is: Whe ca we remove the data from the iput after the risig edge of the? The aswer to this questio is that we also eed to wait some time. At least, we have to wait util the 2 NAN gates at the iputs of the Master latch are blocked so a chage i will ot pass through ito the Master before it becomes locked. The required time we have to keep the data valid ad stable at the iput after the risig edge of the is called the hold time. The third ad last questio is; How log will it take to the data to appear at the output of the FF after the risig edge of the? This time depeds of the speed of the propagatio through the Slave latch. We call this time as the FF delay or to delay. These 3 importat time itervals are show i Figure t hold t setup Valid data t to Figure 4.20 Timig defiitios i MS FFs

16 Chapter 4: Sequetial Logic 6 ( copyright by aiel Seider) We had draw the two possible values of ad o the same drawig. The may trasitios of followig the risig edge of the oly mea that we do ot really kow whe the chage had occurred. The maufacturer of the -FF assures us that the maximum time that will take the trasitio to happe, for the etire temperature rage to which this FF was desiged, is t Ckto. We should always meet the setup ad hold time requiremets, otherwise we are riskig ourselves with systems which will sometimes store the data ad some times wo t, ad worse tha that, with systems that will eter a metastable situatio i which the FF does ot kow to which fial state it really should chage to, ad might get stuck i a ivalid state (ot havig valid logic levels at its output) for a log time, or oscillate. 4.7) Cotrol the writig ito a FF From ow ad o, we oly cosider MS -FFs i our desigs. The -FF loads ew data i every risig edge of the. As we will evetually see, the sigal is coected to all the FFs i the computer. Everythig happeig i the computer happes betwee the risig edge of the ad the ext risig edge of the. It is reasoable that sometimes, we would like to keep data i a certai FF without chagig (i.e., loadig) it i every. How ca we do that? The simple solutio we ca thik of is to add a AN gate o the as draw i Figure 4.2, with a sigal called the Write_Eable (WE). Whe WE is, the gets to the FF, whe the WE is 0, it is blocked, so the FF is ot clocked ad therefore keeps its data uchaged. However, this is ot a good practice. First, we make it difficult to satisfy the setup ad hold requiremets ad to assure proper operatio of the circuit. That FF receives the risig edge of the later tha other FFs i the circuit due to the delay of the AN gate we added. There is a chace that the output of aother FF which feeds the iput of our FF, will chage fast eough so it will be loaded ito our FF oe cycle too soo. Furthermore, the WE sigal itself, also depeds o the risig edge of the, i.e., it rises ad falls some time after the risig edge of the. This might cause a glitch at the ed of the WE sigal. The ed of WE follows the risig edge of, i.e., oly after gets to, the WE sigal becomes 0. This meas that for a short period of time, we have = ad WE= ad so we might get a short i. This is ot allowed, sice we caot kow what will be the FF s reactio to a very short pulse i its clock iput. (By the way, whe we use FFs which are triggered by the fallig edge of the, we do ot have such a sceario, but a glitch still may occur due to skew. What is a skew? sigals do have some skew, i.e., a slight differece i timig due to differet legths of the physical paths i the circuit. This is why we might get the WE sigal before the edge of which had created it, thus, causig a glitch i ). Sice the sychroizes the operatio of all parts i the computer, ad sice as we saw, it is difficult to touch it without havig complicatios, we always try to avoid temperig aroud with the. It is difficult eough to make all s i the system with miimal skew. We prefer to leave the utouched. This solutio is therefore ot the oe we choose.

17 Chapter 4: Sequetial Logic 7 ( copyright by aiel Seider) WE WE A glitch Figure ANig the Istead, we choose to cotrol the iput data of the FF. We add a Multiplexer at the iput of the FF. The WE sigal cotrols the Mux. Whe it is 0 the output is fed back to the -iput. Therefore, whe the risig edge of the arrives, the FF will load itself with the same data, i.e., o chage will occur. Whe the WE is, the Mux feeds the -iput directly from the ata_i iput (deoted i Figure 4.22). Therefore, after the risig edge of the, we ll have the ata_i value stored i the FF.

18 Chapter 4: Sequetial Logic 8 ( copyright by aiel Seider) Also draw as: 0 WE WE d0 d d2 d3 d4 d5 WE d0 d d4 Cycle Cycle 2 Cycle 3 Cycle 4 Cycle 5 Cycle 6 Figure 4.22 The right solutio: WE operates o the data As ca be see from Figure 4.22, the WE iflueces at the ed of the cycle i which it was issued, i.e., the risig edge of the which caused the WE to chage to is ot the oe which samples the data ito the FF. The ext risig edge of the, i.e., the oe which occurs whe the WE is already, samples the data ito the FF. The red arrows show the depedecy of the WE o the. They coect the risig edge of the which caused the WE to chage to that chage.

19 Chapter 4: Sequetial Logic 9 ( copyright by aiel Seider) Thus, the FF behaves like that: Whe the risig edge of the arrives, the FF checks whether the WE is or 0. If it is 0, o chage occurs i the FF, if it is, the iput data is writte ito the FF. We will use this rule from ow o, wheever our FFs have WE iputs. A register built of -FFs each havig a WE iput, is a register which samples its data iputs at the risig edge of the if the WE sigal was at the time of the risig edge. Otherwise, the register keeps its data uchaged. We draw a register with a WE iput as a sigle box as show i Figure 4.23 below. Note that is it made of FFs havig a WE which is idetical to a regular register with a x(2 ) mux [-:0] 0 [-:0] [-:0] [-:0] WE WE WE Figure 4.23 A register with a Write_Eable (WE) iput

20 Chapter 4: Sequetial Logic 20 ( copyright by aiel Seider) Let us ow demostrate the usage of registers with ad without WE iputs. We cosider the circuit depicted i Figure The data o the.in iputs starts with 0 ad chages to ad the to 2 ad the to 3 ad so o, o every risig edge of the. reg A reg.in[-:0] [-:0] A[-:0] B reg B[-:0] Figure registers coected by a BUS Let us first draw the sigals at the iput of the left-had side register, we called the reg. We prefer to draw all those sigals o top of each other so we get a sigle drawig of the BUS. A BUS is a buch of wires coectig several registers. Here the iput bus is deoted.in[(- ):0]. This is show i Figure 4.25 below.

21 Chapter 4: Sequetial Logic 2 ( copyright by aiel Seider).IN 0.IN.IN 2 0 Istead of specifyig each sigal separately, we draw all lies.in[-:0] or just.in together. We eed therefore to specify their value:.in = [0] 4 5 Figure 4.25 rawig of sigals o a bus So, the waveforms, i.e., the drawigs of the sigals at.in,, A ad B should be as show i Figure IN ? A ad B??? Figure 4.26 Waveforms without WE iputs

22 Chapter 4: Sequetial Logic 22 ( copyright by aiel Seider) Now we chage the circuit as depicted i Figure The -FF o the bottom creates alteratig WE_A ad WE_B sigals. WE_B is actually the NOT of WE_A. reg A reg.in[-:0] [-:0] A[-:0] WE_A B reg B[-:0] WE_B Figure 4.27 Usig registers with WE iputs So ow the waveforms resultig from the same.in are totally differet. Whe we aalyze the circuit, we remember that a register with a WE iput samples ew data oly at the risig edge of the whe the WE iput is. Sice the WE_A ad WE_B iputs alterate betwee 0 ad, chagig at each risig edge of the, the registers will sample ew data at every 2d risig edge of the. Sice WE_A is the NOT of WE_B, register A will sample the eve data ad register B will sample the odd data. This is show i Figure 4.28 below.

23 Chapter 4: Sequetial Logic 23 ( copyright by aiel Seider).IN ? WE_A WE_B A?? B???? 3 5 Figure 4.28 Waveforms with the WE iputs It is clear that by cotrollig the WE sigals we ca cotrol the data flow i the circuit. If both WE_A ad WE_B are at the risig edge of the, the both registers are loaded with ew data. If oly oe of them is, the correspodig register is loaded. If both of them are 0, oe of the two registers is loaded. The processor we will desig, as most machies, is build of two differet parts: the ata Path ad the Cotrol. The data path has registers, ALU, adders, muxes, ad memories. The cotrol uit produces all cotrol lies which determie what will be the flow of the data iside the ata Path. Now, we ca guess that this is doe usig the WE sigals of the registers. Let us give aother example of cotrollig a register. Here we would like to desig a smart Shift- Register. First we ll describe the coectios required for a shift register i which each risig edge of the shifts the data oe positio to the right. The we ll modify the coectio so the data will be shifted to the left at each. The we ll add a iput R which will determie the directio of the shift. Whe R=, the data is shifted to the right. Whe R=0, the data is shifted to the left. This is depicted i Figure 4.29.

24 Chapter 4: Sequetial Logic 24 ( copyright by aiel Seider) A Shift register which shifts to the right A Shift register which shifts to the left R A Shift register which shifts to the right whe R= ad to the left whe R=0 Figure 4.29 A smart shift register

25 Chapter 4: Sequetial Logic 25 ( copyright by aiel Seider) Istead of drawig the shift register we could have writte its equatio. The -th FF, which stores the bit of the register has a iput marked by ad its equatio is: = R + R + I a similar maer we ca desig a eve more sophisticated shift register which has 2 cotrol lies, S ad S 0. There are 4 possible combiatios to these two lies. Whe (S,S 0 )=(0,0) we wat the register to perform a left shift. Whe (S,S 0 )=(0,) we wat the register to perform a right shift. Whe (S,S 0 )=(,0) we wat the register to hold ad whe (S,S 0 )=(,) we wat the register to be loaded from a.in bus. The equatio is:. IN = S S + S S + S S + S S A exercise: esig a 8 addresses 6 bits wide sychroous memory. The memory should be built of 8 registers with WEs. The memory has 3 address lies. We put the address from which we wat to read, or to which we wat to write, o these 3 lies. The memory has 6 ata I lies o which we put the data to be writte ito the memory. The memory has also 6 ata Out lies o which we fid the data read from the memory. Make sure that you ca always read from the memory. We write ito the memory at the risig edge of the, (that is why we called it sychroous memory), ad oly if the Memory_Write (MW) sigal is.

26 Chapter 4: Sequetial Logic 26 ( copyright by aiel Seider) 4.0) State machies So far we used the sequetial devices, the FFs, to build memories. This is ot the oly usage of FFs. We ca use FFs to build State-Machies. A state machie is a system havig some predefied states. At all times the machie is i oe of these states. It may chage its state accordig to some rule that we defie. We use state-machies i the cotrol part of computers. The basic structure of a state machie is very simple. We have a State-register, keepig the curret state, ad a combiatioal system calculatig the ext state. At the risig edge of the clock (), the state-machie goes to the ext state (the state-register is loaded with that state) ad the calculatio of a ew ext state begis. state-register ext state calculatio Figure 4.30 The basic structure of a State-Machie

27 Chapter 4: Sequetial Logic 27 ( copyright by aiel Seider) A simple example of a State-Machie is a biary couter. Let us look at a 3 bits biary couter. It is a machie, built of 3 FFs, which goes from state to state at the risig edge of the. Its State- iagram, i.e., the diagram describig the states ad the trasitios betwee the states, is quite simple: S 0 S S 2 S 3 S 4 S 5 S 6 S 7 Figure 4.3- A State-iagram of a biary couter Buildig such a state machie is easy. First, we choose a biary represetatio for the 8 states. I biary couters, the most atural choice is to represet S i with the biary umber i. So we choose to represet S 0 with (0,0,0), S with (0,0,) ad so o. Now we would like to build the system which chages its states accordig to the State-iagram of Figure 4.3. We use a 3 bits register to keep the curret state. Three bits are eough, sice i this case, we have oly 8 states ad 8=2 3. The 3 bits biary couter looks therefore like that: Next state calc Figure A 3 bits biary couter

28 Chapter 4: Sequetial Logic 28 ( copyright by aiel Seider) The 3 FFs keeps the curret state. The combiatioal system which gets 0, ad 2 at its iputs, ad produces 0, ad 2 at its outputs, just calculates the ext state accordig to the curret state. This is a system from the kid we dealt with i chapter. We ca write dow its truth-table ad fid its equatios: iputs of the combiatioal system outputs of the combiatioal system We ca easily see that the equatios describig this feedback system are: = 0 0 = + = = 2 2 ( ) + ( ) = ( ) We could have foud the equatio describig the -th iput of a biary couter by ivestigatig the special behavior of Biary couters. We are goig to do just that i the followig pages. However, the method described above, i.e., writig the truth table of the i -s as a fuctio of the state register j -s, will always work.

29 Chapter 4: Sequetial Logic 29 ( copyright by aiel Seider) The mathematical calculatio we actually do i a biary couter is X=X+. The bit X will chage oly if we have carry from the additio of X[-:0]=[X -,,X 0 ] ad. This happes oly if all the bits X -, X -2,, X 2, X, X 0 are s. So the equatio of is simple: Chage polarity if all the bits lower tha are s. Stay as before, i.e., do ot chage polarity, if Not. Thus, = (... ) + (... ) This ca also be writte as = (... ) 2 0 Let us ow fid the equatio of the iput of a dow couter. I a dow couter we calculate X-. Similarly to the case of additio, X chages its polarity oly if we have borrow from the calculatio of X[-:0]-. Thus, all bits i X[-:0] must be 0 s i order to have borrow. So the equatio of will follow: Chage polarity if all the bits lower tha are 0 s. Stay as before, i.e., do ot chage polarity, if ot. or = (... ) + (... ) = ( ) + ( ) This ca also be writte as = ( ) 2 0 or = ( ) 2 0 Now we would like to add some fuctioality to the couters. The first thig is to add a Eable iput deoted E. The couter should cout oly if E=. If E= 0, the couter holds. This is simple to do. If E= ad the coditio to chage polarity is also, the we chage polarity, i ay other case we do t:

30 Chapter 4: Sequetial Logic ( copyright by aiel Seider) 30 or We ca also add a CLR cotrol lie to a couter. Wheever we have a i the CLR lie, we wat the couter to chage to zero i the ext risig edge of the. Whe CLR= 0, we wat the couter to cout regularly. The ext equatio does that by makig sure that all the iputs are 0 whe CLR=, ad so the couter becomes zero Now, we wat to have the eable lie E ad the CLR lie as well: I this equatio, CLR beats the E iput. Thus, the fuctio of the couter is: If CLR=, it clears, else if E= it couts up, else it holds. We could ask that the E iput will have the priority, i.e., that the fuctio of the couter is differet: If E= 0, the couter holds, else if CLR=, it clears, else it couts up. For this we eed to arrage the equatio somewhat differetly: Here the CLR is coditioed o E=. If E= 0, we ca disregard the CLR. We could also write: If E= 0, we have =, i.e., the couter holds. If E= ad CLR=, we have = 0, i.e., we clear the couter. If E= ad CLR= 0, we have the regular equatio of a up couter, so the couter couts up (i.e., the appropriate -s will chage their polarities). E E + + = )... ( )... ( )... ( )... ( E E + = CLR + = ] )... ( )... ( [ CLR E E + = ] )... ( )... ( [ E CLR E E + = ] )... ( )... ( [ )... ( )... ( E CLR E CLR E + + =

31 Chapter 4: Sequetial Logic 3 ( copyright by aiel Seider) The last example of a couter equatio is that of a up/dow couter who has a cotrol lie deoted UP. Whe UP=, the couter couts up. Whe UP= 0, the couter couts dow. We build its equatio from the equatio of a up couter coditioed o UP= ad the equatio of a dow couter coditioed o UP= 0 : =... ) UP + ( ( ) UP We could also request to add a CLR, Eable or Load lies with ay priority that we desire. Note that these equatios are correct for biary couters that have bits ad 2 states. It does ot work whe the couter has less tha 2 states, sice is such a case the rule that a bit chages its polarity whe all the lower bits are s, is ot correct. Let us examie the case of a biary couter that couts up to 2. We first write dow its truth-table ad the fid its equatios: iputs of the combiatioal system Outputs of the combiatioal system Note that we chose to clear the couter if for some reaso, say after power-up, we reach the state of [,]. We ca easily see that the equatios describig this feedback system are: = 0 0 = 0 This is described i Figure 4.33 below. We also added a CLR iput (draw i dashed lies).

32 Chapter 4: Sequetial Logic 32 ( copyright by aiel Seider) Next state calc. 0 0 CLR Figure A biary couter from 0 to two The rule accordig to which we chaged states i the biary couters was very simple. We always wet to the ext state. We could asks for some exteral sigal to ifluece the trasitios from state to state. Actually, we already did that i biary couters havig the Eable or CLR iputs. Followig, we see a state diagram i which we chage the state accordig to some coditios. Whe we are i state S 0, the if A= 0 we stay i state S 0. If A= we go to state S. From state S we go to S 2 if B= ad retur to S 0 if B= 0. From S 2 we go to S 0 if A= ad stay i S 2 if ot. A ad B are the iputs of the state-machie. This is very similar to a flow chart describig a computer program. Note that the OR of all coditios goig out from a certai state, must be. Otherwise, it meas that uder some coditio we wo t be able to decide where to go.

33 Chapter 4: Sequetial Logic 33 ( copyright by aiel Seider) A=0 S 0 A= S B=0 A= B= S 3 S 2 A=0 Figure 4.34 A State iagram with iput coditios I order to support iput coditios, the oly chage we eed to do i the structure of the State- Machie of Figure 4.30, is to add the sigals A ad B as iputs to the Next state calculatio part of the system, as i Figure 4.35 below. state-register ext state calculatio iputs m Figure 4.35 A State-Machie with m iputs For our example, we eed at least 2 bits to represet the 3 states S 0, S ad S 2. We choose the represetatio, i.e., the codig of the states to be: S 0 =(0,0), S =(0,) ad S 2 =(,0). We otice that two bits have 4 possible combiatios. Thus, we have to make sure that the 4-th combiatio, (,), ever occurs. Otherwise, it is possible that whe the system is powered up, the state register will have this 4-th state as its iitial state. I case we do ot iitialize the State-Machie with a RESET sigal (which could be asychroous, i.e, coected to the R or P iputs described i sectio 4.5), there is a chace that we get stuck i this 4-th state. I some cases, there are more

34 Chapter 4: Sequetial Logic 34 ( copyright by aiel Seider) tha a sigle u-used state ad we could loop iside those states forever. To avoid such a case, we add the 4-th state, called S 3, to out diagram, ad force the State-Machie to go from that state to S 0. So here we have the truth-table of the ext state calculatio system: iputs Outputs A B X X X X X 0 0 X X X 0 0 We see that the equatios describig this feedback system are: = A 0 0 = + B A 0 0 Note that we have arbitrarily chose a certai represetatio of the states. We could have chose other represetatios such as S 0 =(0,), S =(,0) S 2 =(,) or eve a Oe-hot represetatio of S 0 =(0,0,), S =(0,,0) S 2 =(,0,0). Some represetatios are easier to decode, some require less gates, etc. We choose whatever represetatio we like. I case we would have chose the Oe-hot represetatio, the truth-table would have bee: Iputs Outputs A B X X X X X X X X All other states 0 0

35 Chapter 4: Sequetial Logic 35 ( copyright by aiel Seider) Ad the equatios: = A B A ( ) = A 2 0 = B A We ow wish to modify the structure of the State-Machie so that we could issue output sigals at certai states. Suppose we wat to issue i the output lie called Z wheever we are i state S 0 or S. Suppose we also wat to have i aother output, called Y, wheever we are i states S ad S 2. We update the state diagram to show us our requested outputs: A=0 S 0 Z= A= B=0 S Z=,Y= A= B= S 3 S 2 Y= A=0 Figure 4.36 A State iagram with iputs ad outputs We usually write the active outputs iside the states i which they are active. All other outputs have their default value which is cosidered 0 uless otherwise specified.

36 Chapter 4: Sequetial Logic 36 ( copyright by aiel Seider) I order to support this by our state-machie we have to add a output decoder with the truthtable of: iputs outputs 0 Y Z ?? We have chose that Y ad Z are 0 whe [, 0 ]=[,]. The equatios describig this decoder are: Z = Y = + = (Note that i case of a Oe Hot represetatio, the output decoder is made of OR gates oly). So we have reached the complete structure of a Moore State-Machie give i Figure 4.37 below. state-register ext state calculatio output decoder k m Figure 4.37 A complete Moore State-Machie

37 Chapter 4: Sequetial Logic 37 ( copyright by aiel Seider) A good example demostratig the relatio betwee the states, the iputs ad the outputs is a state machie of a traffic sigal. It has oe iput, a butto that is pressed by the policema operatig the sigal. It has three outputs, the Gree Yellow ad Red lights. It has may states as described i the ext diagram: Butto ot pressed Butto ot pressed Red (R= ) Butto pressed YellowRed (Y=R= ) Gree (G= ) Butto pressed Off Gree2 (G= ) Off2 Gree3 Off3 Yellow (G= ) (Y= ) Figure 4.38 A State-iagram of a traffic sigal I this example, we see clearly that the outputs deped o the states. The red output is o i two states. There are states i which o output is o, etc. We see that the decoder that produces the outputs should oly cosider the curret state ad ot the iput. The iput oly determies the trasitio from certai states to some other states, ad so it has to be cosidered i desigig the ext state calculatio block.

38 Chapter 4: Sequetial Logic 38 ( copyright by aiel Seider) We will use State-Machie to build the cotrol part of computers. Their iputs will be the istructio bits ad their outputs will be the cotrol sigals. We should kow that i some cases we would like to avoid decodig o output sigals, e.g., whe it is importat to keep a certai output at also durig the trasitio betwee states ad to avoid glitches. Such outputs will have their ow FF, i.e., o decodig. I the example of Figure 4.36, Z is such a output while Y may have a glitch if durig the trasitio from S (0,) to S 2 (,0) we temporarily have (0,0) or (,). We also should kow that sometimes the iputs should ifluece the outputs directly, i.e., immediately ad ot at the ext risig edge of the. This caot be doe by a Moore State- Machie demostrated i Figure I order to support such requiremet, we must used aother structure of a State-Machie called a Meally State-Machie, which is described i Figure 4.39 below. state-register ext state calculatio output decoder k m Figure 4.39 A complete Meally State-Machie Meally state-machie ca be more efficiet tha Moore state-machie, i.e., less logic is required to produce the same behavior. However, whe two Meally stste-machies are coected i series, the miimal clock cycle is decreased, while the Moore state-machie has o such limitatio. Now we have all the ecessary kowledge to build a computer. We will defie its laguage, i.e., its istructio set. From that we will build the ata-path, i.e., the registers, ALU, Memories ad all other data storig ad maipulatig devices which perform the istructios we defied, ad the, we ll add the proper cotrol circuit which is implemeted usig a state machie.

6.111 Lecture 6 Today: 1.Blocking vs. non-blocking assignments 2.Single clock synchronous circuits 3.Finite State Machines

6.111 Lecture 6 Today: 1.Blocking vs. non-blocking assignments 2.Single clock synchronous circuits 3.Finite State Machines 6. Lecture 6 Today:.Blockig vs. o-blockig assigmets 2.Sigle clock sychroous circuits 3.Fiite State Machies 6. Fall 25 Lecture 6, Slide I. Blockig vs. Noblockig Assigmets Coceptual eed for two kids of assigmet

More information

Annotations to the assignments and the solution sheet. Note the following points

Annotations to the assignments and the solution sheet. Note the following points WS 26/7 Trial Exam: Fudametals of Computer Egieerig Seite: Aotatios to the assigmets ad the solutio sheet This is a multiple choice examiatio, that meas: Solutio approaches are ot assessed. For each sub-task

More information

Infinite Sequences and Series

Infinite Sequences and Series Chapter 6 Ifiite Sequeces ad Series 6.1 Ifiite Sequeces 6.1.1 Elemetary Cocepts Simply speakig, a sequece is a ordered list of umbers writte: {a 1, a 2, a 3,...a, a +1,...} where the elemets a i represet

More information

6.3 Testing Series With Positive Terms

6.3 Testing Series With Positive Terms 6.3. TESTING SERIES WITH POSITIVE TERMS 307 6.3 Testig Series With Positive Terms 6.3. Review of what is kow up to ow I theory, testig a series a i for covergece amouts to fidig the i= sequece of partial

More information

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence Sequeces A sequece of umbers is a fuctio whose domai is the positive itegers. We ca see that the sequece,, 2, 2, 3, 3,... is a fuctio from the positive itegers whe we write the first sequece elemet as

More information

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence Sequeces A sequece of umbers is a fuctio whose domai is the positive itegers. We ca see that the sequece 1, 1, 2, 2, 3, 3,... is a fuctio from the positive itegers whe we write the first sequece elemet

More information

4.3 Growth Rates of Solutions to Recurrences

4.3 Growth Rates of Solutions to Recurrences 4.3. GROWTH RATES OF SOLUTIONS TO RECURRENCES 81 4.3 Growth Rates of Solutios to Recurreces 4.3.1 Divide ad Coquer Algorithms Oe of the most basic ad powerful algorithmic techiques is divide ad coquer.

More information

Chapter 9 Computer Design Basics

Chapter 9 Computer Design Basics Logic ad Computer Desig Fudametals Chapter 9 Computer Desig Basics Part 1 Datapaths Overview Part 1 Datapaths Itroductio Datapath Example Arithmetic Logic Uit (ALU) Shifter Datapath Represetatio Cotrol

More information

The Binomial Theorem

The Binomial Theorem The Biomial Theorem Robert Marti Itroductio The Biomial Theorem is used to expad biomials, that is, brackets cosistig of two distict terms The formula for the Biomial Theorem is as follows: (a + b ( k

More information

PH 425 Quantum Measurement and Spin Winter SPINS Lab 1

PH 425 Quantum Measurement and Spin Winter SPINS Lab 1 PH 425 Quatum Measuremet ad Spi Witer 23 SPIS Lab Measure the spi projectio S z alog the z-axis This is the experimet that is ready to go whe you start the program, as show below Each atom is measured

More information

INTEGRATION BY PARTS (TABLE METHOD)

INTEGRATION BY PARTS (TABLE METHOD) INTEGRATION BY PARTS (TABLE METHOD) Suppose you wat to evaluate cos d usig itegratio by parts. Usig the u dv otatio, we get So, u dv d cos du d v si cos d si si d or si si d We see that it is ecessary

More information

Design of Digital Circuits Lecture 7: Sequential Logic Design. Prof. Onur Mutlu ETH Zurich Spring March 2018

Design of Digital Circuits Lecture 7: Sequential Logic Design. Prof. Onur Mutlu ETH Zurich Spring March 2018 Desig of Digital Circuits Lecture 7: Seuetial Logic Desig Prof. Our Mutlu ETH Zurich Sprig 2018 15 March 2018 Readigs Please study Slides 102-120 from Lecture 6 o your ow This week Seuetial Logic P&P Chapter

More information

The "Last Riddle" of Pierre de Fermat, II

The Last Riddle of Pierre de Fermat, II The "Last Riddle" of Pierre de Fermat, II Alexader Mitkovsky mitkovskiy@gmail.com Some time ago, I published a work etitled, "The Last Riddle" of Pierre de Fermat " i which I had writte a proof of the

More information

Induction: Solutions

Induction: Solutions Writig Proofs Misha Lavrov Iductio: Solutios Wester PA ARML Practice March 6, 206. Prove that a 2 2 chessboard with ay oe square removed ca always be covered by shaped tiles. Solutio : We iduct o. For

More information

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer.

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer. 6 Itegers Modulo I Example 2.3(e), we have defied the cogruece of two itegers a,b with respect to a modulus. Let us recall that a b (mod ) meas a b. We have proved that cogruece is a equivalece relatio

More information

Introduction to Signals and Systems, Part V: Lecture Summary

Introduction to Signals and Systems, Part V: Lecture Summary EEL33: Discrete-Time Sigals ad Systems Itroductio to Sigals ad Systems, Part V: Lecture Summary Itroductio to Sigals ad Systems, Part V: Lecture Summary So far we have oly looked at examples of o-recursive

More information

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Statistics

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Statistics ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER 1 018/019 DR. ANTHONY BROWN 8. Statistics 8.1. Measures of Cetre: Mea, Media ad Mode. If we have a series of umbers the

More information

Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman:

Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman: Math 224 Fall 2017 Homework 4 Drew Armstrog Problems from 9th editio of Probability ad Statistical Iferece by Hogg, Tais ad Zimmerma: Sectio 2.3, Exercises 16(a,d),18. Sectio 2.4, Exercises 13, 14. Sectio

More information

MA131 - Analysis 1. Workbook 3 Sequences II

MA131 - Analysis 1. Workbook 3 Sequences II MA3 - Aalysis Workbook 3 Sequeces II Autum 2004 Cotets 2.8 Coverget Sequeces........................ 2.9 Algebra of Limits......................... 2 2.0 Further Useful Results........................

More information

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) = AN INTRODUCTION TO SCHRÖDER AND UNKNOWN NUMBERS NICK DUFRESNE Abstract. I this article we will itroduce two types of lattice paths, Schröder paths ad Ukow paths. We will examie differet properties of each,

More information

CHAPTER 10 INFINITE SEQUENCES AND SERIES

CHAPTER 10 INFINITE SEQUENCES AND SERIES CHAPTER 10 INFINITE SEQUENCES AND SERIES 10.1 Sequeces 10.2 Ifiite Series 10.3 The Itegral Tests 10.4 Compariso Tests 10.5 The Ratio ad Root Tests 10.6 Alteratig Series: Absolute ad Coditioal Covergece

More information

CHAPTER I: Vector Spaces

CHAPTER I: Vector Spaces CHAPTER I: Vector Spaces Sectio 1: Itroductio ad Examples This first chapter is largely a review of topics you probably saw i your liear algebra course. So why cover it? (1) Not everyoe remembers everythig

More information

MA131 - Analysis 1. Workbook 2 Sequences I

MA131 - Analysis 1. Workbook 2 Sequences I MA3 - Aalysis Workbook 2 Sequeces I Autum 203 Cotets 2 Sequeces I 2. Itroductio.............................. 2.2 Icreasig ad Decreasig Sequeces................ 2 2.3 Bouded Sequeces..........................

More information

EE260: Digital Design, Spring n Binary Addition. n Complement forms. n Subtraction. n Multiplication. n Inputs: A 0, B 0. n Boolean equations:

EE260: Digital Design, Spring n Binary Addition. n Complement forms. n Subtraction. n Multiplication. n Inputs: A 0, B 0. n Boolean equations: EE260: Digital Desig, Sprig 2018 EE 260: Itroductio to Digital Desig Arithmetic Biary Additio Complemet forms Subtractio Multiplicatio Overview Yao Zheg Departmet of Electrical Egieerig Uiversity of Hawaiʻi

More information

Chapter 9 Computer Design Basics

Chapter 9 Computer Design Basics Logic ad Computer Desig Fudametals Chapter 9 Computer Desig asics Part Datapaths Charles Kime & Thomas Kamiski 008 Pearso Educatio, Ic. (Hyperliks are active i View Show mode) Overview Part Datapaths Itroductio

More information

DESCRIPTION OF THE SYSTEM

DESCRIPTION OF THE SYSTEM Sychroous-Serial Iterface for absolute Ecoders SSI 1060 BE 10 / 01 DESCRIPTION OF THE SYSTEM TWK-ELEKTRONIK GmbH D-001 Düsseldorf PB 1006 Heirichstr. Tel +9/11/6067 Fax +9/11/6770 e-mail: ifo@twk.de Page

More information

Kinetics of Complex Reactions

Kinetics of Complex Reactions Kietics of Complex Reactios by Flick Colema Departmet of Chemistry Wellesley College Wellesley MA 28 wcolema@wellesley.edu Copyright Flick Colema 996. All rights reserved. You are welcome to use this documet

More information

P1 Chapter 8 :: Binomial Expansion

P1 Chapter 8 :: Binomial Expansion P Chapter 8 :: Biomial Expasio jfrost@tiffi.kigsto.sch.uk www.drfrostmaths.com @DrFrostMaths Last modified: 6 th August 7 Use of DrFrostMaths for practice Register for free at: www.drfrostmaths.com/homework

More information

Roberto s Notes on Series Chapter 2: Convergence tests Section 7. Alternating series

Roberto s Notes on Series Chapter 2: Convergence tests Section 7. Alternating series Roberto s Notes o Series Chapter 2: Covergece tests Sectio 7 Alteratig series What you eed to kow already: All basic covergece tests for evetually positive series. What you ca lear here: A test for series

More information

Sequences I. Chapter Introduction

Sequences I. Chapter Introduction Chapter 2 Sequeces I 2. Itroductio A sequece is a list of umbers i a defiite order so that we kow which umber is i the first place, which umber is i the secod place ad, for ay atural umber, we kow which

More information

Statistics 511 Additional Materials

Statistics 511 Additional Materials Cofidece Itervals o mu Statistics 511 Additioal Materials This topic officially moves us from probability to statistics. We begi to discuss makig ifereces about the populatio. Oe way to differetiate probability

More information

Lecture 2: April 3, 2013

Lecture 2: April 3, 2013 TTIC/CMSC 350 Mathematical Toolkit Sprig 203 Madhur Tulsiai Lecture 2: April 3, 203 Scribe: Shubhedu Trivedi Coi tosses cotiued We retur to the coi tossig example from the last lecture agai: Example. Give,

More information

Random Models. Tusheng Zhang. February 14, 2013

Random Models. Tusheng Zhang. February 14, 2013 Radom Models Tusheg Zhag February 14, 013 1 Radom Walks Let me describe the model. Radom walks are used to describe the motio of a movig particle (object). Suppose that a particle (object) moves alog the

More information

(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row:

(3) If you replace row i of A by its sum with a multiple of another row, then the determinant is unchanged! Expand across the i th row: Math 5-4 Tue Feb 4 Cotiue with sectio 36 Determiats The effective way to compute determiats for larger-sized matrices without lots of zeroes is to ot use the defiitio, but rather to use the followig facts,

More information

Disjoint set (Union-Find)

Disjoint set (Union-Find) CS124 Lecture 7 Fall 2018 Disjoit set (Uio-Fid) For Kruskal s algorithm for the miimum spaig tree problem, we foud that we eeded a data structure for maitaiig a collectio of disjoit sets. That is, we eed

More information

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution

Discrete-Time Systems, LTI Systems, and Discrete-Time Convolution EEL5: Discrete-Time Sigals ad Systems. Itroductio I this set of otes, we begi our mathematical treatmet of discrete-time s. As show i Figure, a discrete-time operates or trasforms some iput sequece x [

More information

CS / MCS 401 Homework 3 grader solutions

CS / MCS 401 Homework 3 grader solutions CS / MCS 401 Homework 3 grader solutios assigmet due July 6, 016 writte by Jāis Lazovskis maximum poits: 33 Some questios from CLRS. Questios marked with a asterisk were ot graded. 1 Use the defiitio of

More information

The Random Walk For Dummies

The Random Walk For Dummies The Radom Walk For Dummies Richard A Mote Abstract We look at the priciples goverig the oe-dimesioal discrete radom walk First we review five basic cocepts of probability theory The we cosider the Beroulli

More information

Polynomial Functions and Their Graphs

Polynomial Functions and Their Graphs Polyomial Fuctios ad Their Graphs I this sectio we begi the study of fuctios defied by polyomial expressios. Polyomial ad ratioal fuctios are the most commo fuctios used to model data, ad are used extesively

More information

WHAT IS THE PROBABILITY FUNCTION FOR LARGE TSUNAMI WAVES? ABSTRACT

WHAT IS THE PROBABILITY FUNCTION FOR LARGE TSUNAMI WAVES? ABSTRACT WHAT IS THE PROBABILITY FUNCTION FOR LARGE TSUNAMI WAVES? Harold G. Loomis Hoolulu, HI ABSTRACT Most coastal locatios have few if ay records of tsuami wave heights obtaied over various time periods. Still

More information

Chapter 6 Infinite Series

Chapter 6 Infinite Series Chapter 6 Ifiite Series I the previous chapter we cosidered itegrals which were improper i the sese that the iterval of itegratio was ubouded. I this chapter we are goig to discuss a topic which is somewhat

More information

Lesson 10: Limits and Continuity

Lesson 10: Limits and Continuity www.scimsacademy.com Lesso 10: Limits ad Cotiuity SCIMS Academy 1 Limit of a fuctio The cocept of limit of a fuctio is cetral to all other cocepts i calculus (like cotiuity, derivative, defiite itegrals

More information

SNAP Centre Workshop. Basic Algebraic Manipulation

SNAP Centre Workshop. Basic Algebraic Manipulation SNAP Cetre Workshop Basic Algebraic Maipulatio 8 Simplifyig Algebraic Expressios Whe a expressio is writte i the most compact maer possible, it is cosidered to be simplified. Not Simplified: x(x + 4x)

More information

Lecture 9: Hierarchy Theorems

Lecture 9: Hierarchy Theorems IAS/PCMI Summer Sessio 2000 Clay Mathematics Udergraduate Program Basic Course o Computatioal Complexity Lecture 9: Hierarchy Theorems David Mix Barrigto ad Alexis Maciel July 27, 2000 Most of this lecture

More information

The Growth of Functions. Theoretical Supplement

The Growth of Functions. Theoretical Supplement The Growth of Fuctios Theoretical Supplemet The Triagle Iequality The triagle iequality is a algebraic tool that is ofte useful i maipulatig absolute values of fuctios. The triagle iequality says that

More information

1 Inferential Methods for Correlation and Regression Analysis

1 Inferential Methods for Correlation and Regression Analysis 1 Iferetial Methods for Correlatio ad Regressio Aalysis I the chapter o Correlatio ad Regressio Aalysis tools for describig bivariate cotiuous data were itroduced. The sample Pearso Correlatio Coefficiet

More information

Final Review for MATH 3510

Final Review for MATH 3510 Fial Review for MATH 50 Calculatio 5 Give a fairly simple probability mass fuctio or probability desity fuctio of a radom variable, you should be able to compute the expected value ad variace of the variable

More information

Bertrand s Postulate

Bertrand s Postulate Bertrad s Postulate Lola Thompso Ross Program July 3, 2009 Lola Thompso (Ross Program Bertrad s Postulate July 3, 2009 1 / 33 Bertrad s Postulate I ve said it oce ad I ll say it agai: There s always a

More information

Section 1.1. Calculus: Areas And Tangents. Difference Equations to Differential Equations

Section 1.1. Calculus: Areas And Tangents. Difference Equations to Differential Equations Differece Equatios to Differetial Equatios Sectio. Calculus: Areas Ad Tagets The study of calculus begis with questios about chage. What happes to the velocity of a swigig pedulum as its positio chages?

More information

1 Generating functions for balls in boxes

1 Generating functions for balls in boxes Math 566 Fall 05 Some otes o geeratig fuctios Give a sequece a 0, a, a,..., a,..., a geeratig fuctio some way of represetig the sequece as a fuctio. There are may ways to do this, with the most commo ways

More information

Recurrence Relations

Recurrence Relations Recurrece Relatios Aalysis of recursive algorithms, such as: it factorial (it ) { if (==0) retur ; else retur ( * factorial(-)); } Let t be the umber of multiplicatios eeded to calculate factorial(). The

More information

Seunghee Ye Ma 8: Week 5 Oct 28

Seunghee Ye Ma 8: Week 5 Oct 28 Week 5 Summary I Sectio, we go over the Mea Value Theorem ad its applicatios. I Sectio 2, we will recap what we have covered so far this term. Topics Page Mea Value Theorem. Applicatios of the Mea Value

More information

NUMERICAL METHODS FOR SOLVING EQUATIONS

NUMERICAL METHODS FOR SOLVING EQUATIONS Mathematics Revisio Guides Numerical Methods for Solvig Equatios Page 1 of 11 M.K. HOME TUITION Mathematics Revisio Guides Level: GCSE Higher Tier NUMERICAL METHODS FOR SOLVING EQUATIONS Versio:. Date:

More information

Problem Set 4 Due Oct, 12

Problem Set 4 Due Oct, 12 EE226: Radom Processes i Systems Lecturer: Jea C. Walrad Problem Set 4 Due Oct, 12 Fall 06 GSI: Assae Gueye This problem set essetially reviews detectio theory ad hypothesis testig ad some basic otios

More information

Matrices and vectors

Matrices and vectors Oe Matrices ad vectors This book takes for grated that readers have some previous kowledge of the calculus of real fuctios of oe real variable It would be helpful to also have some kowledge of liear algebra

More information

Mathematical Induction

Mathematical Induction Mathematical Iductio Itroductio Mathematical iductio, or just iductio, is a proof techique. Suppose that for every atural umber, P() is a statemet. We wish to show that all statemets P() are true. I a

More information

Chapter 4. Fourier Series

Chapter 4. Fourier Series Chapter 4. Fourier Series At this poit we are ready to ow cosider the caoical equatios. Cosider, for eample the heat equatio u t = u, < (4.) subject to u(, ) = si, u(, t) = u(, t) =. (4.) Here,

More information

Ray-triangle intersection

Ray-triangle intersection Ray-triagle itersectio ria urless October 2006 I this hadout, we explore the steps eeded to compute the itersectio of a ray with a triagle, ad the to compute the barycetric coordiates of that itersectio.

More information

Section 5.1 The Basics of Counting

Section 5.1 The Basics of Counting 1 Sectio 5.1 The Basics of Coutig Combiatorics, the study of arragemets of objects, is a importat part of discrete mathematics. I this chapter, we will lear basic techiques of coutig which has a lot of

More information

September 2012 C1 Note. C1 Notes (Edexcel) Copyright - For AS, A2 notes and IGCSE / GCSE worksheets 1

September 2012 C1 Note. C1 Notes (Edexcel) Copyright   - For AS, A2 notes and IGCSE / GCSE worksheets 1 September 0 s (Edecel) Copyright www.pgmaths.co.uk - For AS, A otes ad IGCSE / GCSE worksheets September 0 Copyright www.pgmaths.co.uk - For AS, A otes ad IGCSE / GCSE worksheets September 0 Copyright

More information

Understanding Samples

Understanding Samples 1 Will Moroe CS 109 Samplig ad Bootstrappig Lecture Notes #17 August 2, 2017 Based o a hadout by Chris Piech I this chapter we are goig to talk about statistics calculated o samples from a populatio. We

More information

Math 113 Exam 3 Practice

Math 113 Exam 3 Practice Math Exam Practice Exam will cover.-.9. This sheet has three sectios. The first sectio will remid you about techiques ad formulas that you should kow. The secod gives a umber of practice questios for you

More information

Chapter 6 Overview: Sequences and Numerical Series. For the purposes of AP, this topic is broken into four basic subtopics:

Chapter 6 Overview: Sequences and Numerical Series. For the purposes of AP, this topic is broken into four basic subtopics: Chapter 6 Overview: Sequeces ad Numerical Series I most texts, the topic of sequeces ad series appears, at first, to be a side topic. There are almost o derivatives or itegrals (which is what most studets

More information

Sequences. Notation. Convergence of a Sequence

Sequences. Notation. Convergence of a Sequence Sequeces A sequece is essetially just a list. Defiitio (Sequece of Real Numbers). A sequece of real umbers is a fuctio Z (, ) R for some real umber. Do t let the descriptio of the domai cofuse you; it

More information

IP Reference guide for integer programming formulations.

IP Reference guide for integer programming formulations. IP Referece guide for iteger programmig formulatios. by James B. Orli for 15.053 ad 15.058 This documet is iteded as a compact (or relatively compact) guide to the formulatio of iteger programs. For more

More information

Chapter 6: Numerical Series

Chapter 6: Numerical Series Chapter 6: Numerical Series 327 Chapter 6 Overview: Sequeces ad Numerical Series I most texts, the topic of sequeces ad series appears, at first, to be a side topic. There are almost o derivatives or itegrals

More information

Recitation 4: Lagrange Multipliers and Integration

Recitation 4: Lagrange Multipliers and Integration Math 1c TA: Padraic Bartlett Recitatio 4: Lagrage Multipliers ad Itegratio Week 4 Caltech 211 1 Radom Questio Hey! So, this radom questio is pretty tightly tied to today s lecture ad the cocept of cotet

More information

Some examples of vector spaces

Some examples of vector spaces Roberto s Notes o Liear Algebra Chapter 11: Vector spaces Sectio 2 Some examples of vector spaces What you eed to kow already: The te axioms eeded to idetify a vector space. What you ca lear here: Some

More information

Let us consider the following problem to warm up towards a more general statement.

Let us consider the following problem to warm up towards a more general statement. Lecture 4: Sequeces with repetitios, distributig idetical objects amog distict parties, the biomial theorem, ad some properties of biomial coefficiets Refereces: Relevat parts of chapter 15 of the Math

More information

Math 113, Calculus II Winter 2007 Final Exam Solutions

Math 113, Calculus II Winter 2007 Final Exam Solutions Math, Calculus II Witer 7 Fial Exam Solutios (5 poits) Use the limit defiitio of the defiite itegral ad the sum formulas to compute x x + dx The check your aswer usig the Evaluatio Theorem Solutio: I this

More information

OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES

OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES Peter M. Maurer Why Hashig is θ(). As i biary search, hashig assumes that keys are stored i a array which is idexed by a iteger. However, hashig attempts to bypass

More information

Machine Learning for Data Science (CS 4786)

Machine Learning for Data Science (CS 4786) Machie Learig for Data Sciece CS 4786) Lecture & 3: Pricipal Compoet Aalysis The text i black outlies high level ideas. The text i blue provides simple mathematical details to derive or get to the algorithm

More information

Notes for Lecture 5. 1 Grover Search. 1.1 The Setting. 1.2 Motivation. Lecture 5 (September 26, 2018)

Notes for Lecture 5. 1 Grover Search. 1.1 The Setting. 1.2 Motivation. Lecture 5 (September 26, 2018) COS 597A: Quatum Cryptography Lecture 5 (September 6, 08) Lecturer: Mark Zhadry Priceto Uiversity Scribe: Fermi Ma Notes for Lecture 5 Today we ll move o from the slightly cotrived applicatios of quatum

More information

Optimally Sparse SVMs

Optimally Sparse SVMs A. Proof of Lemma 3. We here prove a lower boud o the umber of support vectors to achieve geeralizatio bouds of the form which we cosider. Importatly, this result holds ot oly for liear classifiers, but

More information

7. Modern Techniques. Data Encryption Standard (DES)

7. Modern Techniques. Data Encryption Standard (DES) 7. Moder Techiques. Data Ecryptio Stadard (DES) The objective of this chapter is to illustrate the priciples of moder covetioal ecryptio. For this purpose, we focus o the most widely used covetioal ecryptio

More information

The Scattering Matrix

The Scattering Matrix 2/23/7 The Scatterig Matrix 723 1/13 The Scatterig Matrix At low frequecies, we ca completely characterize a liear device or etwork usig a impedace matrix, which relates the currets ad voltages at each

More information

2.4 Sequences, Sequences of Sets

2.4 Sequences, Sequences of Sets 72 CHAPTER 2. IMPORTANT PROPERTIES OF R 2.4 Sequeces, Sequeces of Sets 2.4.1 Sequeces Defiitio 2.4.1 (sequece Let S R. 1. A sequece i S is a fuctio f : K S where K = { N : 0 for some 0 N}. 2. For each

More information

Computability and computational complexity

Computability and computational complexity Computability ad computatioal complexity Lecture 4: Uiversal Turig machies. Udecidability Io Petre Computer Sciece, Åbo Akademi Uiversity Fall 2015 http://users.abo.fi/ipetre/computability/ 21. toukokuu

More information

Confidence Intervals for the Population Proportion p

Confidence Intervals for the Population Proportion p Cofidece Itervals for the Populatio Proportio p The cocept of cofidece itervals for the populatio proportio p is the same as the oe for, the samplig distributio of the mea, x. The structure is idetical:

More information

Summer High School 2009 Aaron Bertram

Summer High School 2009 Aaron Bertram Summer High School 009 Aaro Bertram 3 Iductio ad Related Stuff Let s thik for a bit about the followig two familiar equatios: Triagle Number Equatio Square Number Equatio: + + 3 + + = ( + + 3 + 5 + + (

More information

(b) What is the probability that a particle reaches the upper boundary n before the lower boundary m?

(b) What is the probability that a particle reaches the upper boundary n before the lower boundary m? MATH 529 The Boudary Problem The drukard s walk (or boudary problem) is oe of the most famous problems i the theory of radom walks. Oe versio of the problem is described as follows: Suppose a particle

More information

EE260: Digital Design, Spring n MUX Gate n Rudimentary functions n Binary Decoders. n Binary Encoders n Priority Encoders

EE260: Digital Design, Spring n MUX Gate n Rudimentary functions n Binary Decoders. n Binary Encoders n Priority Encoders EE260: Digital Desig, Sprig 2018 EE 260: Itroductio to Digital Desig MUXs, Ecoders, Decoders Yao Zheg Departmet of Electrical Egieerig Uiversity of Hawaiʻi at Māoa Overview of Ecoder ad Decoder MUX Gate

More information

Riemann Sums y = f (x)

Riemann Sums y = f (x) Riema Sums Recall that we have previously discussed the area problem I its simplest form we ca state it this way: The Area Problem Let f be a cotiuous, o-egative fuctio o the closed iterval [a, b] Fid

More information

Hashing and Amortization

Hashing and Amortization Lecture Hashig ad Amortizatio Supplemetal readig i CLRS: Chapter ; Chapter 7 itro; Sectio 7.. Arrays ad Hashig Arrays are very useful. The items i a array are statically addressed, so that isertig, deletig,

More information

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3 MATH 337 Sequeces Dr. Neal, WKU Let X be a metric space with distace fuctio d. We shall defie the geeral cocept of sequece ad limit i a metric space, the apply the results i particular to some special

More information

MATH 21 SECTION NOTES

MATH 21 SECTION NOTES MATH SECTION NOTES EVAN WARNER. March 9.. Admiistrative miscellay. These weekly sectios will be for some review ad may example problems, i geeral. Attedace will be take as per class policy. We will be

More information

Section 4.3. Boolean functions

Section 4.3. Boolean functions Sectio 4.3. Boolea fuctios Let us take aother look at the simplest o-trivial Boolea algebra, ({0}), the power-set algebra based o a oe-elemet set, chose here as {0}. This has two elemets, the empty set,

More information

The Riemann Zeta Function

The Riemann Zeta Function Physics 6A Witer 6 The Riema Zeta Fuctio I this ote, I will sketch some of the mai properties of the Riema zeta fuctio, ζ(x). For x >, we defie ζ(x) =, x >. () x = For x, this sum diverges. However, we

More information

1. By using truth tables prove that, for all statements P and Q, the statement

1. By using truth tables prove that, for all statements P and Q, the statement Author: Satiago Salazar Problems I: Mathematical Statemets ad Proofs. By usig truth tables prove that, for all statemets P ad Q, the statemet P Q ad its cotrapositive ot Q (ot P) are equivalet. I example.2.3

More information

CALCULATION OF FIBONACCI VECTORS

CALCULATION OF FIBONACCI VECTORS CALCULATION OF FIBONACCI VECTORS Stuart D. Aderso Departmet of Physics, Ithaca College 953 Daby Road, Ithaca NY 14850, USA email: saderso@ithaca.edu ad Dai Novak Departmet of Mathematics, Ithaca College

More information

RADICAL EXPRESSION. If a and x are real numbers and n is a positive integer, then x is an. n th root theorems: Example 1 Simplify

RADICAL EXPRESSION. If a and x are real numbers and n is a positive integer, then x is an. n th root theorems: Example 1 Simplify Example 1 Simplify 1.2A Radical Operatios a) 4 2 b) 16 1 2 c) 16 d) 2 e) 8 1 f) 8 What is the relatioship betwee a, b, c? What is the relatioship betwee d, e, f? If x = a, the x = = th root theorems: RADICAL

More information

Last time, we talked about how Equation (1) can simulate Equation (2). We asserted that Equation (2) can also simulate Equation (1).

Last time, we talked about how Equation (1) can simulate Equation (2). We asserted that Equation (2) can also simulate Equation (1). 6896 Quatum Complexity Theory Sept 23, 2008 Lecturer: Scott Aaroso Lecture 6 Last Time: Quatum Error-Correctio Quatum Query Model Deutsch-Jozsa Algorithm (Computes x y i oe query) Today: Berstei-Vazirii

More information

Chapter 8: Estimating with Confidence

Chapter 8: Estimating with Confidence Chapter 8: Estimatig with Cofidece Sectio 8.2 The Practice of Statistics, 4 th editio For AP* STARNES, YATES, MOORE Chapter 8 Estimatig with Cofidece 8.1 Cofidece Itervals: The Basics 8.2 8.3 Estimatig

More information

6.003 Homework #3 Solutions

6.003 Homework #3 Solutions 6.00 Homework # Solutios Problems. Complex umbers a. Evaluate the real ad imagiary parts of j j. π/ Real part = Imagiary part = 0 e Euler s formula says that j = e jπ/, so jπ/ j π/ j j = e = e. Thus the

More information

Signals & Systems Chapter3

Signals & Systems Chapter3 Sigals & Systems Chapter3 1.2 Discrete-Time (D-T) Sigals Electroic systems do most of the processig of a sigal usig a computer. A computer ca t directly process a C-T sigal but istead eeds a stream of

More information

Math 2784 (or 2794W) University of Connecticut

Math 2784 (or 2794W) University of Connecticut ORDERS OF GROWTH PAT SMITH Math 2784 (or 2794W) Uiversity of Coecticut Date: Mar. 2, 22. ORDERS OF GROWTH. Itroductio Gaiig a ituitive feel for the relative growth of fuctios is importat if you really

More information

Principle Of Superposition

Principle Of Superposition ecture 5: PREIMINRY CONCEP O RUCUR NYI Priciple Of uperpositio Mathematically, the priciple of superpositio is stated as ( a ) G( a ) G( ) G a a or for a liear structural system, the respose at a give

More information

Chapter 7: Numerical Series

Chapter 7: Numerical Series Chapter 7: Numerical Series Chapter 7 Overview: Sequeces ad Numerical Series I most texts, the topic of sequeces ad series appears, at first, to be a side topic. There are almost o derivatives or itegrals

More information

Revision Topic 1: Number and algebra

Revision Topic 1: Number and algebra Revisio Topic : Number ad algebra Chapter : Number Differet types of umbers You eed to kow that there are differet types of umbers ad recogise which group a particular umber belogs to: Type of umber Symbol

More information

Probability, Expectation Value and Uncertainty

Probability, Expectation Value and Uncertainty Chapter 1 Probability, Expectatio Value ad Ucertaity We have see that the physically observable properties of a quatum system are represeted by Hermitea operators (also referred to as observables ) such

More information