What is a flip flop? How it differs from a Latch?
Flip flops and latches are the two important elements of any digital circuit. They are used as a memory device in digital ICs. Both the flip flop and latch are used to store one-bit data at a time. But there is a difference between the latch and the flip flop.
The major difference is that in latch, the output changes based on the change in its input. That’s the reason, the latch work in an asynchronous manner. But the output of the flip flop changes with respect to the clock pulse input. The change in input will be seen at the output only at the occurrence of each clock signal.
What is a Latch?
Latch is an electronic device that instantly changes its output based on the applied input. Latches are used to store either 0 or 1 at any specified time. In other words, a flip flop without a clock signal is said to be a latch.
It operates in the same way as that of an active enable pin. When the enable pin goes high, the change in input causes the change in the output. This means with the change in input, the stored information also changes.
The sequential circuit with a latch as a memory element is called an asynchronous sequential circuit.
What is a flip flop?
Flip-flops are the basic memory element of digital logic circuits. It can store one bit at a time and consists of four or more logic gates, built with transistors.
It has two stable states and is hence called a bistable multivibrator. Logic 1(High) and Logic 0(Low) are the two stable states of a flip flop. Flip flops are used as the memory component in sequential circuits. In a sequential circuit, the output is obtained from the combinational circuit.
Structure of a flip-flop
Flip flops can be designed with either NAND gates or AND gates or NOR gates. Generally, a flip flop has two inputs and two outputs(Q and Q’). Here Q is the normal output and Q’ is the inverted output.
When the output Q = 1 and Q’ = 0, then the flip flop is said to be in SET or Logic HIGH state. On the other side, if the outputs are Q = 0 and Q’ = 1, then it is in RESET or CLEAR or Logic LOW state.
These states can be changed upon giving the control signal, which is the clock signal input to the flip flop. If no clock pulse is given, then the state of the flip flop remains unchanged always. So, in order to change the state from LOW to HIGH or from HIGH to LOW, it is mandatory to give the clock input.
If a flip flop works by the clock input, the circuit will work sequentially, synchronizing with the clock pulse. Such circuits are termed as a synchronous sequential circuit. Flip flops can be either edge-triggered flip flops or level-triggered flip flops.
Difference between Latch and Flip-flop
Latch | Flip-flop |
---|---|
It is an asynchronous memory element, which means the output produced from the latch depends on the input. | It is a synchronous memory element, which means the output produced depends on the clock pulse synchronization. |
It does not require any clock signal. | Flip-flops require clock pulse input. |
Latches are built with logic gates. | Flip-flops are constructed with latches and control signal (Clock signal) |
It is a Level triggering device. | It is an Edge triggering device |
The change in input will be reflected at the output and so more responsive to the inputs. | The change in input will not be reflected at the output side until the next clock pulse is triggered. |
It is easier to design. | Comparatively, it is complex to design. |
It is faster, as latch no need to wait for any signal to change its state. | It is slower in its operation, as it has to wait for the clock signal to change its state. |
Less power is needed for its operation. | More power is needed. |
Latches are used for the construction of asynchronous sequential circuits. | Flip flops are used for the construction of synchronous sequential circuits. |
Types of flip-flops
There are four types of flip-flop, as follows.
- SR flip flop – It is the basic and simplest type of flip flop. It is a single-bit storage element. The state of the SR flip flop is determined by the condition of the output Q. If its value is 1, then the state is said to be SET and if Q = 0, the state is said to be RESET.
- D flip flop – It is the most important of all the clocked flip-flops as it ensures that both the inputs S and R are never the same at the same time. It is constructed by joining the S and R inputs with an inverter in between them. Thus the D flip flop has single input(D).
- JK flip-flop – JK flip-flop is designed to overcome the invalid or indeterminate state of SR flip-flop. JK flip flop is a sequential bi-state single-bit memory element. It has two inputs(J and K).
- T flip flop – T flip flop is a modification of JK flip-flop. The J and K inputs are connected together to get the T input of flip flop. It is also called a Toggle flip flop. When there is no clock signal, it is also called a transparent latch.
Application of flip-flops
Flip flops are used in a number of applications, which include
- Counters
- Registers
- Shift registers
- Frequency dividers
- Data synchronizers
- Data storage
Related Posts