A flip-flop in digital electronics is a bistable circuit that has two stable states and is used to store one bit of binary information. The stored data can be changed by applying appropriate inputs. Flip-flops and latches are fundamental storage elements used in sequential logic and appear throughout digital systems such as computers, communication devices and control systems. A flip-flop is the basic storage element in synchronous sequential circuits.
The principal difference between a latch and a flip-flop is the way the device is controlled:


Note: Some designs use active-low inputs (signals are active when low). In those cases the meaning of "active" changes accordingly; care is required when reading truth tables or schematic labels.
There are four basic and widely used types of flip-flops:
The SR flip-flop has two inputs, S (set) and R (reset). When S is active the output Q is set to 1; when R is active the output Q is reset to 0. If both S and R are inactive, the flip-flop holds its previous state. The combination S = R = 1 is normally considered invalid (indeterminate) for the simple SR latch implementation because it leads to a contradiction for complementary outputs.

The SR flip-flop is the simplest flip-flop and is useful for understanding storage behaviour, but practical designs often prefer other types (JK or D) because they avoid the indeterminate input condition or provide more convenient control.
The JK flip-flop is an improved form of the SR flip-flop that removes the invalid (indeterminate) condition when both inputs are asserted. It has two inputs, J and K, and a clock input. The behaviour at the active clock edge is:


The characteristic equation for a JK flip-flop (next state Q+) can be written as Q+ = J·Q' + K'·Q. The JK flip-flop is versatile and can be wired to act as set/reset, toggle, or hold, hence it is used widely in counters and state machines.
The D flip-flop has a single data input D and a clock input. At the active clock edge the output Q takes the value of D and then holds it until the next active edge. This eliminates indeterminate input combinations and simplifies timing requirements for many designs. D flip-flops are commonly used for data storage, shift registers and synchronisation of asynchronous signals.


The defining relation for a D flip-flop is Q+ = D (sample on the clock edge).
The T flip-flop has a single input T and a clock. It toggles the output when T = 1 at the active clock edge, and holds the output when T = 0. A T flip-flop can be obtained by tying J and K of a JK flip-flop together (J = K = T).


The characteristic relation is Q+ = T ⊕ Q (logical exclusive OR), so when T = 1 the next state is the complement of the present state; when T = 0 the state is unchanged. T flip-flops are convenient for building binary counters and frequency dividers.
For design and analysis it is useful to know, for each flip-flop type, the characteristic table (gives Q+ as a function of inputs and present Q) and the excitation table (gives required inputs to achieve a desired transition from Q to Q+). These tables are standard design aids when converting one flip-flop type to another or when synthesising sequential circuits.
Flip-flops are bistable storage elements essential to sequential digital design. Understanding the differences between SR, JK, D and T flip-flops, their triggering behaviour, timing constraints (setup/hold), and how they are used in practical circuits is fundamental to designing reliable synchronous systems. Choose the flip-flop type according to the application: D for simple sampling and registers, JK or T for counters and toggle functions, and SR for basic set/reset control where the invalid condition is managed.
![]() | Explore Courses for Computer Science Engineering (CSE) exam |
![]() | Get EduRev Notes directly in your Google search |