Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the difference between latch and flip flop. What i am thinking is latch is equivalent to flip flop since it is used to store the bits and is also equivalent to register which is also used to store the data but by reading some articles over the internet i found differences between latch and flip flop based on edge triggered and level sensitive functionality ? What does it mean ? Is flip flop and latch are the same or not ?

Please clarify my doubt.

share|improve this question

The basic difference is a gating or clocking mechanism. For example, let us talk about SR latch and SR flip-flops.

An SR Latch will look like this

SR Latch using NAND gates

In this circuit when you Set S as active the output Q would be high and Q' will be low. This is irrespective of anything else. (This is an active low circuit so active here means low, but for an active high circuit active would mean high)

An SR Flip-Flop (also called gated or clocked SR latch) looks like this.

enter image description here

In this circuit the output is changed (i.e. the stored data is changed) only when you give a active clock signal. Otherwise, even if the S or R is active the data will not change. This mechanism is used to synchronize circuits and registers so that the data does not change unnecessarily.

share|improve this answer
so can i conclude that latches are level triggered and flip flops are edge triggered? – ankurtr Nov 7 '11 at 6:59
Latches are not triggered at all. As soon as I give input, I get the output in latches. Flipflops are triggered as in I have to give a clock trigger to convert my input into output. – Rick_2047 Nov 7 '11 at 7:16

A latch passes the input data thru directly in the open state, and freezes the output in the latched state. The latch responds to the level of the control signal.

There are various types of flip-flops, but basically these change state on the edge of the control signal, and in some cases the data input(s). A classic D flip-flip is most like a latch, except it only looks at the input on a particular edge of the clock and freezes the output all the remaining time.

share|improve this answer
so is there is any difference between latch and flip flop or not ? – ankurtr Nov 7 '11 at 7:00
@ankur.trapasiya: Yes. – Olin Lathrop Nov 7 '11 at 13:08
hmmm... cleared somewhat..!! what i understood is flip flop needs a clock and a latch doesn't need it. – ankurtr Nov 7 '11 at 14:21
@ankur.trapasiya: yes, latches don't have a clock input but they have a corresponding input: most of the time called ENABLE. The clock input of a D-Flip-Flop is edge sensitive, the enable input of a latch is level sensistive, i.e. the output changes when enable is active and the input changes. – Curd Jan 7 '14 at 15:22

A latch is an example of a bistable multivibrator, that is, a device with exactly two stable states.
These states are high-output and low-output.
A latch has a feedback path, so information can be retained by the device.
Therefore latches can be memory devices, and can store one bit of data for as long as the device is powered.
As the name suggests, latches are used to "latch onto" information and hold in place.
Latches are very similar to flip-flops, but are not synchronous devices, and do not operate on clock edges as flip-flops do.

enter image description here

A flip-flop is a device very like a latch in that it is a bistable mutivibrator, having two states and a feedback path that allows it to store a bit of information.
The difference between a latch and a flip-flop is that a latch is asynchronous, and the outputs can change as soon as the inputs do (or at least after a small propagation delay).
A flip-flop, on the other hand, is edge-triggered and only changes state when a control signal goes from high to low or low to high.
This distinction is relatively recent and is not formal, with many authorities still referring to flip-flops as latches and vice versa, but it is a helpful distinction to make for the sake of clarity.

enter image description here

share|improve this answer
A latch is not a (bistable or any other) multivibrator. – Curd Jan 7 '14 at 15:17

The difference is in the intended use, mostly. A flip-flop is a general idea and has variations - how it is triggered, JK inputs or D, and all that. Flips can be used for counters, shift registers and all the other uses found in texts and online articles about flip-flops.

A latch is one particular use, where a set of flip flops (could be as few as one, I suppose) is given boolean levels, clocked, and thereafter hold those values constantly on their outputs. A snapshot, so to speak, of a binary value. No altering of the outputs values occur, except when new inputs are clocked in, or the latch is cleared which means setting all outputs to zero.

D-type flip flops are the obvious choice, but exactly what you use or how it is triggered isn't vital to the idea of what a latch is, even if important in the particular circuit or chip you're designing or using.

share|improve this answer

A transparent latch is a device with a data input and a control input. The control input has two states which may be called "track" and "hold". Some devices will regard a "high" on the control input as "track" and a low input as "hold"; others do the opposite. Whenever the control input is in the "track" state, the state of the output will continuously attempt to follow the state of the data input (there will a short delay between the time the data input changes and the output reflects the change). If the control input goes from the "track" state to the "hold" state, provided that the last change to the data input has had a chance to reach the output, the output will hold its value until such time as the control input goes back to the "track" state.

While transparent latches may be used in many ways, it's important to understand at least two usage scenarios. In one scenario, the latch is used to turn a signal that will sometimes hold valid data and sometimes hold invalid data, into a signal which will always hold valid data. This is done by keeping the latch in the "hold" state any time the data input might not match the desired output data. To change the latched data, one would put the desired data on the input, then set the latch briefly to "track" state and back to "hold" state, being careful that the data input does not change to an unwanted value while the "hold" signal is active. This arrangement could be used to e.g. control 64 outputs using eight control signals and eight data signals. Each control signal operates eight latches, one of which is wired to each of the eight data signals. One could use edge-triggered flip flops just as easily as latches, but the circuitry for a latch is somewhat simpler. Note that an edge-triggered flip flop in this scenario would ideally trigger on the transition from "hold" to "track".

In the second usage scenario, the input may not be meaningful at the time the latch switches to "transparent", but will become meaningful prior to the latch switching to "hold". If the devices that use its output won't care about its state until some time after the latch has switched to "hold", then it will be the state of the data input at that time which will be fed to the output. One may be able to use an edge-triggered flip flop in this scenario, but it must trigger on the transition from "track" to "hold". Note that if the data input to the latch becomes valid a significant time before the transition from "hold" to "track", the output will do likewise. By contrast, the output of a flip flop would only become valid when the clock changed.

share|improve this answer

The difference between latches and flip-flops is, their outputs are constantly affected by their inputs as long as the enable signal is present. When they are enabled, their content changes immediately when their inputs change. Flip-flops have their content change only either at the rising or trailing edge of the enable signal. This enable signal controls the clock signal. After the rising or trailing edge of the clock, the flip-flop content remains constant even if the input changes.

share|improve this answer

the main difference is latch is level triggered for which race around condition arises in JK-latch and T-latch where as there is no race around condition in JK-FF and T-FF..and flipflops are edge triggered so no race around condition in FF.

share|improve this answer

The main difference between latches and flip-flops is that for latches, their outputs are constantly affected by their inputs as long as the enable signal is asserted. In other words, when they are enabled, their content changes immediately when their inputs change. Flip-flops, on the other hand, have their content change only either at the rising or falling edge of the enable signal. This enable signal is usually the controlling clock signal. After the rising or falling edge of the clock, the flip-flop content remains constant even if the input changes

share|improve this answer
This doesn't seem to add anything not already covered in Prasanth's answer that was posted over two years ago. – PeterJ May 7 '14 at 3:16

protected by Dave Tweed Jun 28 '14 at 11:22

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.