I understand that in a D latch, whenever the clock signal is high, Q matches D, and while the clock signal is low, it holds the previous state of D. For a D flip-flop, Q will hold whatever value D is at the exact moment C goes high, and will hold that same state until C goes high again. I am able to draw the clock diagram and identify these circuits. But I am not understanding the purpose of these components in a high level context.What exactly does the D latch and D flip-flop do? (Differences and similarity) From my understanding, it is to be able to store a bit value, but if that's the case, why not use an SR latch?Edit: I have seen the following post. However, my question is a little more specific. I am asking specifically about a D latch/flip-flop. I also want to be able to differentiate how this is different from a SR latch, since it seems that their descriptions seem to do the same thing.
Utility of D latch/flip-flop and how it differs from an SR latch/flip-flop
circuits
One big difference is that while the SR flipflop has a not-allowed state (i.e., inputs S=1, R=1), the D flipflop has no such condition.Another difference, is that the D flipflop just mirrors the input into the output, while SR has two inputs: one for setting the ouput to 1, and one for resetting the output into a 0.