New York, NY IMG HI 58° LO 56° Home About Contact
IMG-LOGO
Home › Experiments › Electronics › Latches vs Flip-Flops: SR, D, JK & T Types with Truth Tables and Circuits
Electronics

Latches vs Flip-Flops: SR, D, JK & T Types with Truth Tables and Circuits

What is a latch, what is a flip flop, and how do SR, D, JK and T types differ? A diagram-based guide with truth tables, characteristic equations, timing and circuits.

15 November, 2026 13 min read

Quick Answer — Latch vs Flip-Flop

A latch is a level-sensitive 1-bit memory: its output follows the input while the enable is active. A flip-flop is an edge-triggered 1-bit memory: it samples its input only at a clock edge. The types of latches are SR, gated SR and D. The types of flip-flops are SR, D, JK and T. Two latches in a master-slave pair make a flip-flop.

1. Why Latches and Flip-Flops Exist

Combinational circuits such as adders and multiplexers produce outputs that depend only on their present inputs. Real systems also need memory: counters, registers and processors must remember earlier values. The basic one-bit memory elements are latches and flip-flops. Both are bistable, meaning they have two stable states (0 and 1), but they differ in when they are allowed to change.

2. What Is a Latch in Digital Electronics?

A latch in digital electronics is a bistable circuit whose output depends on its inputs and its previous state. A latch is level-sensitive: while its enable input is active it is transparent and can change, and when enable is inactive it holds ("latches") the stored value.

The common types of latches in digital electronics are:

  • SR latch (NOR-based or NAND-based)
  • Gated SR latch (SR latch with an enable input)
  • D latch (transparent latch, no forbidden state)
  • JK and T latches (rare, because of the race problem)

3. SR Latch: NOR and NAND Versions

The SR (Set-Reset) latch is the simplest memory circuit. It is made from two cross-coupled gates, so each output feeds the other gate's input.

SR Latch from Two Cross-Coupled NOR GatesNORNORRSQQ'feedback wires crossEach output feeds the other gate, so the pair holds its last state

Figure 1: NOR-based SR latch. S sets Q to 1, R resets Q to 0.

Truth Table: NOR-Based SR Latch

SRQ (next)Q' (next)Operation
00Q (previous)Q' (previous)Hold
0101Reset
1010Set
1100Invalid (forbidden)

Truth Table: NAND-Based SR Latch (Active-Low)

S'R'Q (next)Operation
001 (and Q' = 1)Invalid (forbidden)
011Set
100Reset
11Q (previous)Hold

The Forbidden State

In the NOR latch, S = R = 1 forces both outputs to 0, so Q and Q' are no longer complements. If S and R then return to 0 together, the final state is unpredictable. Designers avoid this input combination.

4. Gated SR Latch and D Latch

A gated SR latch adds an enable input (EN). When EN = 0 the latch ignores S and R and holds its state. When EN = 1 it behaves as a normal SR latch.

The D latch removes the forbidden state by deriving R from S through an inverter (S = D, R = D'). Only one input, D, is needed.

ENDQ (next)Operation
0XQ (previous)Hold (opaque)
100Transparent, Q follows D
111Transparent, Q follows D

Transparent Latch

While EN = 1 the D latch is transparent: any change on D passes straight to Q. This is why a latch is called level-sensitive.

5. What Is a Flip Flop?

A flip flop is a bistable memory element that changes state only on a clock edge: the rising (positive) edge or the falling (negative) edge. Between edges it ignores changes at its inputs. This edge-triggering lets the many flip-flops in a processor change in step with a shared clock.

Block Symbols of the 4 Flip-Flops (clock triangle = edge-triggered)SRCLKQQ'SR flip-flopDCLKQQ'D flip-flopJKCLKQQ'JK flip-flopTCLKQQ'T flip-flopLatches use the same symbols but with an EN input instead of the clock triangle

Figure 2: Block symbols of the SR, D, JK and T flip-flops. The small triangle marks an edge-triggered clock input.

6. Latch vs Flip-Flop: Key Differences

Latch (level-sensitive) vs Flip-Flop (edge-triggered)CLK / ENDLatch QFF QShaded = latch transparent. The latch follows D (even glitches); the flip-flop samples D only at each rising edge (dashed).

Figure 3: The latch (red) follows D for the whole time it is transparent, while the flip-flop (green) updates only at rising clock edges.

FeatureLatchFlip-Flop
TriggerLevel-sensitive (enable)Edge-triggered (clock edge)
Output changesAny time enable is activeOnly at the clock edge
Built fromCross-coupled gatesTwo latches (master-slave) or edge-detect logic
ClockEnable / gate signalClock signal
Speed and areaFaster, fewer transistorsSlightly larger and slower
Timing analysisHarder (time borrowing)Simple, synchronous
Typical useStorage, debouncing, address latchingRegisters, counters, state machines

7. SR Flip-Flop

The SR flip-flop is a clocked version of the SR latch. At the active edge it sets (S = 1), resets (R = 1) or holds (S = R = 0). S = R = 1 remains forbidden.

SRQ(next)Action
00QNo change
010Reset
101Set
11XInvalid

Characteristic Equation

Q(next) = S + R'Q   (with S·R = 0)

8. D Flip-Flop

The D flip-flop (data or delay flip-flop) copies D to Q at the active clock edge. It is the most used flip-flop because it has one input and no forbidden state.

DQ(next)Action
00Reset
11Set

Characteristic Equation

Q(next) = D

9. JK Flip-Flop and Race-Around

The JK flip-flop improves the SR flip-flop by giving the J = K = 1 case a useful meaning: toggle.

JKQ(next)Action
00QHold
010Reset
101Set
11Q'Toggle

Characteristic Equation

Q(next) = J·Q' + K'·Q
JK Flip-Flop State DiagramQ = 0Q = 1J = 1 (set / toggle)K = 1 (reset / toggle)J = 0K = 0Transitions occur at the active clock edge. J = K = 1 always flips the state (toggle).

Figure 4: JK flip-flop state diagram showing hold, set, reset and toggle.

Race-Around Condition

With J = K = 1 and a level-triggered clock that stays high longer than the gate delay, the output toggles over and over during one pulse and ends in an unpredictable state. Use a master-slave or edge-triggered JK flip-flop to avoid it.

10. T Flip-Flop

The T (toggle) flip-flop holds its state when T = 0 and toggles on each active edge when T = 1. It is a JK flip-flop with J and K tied together.

TQ(next)Action
0QHold
1Q'Toggle

Characteristic Equation

Q(next) = T ⊕ Q

With T = 1 the output frequency is half the clock frequency, so a T flip-flop is a divide-by-2 circuit and the basis of binary counters.

11. Master-Slave Flip-Flop

A master-slave flip-flop connects two latches in series with opposite clock phases. The master captures the input while the clock is low, and the slave copies the master while the clock is high. The output therefore changes only at the clock transition.

A D Flip-Flop = Two D Latches (Master + Slave)MASTERSLAVEDQDQDQmQCLKBubble = inverted clock: master is open when CLK = 0, slave when CLK = 1, so Q changes only at the rising edge

Figure 5: A D flip-flop built as a master-slave pair of D latches.

12. Characteristic and Excitation Tables

The excitation table tells you which inputs are needed to move from the present state Q to the next state Q(next). It is used to design counters and state machines. X means don't care.

QQ(next)S RDJ KT
000 X00 X0
011 011 X1
100 10X 11
11X 01X 00
Flip-flopCharacteristic equationBehaviour
SRQ+ = S + R'QSet, reset, hold (S=R=1 invalid)
DQ+ = DCopies input
JKQ+ = JQ' + K'QSet, reset, hold, toggle
TQ+ = T ⊕ QHold or toggle

13. Applications and Which to Use

Registers and Memory

Groups of D flip-flops store multi-bit words.

Counters

T and JK flip-flops chain together to count in binary.

Frequency Division

A T flip-flop halves the clock frequency each stage.

Switch Debouncing

An SR latch cleans up bouncing mechanical contacts.

Synchronisers

Cascaded D flip-flops pass asynchronous signals safely into a clock domain.

State Machines

Flip-flops hold the present state of a sequential circuit.

Rule of Thumb

Use D flip-flops for most synchronous design, T for counters and dividers, JK when you need set, reset and toggle, and an SR latch for simple asynchronous storage.

Quick Summary: Latches vs Flip-Flops

ElementTriggerNext state
SR latchLevelS sets, R resets
D latchLevel (EN)Q = D when EN = 1
SR / D / JK / T flip-flopClock edgeSee characteristic equations

Frequently Asked Questions (FAQ)

A latch is a basic bistable memory circuit that stores one bit. It is level-sensitive: its output can change whenever its enable (or control) input is active, and it holds its value when enable is inactive. The simplest form is the SR latch built from two cross-coupled NOR or NAND gates.

A flip-flop is a bistable circuit that stores one bit and changes its output only on a clock edge, either the rising or the falling edge. This edge-triggered behaviour makes flip-flops the building block of registers, counters and synchronous sequential circuits.

A latch is level-sensitive and is transparent while its enable input is active, so the output can follow the input for the whole enable period. A flip-flop is edge-triggered and samples its input only at a clock edge, so the output changes once per clock cycle. Flip-flops are usually built from two latches in a master-slave arrangement.

The main types of latches are the SR latch (NOR or NAND based), the gated SR latch, the D latch (transparent latch) and, less commonly, the JK and T latches. The SR latch is the fundamental one, the gated SR latch adds an enable input, and the D latch removes the forbidden state.

The four standard flip-flops are SR, D, JK and T. SR sets and resets, D copies its input, JK extends SR by toggling when both inputs are 1, and T toggles on every clock edge when T is 1. Each is described by a truth table, a characteristic equation and an excitation table.

In a NOR-based SR latch, S = 1 and R = 1 forces both outputs to 0, which breaks the rule that Q and Q' are complements. When both inputs return to 0 together, the final state is unpredictable because of a race between the gates. This input combination is therefore avoided.

If a level-triggered JK flip-flop has J = K = 1 and the clock stays high longer than the propagation delay, the output toggles repeatedly during that single clock pulse. The final state is unpredictable. It is solved with a master-slave or edge-triggered JK flip-flop.

SR: Q(next) = S + R'Q with SR = 0. D: Q(next) = D. JK: Q(next) = JQ' + K'Q. T: Q(next) = T XOR Q. These equations give the next state in terms of the inputs and the present state.

To make a T flip-flop, tie J and K together and use that line as T. To make a D flip-flop, connect D to J and connect an inverter from D to K. These conversions use the characteristic equation of the JK flip-flop.

A master-slave flip-flop uses two latches in series with opposite clock phases. The master is enabled while the clock is one level and the slave while it is the other, so the output changes only at the clock transition. It prevents the race-around condition and gives edge-like behaviour.

A D latch passes D to Q the whole time its enable is high, so Q can change several times during one enable pulse. A D flip-flop captures D only at the clock edge and holds it until the next edge. Use latches for simple storage and flip-flops for synchronous design.

Flip-flops are used in registers, counters, shift registers, frequency dividers, finite-state machines and synchronisers. Latches are used in switch debouncing, simple data storage, address latching and as the internal cells of flip-flops and some memory circuits.