in this lesson what we're going to do is just a quick demonstration of what the difference in behavior between the rising edge d uh flip-flop the falling edge d flip-flop the transparent active high latch and the transparent active low latch we're just going to show exactly based on different values of d and the clock what happens on the output now real quick before we get started let's talk about first of all whenever we talked about the d flip flop remember that there was two kinds there was the rising edge and there was the falling edge now how might you see these indicated on a truth table in other words most of the time whenever we see inputs on a truth table we see a zero or a one well these are two new conditions they represent the instant something is changing you could see one of two different types of signals a rising edge you may actually see represented with a small step up to indicate well the transition from a zero to a one so that would indicate that we want to capture that instant falling edge has a similar one a step down right you may however also see a an up arrow or a down arrow to represent those transitions in general though what you're looking at is rising edge falling edge those are moments in time where the signal actually is in transition and it's not the same as just a solid zero or a solid one that you would find on a truth table alright so let's do a quick timing diagram of what you might see on a d flip flop versus a d latch so i'm going to draw just well what you might see on d or the clock just give you as time is going on some some patterns that we might see so let's just say i don't know how about d is just changing kind of randomly here all right so those are the values we've got on d now for the clock what we've got is i'm just gonna this is not necessarily the way that a clock is going to look but i'm going to make the clock i don't know it's just going to change up and down a little bit now if you're trying to copy this at home who knows you may or may not get something similar to this something probably different but the operation should show you exactly how or you know our description should show you exactly how these things are working out so what i'm going to do is i'm going to put a dotted line to represent exactly the moments we are getting these rising edges or falling edges on the d latch actually excuse me on the clock going into the d latch or the d flip flop all right all right now what we're going to do is we're going to using this drawing we're going to show what it looks like whenever you have a rising edge triggered flip-flop we're going to do it and if we put these signals into a rising edge triggered flip-flop we're going to see what it looks like if we put these signals into a falling edge triggered flip-flop and we're going to see what happens if we put them into a transparent latch active high and active low so there's going to be four circuits that i'm going to go do down here now please understand these are four different circuits so it's not like you can get a d latch to behave one way or the other what we're going to do is have actually four independent different types of circuits so let's start with the rising edge triggered latch and or flip-flop and what we're looking at is q so this is what q looks like this is how q is going to behave for a rising edge latch now remember the definition from the previous lesson of what a rising edge flip flop did what it did was it copied d to the moment we had a transition from a 0 to a 1 on our inputs all right so that means we are going to copy d to q at that rising edge at this rising edge at this rising edge at this rising edge now what happens between those rising edges not a thing q stays exactly the same so it's kind of like we took a picture with our camera we took a picture at this moment then we took another picture at this moment then we took another picture at this moment and then took another picture at this moment what happens in between is whatever the captured value was it's going to stay on our output queue until we take another picture now what happens before this period well before this period we really don't have an idea there's a couple of things that we could do you know in our drawing here what we could do is we could just leave it blank so you know we don't know but a very common thing to do is to just simply put both the logic one and the logic zero levels and just put these little transitions in between look like little x's okay so up until that moment we have no idea what's on q now before that or after that excuse me at that moment what is d equal to well at that rising edge d is equal to one so we have stored a 1 to q and that 1 is going to stay on q until we get another rising edge so starting at that moment until that next rising edge we know that we've stored this one at that moment all right now what about the next rising edge well the next rising edge occurs right here what's d equal to at that moment well that moment right there d just so happens to equal a one again so what we're gonna do is we're gonna store 1 again and that 1 is going to stay on it until we hit the next rising edge at this next rising edge what is d equal to well d is equal to a 0 at this next rising edge so the new value stored to q is going to be a zero and we're going to store a zero on there until the next rising edge at this rising edge so we've got a transition from a zero to a one at that moment what is d equal to well at that moment d is equal to a zero so we are going to store a zero again and that zero is going to stay on there until we get another rising edge all right so there is what our queue looks like whenever we have a rising edge d flip flop storing the values based on that sequence of inputs all right i think it's going to look different for a falling edge yeah so now a falling edge what does q look like for the falling edge well for the falling edge what we're going to do is we're going to capture d to q the moments we have these one to zero transitions and so i've got a one to zero transition here i've got a one to zero transition here i've got a one to zero transition here and i've got a one to zero transition here all right so at those little x's that's where our falling edge d flip flop is going to capture the value of d so at this first one at this moment whenever we take the picture of d what is d equal to well at that falling edge that one to zero transition d is equal to a zero so we first store a zero on d until we get to the next falling edge at this next falling edge this one to zero transition right there i've got a zero so i'm going to store zero again until the next falling edge at this falling edge wow we stored another zero so d is equal to zero at this falling edge so it's going to store zero until the next transition on the clock on the clock i've got a one to zero transition now d is equal to a one so here we are going to store a one on q all right so there are our values for a falling edge q based on that sequence of inputs so we put we put the same sequence of the same pattern into a rising edge d flip flop and into a falling edge d flip-flop we've got very different outputs in q didn't we all right so these two right here are edge triggered now what we're going to do is transparent all right and the transparent well we have remember there's active high and active low we're going to figure out what q is equal to for both of those now starting with the active high what happens what allows us to pass d through to q whenever the clock is high well the clock is high between these two dashed lines so whatever d is equal to from the time that clock goes high until it goes low we are going to pass that d straight through to q alright so this little step right there is going to be mimicked on the output q now this period of time the clock is low it's it's not high so it's low so whatever the last value was that was captured on captured from d that's going to stay notice d can change around all it wants to this value is going to stay latched it's going to stay holding okay this period of time right here the clock goes high so the value that's on d gets mapped to q so this d starts out as a logic one and then steps down to a zero so i'm going to start at a logic one step down to 0 in the same path that was done on d make this connect this up now as soon as the clock goes to 0 whatever the last value was that was on d that gets latched onto q all right the clock goes high again here so whatever d is equal to and d just so happened to equal a constant zero across there so we're going to have a constant zero on q all right for this period of time right here between these dashed lines the clock is low so that pulse right there is completely ignored whatever the last value was that was captured on d stays on q alright and then this period of time right here where the la where the clock is a logic one we take d which is going for just a short period of time as a logic zero and then hops up to a logic one so a short period of time as a logic zero hops up to one there you go until the clock goes to a zero and that last value gets latched and there you go that is what the pattern would look like whenever you're having an active high transparent latch connected to those two inputs all right lastly let's figure out what an active low looks like now the active low as long as the clock is a zero we're going to output just past d straight through to q so the clock is a zero for this period right here which means this step up is going to be mapped from d to q whatever the last value was that gets latched held on there now when the clock goes low again this pattern right here where we go from a zero for a while then up to a logic one a zero for a while and up to a logic one so this maps to that those two are the same we'll connect that up right there then the clock goes high and for this active low when the clock goes high we just hold on to the last value of q this period right here where the clock is low looks like we go for just a short time low have a high pulse and then back to low so we go short time low high and then back to low so that period right there whatever d is equal to q is equal to the same thing and then whenever the clock goes high on this active low d latch we're just going to go ahead and hold on to the last value of q then for this period right here where the clock is a zero that little short pulse gets mapped to q clock goes high we stay a logic zero whatever that last value was that was latched and then the clock goes low right here and we have this high to low and so we map that down to q now once again all four of these guys are memory devices they store something to q based on the inputs that were in d and the clock what do the outputs look like what does q look like depends very much on what the different type whether it's first of all whether it's a flip flop or a latch and second of all whether it's rising edge falling edge active high or active low we're getting very different outputs here on cue in the next lesson what we're going to do is take some of these and show you some applications some things we can do with these latches in order to support our computing