D-Flip-Flop

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
now in the lab upstairs next week you'll see and we have different flip-flops we have something called JK flip-flop as our flip-flop T flip-flop D flip-flops so we need to understand what they look like on paper when we draw them a D flip-flop will look like this has one input we call D and it has two outputs Q and the complement of Q it has a clock here to control CLK o'clock so when the clock comes in and sometimes the clock has to be on the rising edge sometimes on the falling edge like the Machine looks as the on the rising edge when the clock goes from zero to one that's the rising edge the falling edge when the clock goes from one to zero how do we know if this one actually on the rising edge versus the falling edge the falling edge this will look like this and the clock will have a bubble here and that's the clock that says that's working on the falling edge this is working on the rising edge there is no circle here so you need the clock to go to one for it to work this means the clock to go to zero for it to work from one to zero the reason they call them rising edge and falling edge when you look at a clock the clock looks like this that's what the clock looks like so this is the rising you go into one and this is the falling rising falling rising falling so as the clock goes to rising if you have this flip-flop that's when the changes will happen this one if you have that nothing happens till the clock goes from one to zero on that edge so all the stuff you are doing in that time nothing will happen until the clock goes from one to zero then it will happen and then that will stay the same until it goes from one to zero will happen again will stay this here until it goes one to zero well you can see the inside in a minute so now what is actually the truth table for that here is the D flip-flop D Q and Q next the asterisk means next the next state so this is the next state what will happen next if D is 0 and Q was a zero so if the previous state was zero and your input was 0 your output the next state will be 0 if this is 0 and this was 1 so initially this was a 1 you make a 0 the clock comes in this one says your output is 0 if d is 1 q is 0 so the previous state was 0 now D is 1 then you end up with 1 and the last one when D is 1 Q is 1 you end up with the 1 if you look closely at that truth table what do you notice about Q next the next state the same is d right so you can summarize that table it says you know what if that's what you matter what Q is if D is 0 you're getting a 0 if d is 1 you're getting a 1 that's what a D flip-flop D flip-flop what's the D stands for why they call D flip-flop data these four data flip-flop this flip-flop follows the data if the data is 0 under what cat their data flip-flop if the data is 0 your output or the next state is 0 if data is 1 the next state is 1 that's the truth table for it not from the graph but that's a truth table now if you want to see what the inside of it looks like correct yes all the flip-flop works that way they come pre-programmed designed to run that way oh no downer up doesn't matter yep so let me do a timing diagram for that I'll make a clock here well show that ruler well is there quickly like if I try to graph this and it doesn't matter what the next state is let's see if it's going to work on the rising edge it's the part I hate I go blind with it try and make it nice and neat let me actually I'm going to make this a rising I'm going to mark the rising edge because I might work on the rising edge I'm gonna assume it's the rising edge flip flop there we go okay how about this we'll do this so I can look and see when it went to one there the rising edge again so the top is my clock I guess one of the clock it looks like I have a long signal here but that's a boo-boo there it should all be the same width that's my clock looks like I use three instead of a two that's the only one but usually clock everything is the same so I count it wrong so this is the clock CLK clock and let's make a value for D the data I'll use the red color for D and I'll mix and match I don't have to stay with the clock I'm going to make the data go 1-0 anytime I feel like it as the data let's say this is my data I make you intentionally is up and down not exactly the same time so what is the next state is going to be what's Q is going to be the output if I have a clock working on the rising edge and usually when you get the flip-flop you'll see there's a set or reset so you can start your flip-flop either with 1 or 0 so you can put a high voltage on the set it starts with 1 or put a high voltage on the zero start at 0 so you can start anywhere you want to let's say I'm honest at minus 0 there's my zero I see the clock going to 1 so that's 0 to 1 the rising edge what was the value of D 1 0 this is 0 that's 1 D was 0 that means your output is going to stay zero till the next clock is the next clock doesn't matter that went to 1 doesn't matter we don't see it till the clock goes 0 to 1 it sees D as what one that goes to 1 now and it will stay 1 till the next clock that's the next clock now it sees D here comes the clock 0 to 1 it says D as what one will stay a 1 till the next clock look what happened to D here went down back up we don't care didn't see it only sees it when the clock goes from 0 to 1 now right here the clock goes from 0 to 1 again it sees D as what 0 that comes down to 0 the clock goes 0 to 1 and sees D as what 1 it goes back to one stays as one the clock goes zero to one it sees Diaz one continue with one and that's my output for the clock this is if it works on the rising edge clock if your clock works on the falling edge I don't mark the falling edge because I wasn't planning on using it so let's say the clock is a falling edge clock then I got a look now at this time it's a different answer I'm going to get that's the falling edge that's the falling edge that's the falling edge that's the falling edge that's the falling edge and that's the falling edge and so this is Q again let's assume start at zero and here's the falling edge it sees the clock as being what 1 it goes to 1 and it will stay 1 there is the falling edge it sees the date I mean you see the data as one stays one till the next falling edge it sees the data as it's arising yet it sees the data now going to one stays a 1 it's where is it still goes one stays one now we see zero it goes to zero the last one is cease what one that's for this one so if the clock works on the falling edge that's what the clock that's what your output queue will look like nothing happens it follows the data but also see if if it just follows the data your output should be just like that we don't want it to look like that because sometimes you get that surge in energy that surgeon like you hit your house got hit by lightning that surge in the voltage there I don't want that to affect my design this one says oh I didn't see it because it wasn't doing that clock time so this will synchronize every single thing to work at the same time instead just flickering anytime it wants to and usually what will happen in real life out you there's the other issue wouldn't discuss to go from 0 to 1 that time here see this to get 0 to 1 that's an issue for us it doesn't just jump 0 to time that's your delay and right here to drop from 1 to 0 it's going to take some time that's another delay and to go 0 to 1 that's a delay these all delays same thing right here to go 0 to 1 we got delay 1 to 0 delay 0 to 1 so doing that those this box I put there you don't want to read the value you don't want to look at the value because you have to give your device a chance to go back to one or go back to zero and we're getting better with the equipment we used to be like this the to make good 0 to 1 now we improved a few years back to something like this now we can make it look like this almost straight up they're almost we're getting better and better that dealer is getting less and less and less every single year yeah every two years actually did increase by half the size that's the rule of thumb double the speed every two years that's what we're using for the rule so that delay actually gets half and half every two years will we ever get it to be perfect probably not yep probably not we don't want it anywhere get a little time there a little delay there you know I might not be able to calculate that time but probably not so we're going to look more at flip-flops next time that's just introduction to one flip-flop the D flip-flop we get a lot more that's the easiest one the data flip-flop
Info
Channel: Zahi Haddad
Views: 143,118
Rating: 4.8689322 out of 5
Keywords: D-Flip-Flop
Id: wOcp8OIZfWU
Channel Id: undefined
Length: 15min 25sec (925 seconds)
Published: Thu Nov 13 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.