latch vs flip flop-Difference between latch and flip flop
This page compares latch vs flip flop and mentions difference between latch and flip flop. It mentions examples of SR latch with enable and SR flip flop in order to provide comparison between latch and flip flop.
SR Latch

Fig-1: SR Latch with Enable
The figure-1 depicts SR latch with enable using NAND Gates.
➨When E = 1, the circuit behaves like the normal NAND implementation of the SR latch except that the S and R inputs are active
high rather than low.
➨When E = 0, the latch remains in its previous state regardless of the S and R inputs.

In actual circuits, the enable input can either be active high or low, and may be named ENABLE, CLK, or CONTROL.
A typical operation of the latch is shown in the timing diagram.
➨Between t0 and t1, E = 0 so changing the S and R inputs do not affect the output.
➨Between t1 and t2, E = 1 and hence changing the S/R will affect the output accordingly.
SR Flip flop

Fig-2: SR Flipflop
We have seen in figure-1 that, output changes when enable signal is high and hence it is known as level triggered. When the Enable pin in figure-1 is replaced with clock input then the circuit acts as flip flop which is shown in the figure-2. The circuit in figure-2 is called flip flop only when clock goes from low to high or high to low. This is because circuit is operational during this edge transitions.
Master and Slave SR Flip flop

Fig-3: Master slave SR Flipflop
Both latches and flipflops are useful in setting and resetting the data bit. But unlike latches, flip flops will change the content at the active edge of clock signal only. When both the inputs are asserted simultaneously , like their latch (i.e. SR) counterpart, flip flop (i.e. SR) can enter into undefined state.
Tabular difference between latch and flip flop
Following table mentions similarities and difference between latch and flip flop.
Latch | Flip flop |
---|---|
It is bistable device which stores either 0 or 1. | It is also bistable device which stores either 0 or 1. |
Flip flop changes state only during the clock signal. | Latch changes state as soon as input is given and does not depend on control input or clock input i.e. there is no clock present in latch. |
In flip flop, there is control over operation using clock signal. | In latch, there is no control over operation unless we desire to have with the help of enable signal. |
Based on edge triggering (low to high transition or high to low transition) there are two types of flipflops viz. positive edge triggered and negative edge triggered. There is also type of flip flop which triggers based on pulse middle part known as pulse triggered flip flop. | The latch which gets activated based on enable signal (in logic high state) and remains in deactivated state when enable signal is low; is known as gated latch. |
Examples of flip flops are D flip flop, T flip flop, SR flip flop, JK flip flop | Examples of latches are D latch, T latch, SR latch, JK latch |
Flip flop VHDL Verilog source codes
D Flipflop with synchronous reset verilog code
D Flipflop without reset verilog code
Flip flop conversion equations
D Flipflop
T Flipflop
JK Flipflop
What is Difference between
difference between FDM and OFDM
Difference between SC-FDMA and OFDM
Difference between SISO and MIMO
Difference between TDD and FDD
Difference between 802.11 standards viz.11-a,11-b,11-g and 11-n
OFDM vs OFDMA
CDMA vs GSM