Pick up almost any digital design textbook and you will encounter latches and flip-flops within the first few chapters on sequential logic. They look similar on paper — both store a single bit, both have outputs labeled Q and Q̄ — but the way they respond to control signals is fundamentally different, and that difference shapes nearly every timing decision a designer makes. Confuse the two, and you risk introducing glitches, race conditions, or timing violations that are notoriously hard to debug at the gate level.
This article explains what latches and flip-flops are, how they work at a circuit level, what the four standard flip-flop types do differently, and what the critical timing constraints mean in practice. It also covers the real-world tradeoffs — including why latches remain common in ASIC design while most FPGA workflows actively discourage them — so you have enough context to make the right choice for your own design.
|
Digital Design Essentials
Flip-Flop vs Latch
The timing difference every digital designer must know |
⚡
TIMING
|
| Core Distinction | Latches are level-sensitive (transparent while enabled) · Flip-flops are edge-triggered (capture only at the clock edge) |
|
Latch
Level-Sensitive
Output follows input continuously while the Enable (EN) signal is active. Closes and holds state when EN goes inactive. Control Signal
Enable (EN) — high or low level
|
Flip-Flop
Edge-Triggered
Output updates only at a clock edge (rising or falling). Completely immune to input changes between edges. Control Signal
Clock (CLK) — rising or falling edge
|
Each type handles inputs differently to serve specific design needs
|
SR
Set-Reset
Fundamental type. S=high forces output high; R=high forces output low. ⚠ Forbidden: S=R=1 gives indeterminate output
|
D
Data / Delay
Single data input captured at clock edge. Resolves SR forbidden state via inverter. ★ Most used in registers, pipelines, FPGAs
|
|
JK
J-K
SR evolution: J=K=1 toggles output instead of invalid state. Most versatile type. Use for: Counters, frequency dividers
|
T
Toggle
JK with J=K tied together. T=1 toggles on every clock edge; T=0 holds. Use for: Ripple counters, ÷2 dividers
|
|
Aspect
|
Latch
|
Flip-Flop
|
|
Trigger Type
|
Level (EN)
|
Edge (CLK)
|
|
Output Updates
|
Continuously while EN active
|
Once per clock edge
|
|
Gate Count
|
Fewer (one stage)
|
More (two stages)
|
|
Glitch Sensitivity
|
High during enable window
|
Low — edge isolation
|
|
Power
|
Lower (no clock switching)
|
Higher (dynamic clock power)
|
|
Timing Analysis
|
Complex, limited tool support
|
Well-defined STA support
|
|
FPGA Suitability
|
⚠ Discouraged
|
✔ Preferred (hard FF resources)
|
|
ASIC Suitability
|
✔ Area/power savings
|
✔ Standard choice
|
Three parameters define every synchronous design’s timing budget
|
⏱
Setup Time (tsu)
Data must be stable before the clock edge for reliable capture. |
⏳
Hold Time (th)
Data must remain stable after the clock edge to prevent metastability. |
Propagation Delay (tCQ)
Time from clock edge to valid output at Q. Sets combinational path budget. |
→CPU registers & pipeline stages
→Counters & frequency dividers
→Shift registers (SPI, UART)
→Clock domain crossing synchronizers
→Finite state machines (FSM)
|
Latch Uses
→Address latching on multiplexed buses
→Low-power ASIC storage (no clock)
→Control signal gating
→ASIC time-borrowing in critical paths
|
|
1
|
Latches = level-sensitive transparency. Any input change during the active enable window passes directly to the output — including glitches and noise. |
|
2
|
Flip-flops = edge-triggered isolation. A master-slave latch pair ensures output changes exactly once per clock cycle — the foundation of synchronous design. |
|
3
|
D flip-flop is the industry default. Its single data input and clean edge capture make it the basis of registers, pipelines, and nearly all FPGA/ASIC storage elements. |
|
4
|
Unintended latches in RTL are a warning sign. If synthesis infers a latch you didn’t explicitly design, incomplete conditional branches in your code are the likely cause. |
|
5
|
Latches have legitimate ASIC roles. Expert designers use them deliberately for area/power savings and time-borrowing in timing-critical paths — never accidentally. |
|
WIN SOURCE
Global Independent Distributor of Electronic Components
|
|
What Is a Latch?
A latch is a level-sensitive bistable storage element. It holds one bit of binary information and can exist in one of two stable states — logic 0 or logic 1. The defining characteristic of a latch is that its output can change at any moment while its enable (EN) signal is at an active level. When EN is high (for a positive-level latch), the output follows the input continuously and in real time. The moment EN goes low, the latch “closes” and holds whatever value was present at the input at that instant.
This continuous responsiveness is often called transparency. During the active enable window, a latch is transparent — any glitch, noise spike, or valid transition on the input propagates directly to the output. That behavior is exactly what makes latches fast and simple, and also exactly what makes them a source of timing hazards in complex circuits. A basic SR latch can be constructed from just two cross-coupled NAND or NOR gates (four for a gated latch), keeping its gate count low and its propagation delay short.
The most common latch variants are the SR latch (Set-Reset), which has separate set and reset inputs; and the D latch (Data latch), which adds an inverter between the set and reset paths to prevent the forbidden simultaneous-high input condition. Both types share the same fundamental level-triggered behavior.
What Is a Flip-Flop?
A flip-flop is an edge-triggered bistable storage element. Like a latch, it stores one bit of data. Unlike a latch, its output changes state only at a specific transition of the clock signal — either the rising edge (low-to-high transition) or the falling edge (high-to-low transition), depending on the design. Between clock edges, the flip-flop output is completely immune to input changes; it holds its last captured value regardless of what happens on the data line.
This edge-triggered behavior is what makes flip-flops the default building block for synchronous digital systems. Because state changes are anchored to defined clock events, timing analysis becomes tractable: tools can calculate propagation delays along every combinational path and verify that data arrives at each flip-flop input within the required setup window. The result is a predictable, well-controlled system where all registers update at the same instant — the clock edge.
How a Flip-Flop Is Built from Latches
A standard edge-triggered flip-flop is constructed by placing two latches in series in a master-slave configuration. The first stage — the master latch — is connected to the data input and is enabled during one phase of the clock. The second stage — the slave latch — is connected to the master’s output and is enabled during the opposite clock phase. Because the two stages are always enabled in opposition, data can flow through only one stage at a time.
During the low phase of the clock, the master latch is transparent and accepts new input data, while the slave latch is closed and holds the previous output. When the clock transitions to high (the active edge), the master closes and freezes whatever data it just captured, while the slave opens and propagates that captured value to the output. The result is that the flip-flop output changes exactly once per clock cycle, at the active edge — which is precisely the edge-triggered behavior that makes synchronous design reliable.
This architecture also explains why flip-flops require more gates than standalone latches. A D flip-flop is two latch stages plus clock inversion, so it needs roughly twice the gates of a single latch. That additional complexity is the price of predictable, glitch-immune timing.
Types of Flip-Flops: SR, D, JK, and T
The four standard flip-flop types differ in how their inputs determine the next stored state. Each was developed to address a specific limitation or application requirement.
SR Flip-Flop (Set-Reset)
The SR flip-flop is the most fundamental type — an edge-triggered, clocked version of the SR latch. It has two inputs: S (Set) forces the output high, and R (Reset) forces the output low. The significant limitation is that applying a logic 1 to both S and R simultaneously creates an indeterminate output state — the circuit behavior is unpredictable. This forbidden state makes the SR flip-flop unsuitable for most modern designs, though it appears frequently in introductory coursework as a teaching tool.
D Flip-Flop (Data or Delay)
The D flip-flop resolves the SR forbidden state by connecting a single inverter between the set and reset paths, ensuring the two inputs are always complementary. It has one data input (D) and a clock input. At the active clock edge, whatever logic level is present on D is captured and appears at Q. The D flip-flop is by far the most widely used type in practical digital design — it forms the basis of registers, pipeline stages, and nearly all synchronous storage elements in microprocessors and FPGAs.
JK Flip-Flop
The JK flip-flop is an evolution of the SR design that eliminates the forbidden state by defining a specific behavior when both inputs are high: the output toggles. When J=1 and K=0, the output is set. When J=0 and K=1, the output is reset. When both are low, the output holds its current state. When both are high, the output inverts. This toggle functionality makes the JK flip-flop useful in counters and frequency dividers, and it is versatile enough to emulate any other flip-flop type through appropriate input connections.
T Flip-Flop (Toggle)
The T flip-flop is a simplified version of the JK design, created by tying both J and K inputs to the same signal. When T=1, the output toggles on every clock edge. When T=0, the output holds. This clean toggle behavior makes T flip-flops natural building blocks for binary ripple counters and frequency dividers, where each stage divides the clock frequency by two. In practice, T flip-flops are often synthesized from D or JK types rather than implemented as distinct silicon primitives.
Timing Constraints: Setup Time, Hold Time, and Propagation Delay
Edge-triggered flip-flops impose specific timing requirements on the data signals they capture. Understanding these constraints is essential for any synchronous design.
- Setup time (tsu): The minimum time that the data input must be stable before the active clock edge. If data arrives too late, the flip-flop may not reliably capture the correct value.
- Hold time (th): The minimum time that the data input must remain stable after the active clock edge. Violating hold time can cause metastability or incorrect data capture.
- Propagation delay (tpd or tCQ): The time from the active clock edge to the point when the new output value is valid and stable at Q. This delay determines how much time is available for combinational logic between two flip-flop stages.
Latches do not have setup and hold times defined relative to a clock edge in the same way. Instead, their data must be stable before the enable signal deactivates — a condition that is harder to guarantee globally across a design, particularly when the enable signal itself is generated by combinational logic. This is one of the core reasons why latch-based timing analysis is significantly more complex than flip-flop-based analysis, and why EDA tool support for latches has historically lagged behind.
Latch vs Flip-Flop: Side-by-Side Comparison
The table below summarizes the key differences between latches and flip-flops across the dimensions that matter most to a digital designer.
| Aspect | Latch | Flip-Flop |
|---|---|---|
| Trigger type | Level-sensitive (EN high or low) | Edge-triggered (rising or falling CLK) |
| Control signal | Enable (EN) | Clock (CLK) |
| When output updates | Continuously while EN is active | Once per clock edge |
| Transparency | Transparent during active enable | Opaque between clock edges |
| Gate complexity | Lower (one latch stage) | Higher (two latch stages plus clock inversion) |
| Propagation delay | Short D-to-Q path while transparent | Defined clock-to-Q delay (tCQ) |
| Power consumption | Lower (no continuous clock switching) | Higher (clock transitions add dynamic power) |
| Glitch sensitivity | High during active enable window | Low (edge isolation suppresses glitches) |
| Timing analysis | Complex, tool support limited | Well-defined, fully supported by STA tools |
| Design style fit | Asynchronous or low-power ASIC | Synchronous digital systems |
| FPGA suitability | Discouraged (fabric and timing tools built around flip-flops) | Preferred (hard flip-flop resources available) |
| ASIC suitability | Used intentionally for area/power savings | Standard choice for most logic |
| Typical applications | Address latching, control gating, low-power storage | Registers, counters, pipelines, shift registers |
When to Use a Latch vs a Flip-Flop
For the vast majority of synchronous digital designs — including most FPGA and ASIC work — flip-flops are the right choice. Their edge-triggered behavior maps cleanly to static timing analysis (STA) workflows, where tools calculate setup and hold slack along every register-to-register path. If an STA tool reports a latch in your design that you did not intentionally place there, it almost certainly means incomplete conditional branches in your RTL code have inferred an unintended latch. This is a common coding error and should be corrected.
Latches remain genuinely useful in specific contexts. In high-performance ASIC design, latches consume less silicon area and less power than flip-flops because they require fewer transistors and do not switch on every clock cycle. Expert ASIC designers sometimes use latches deliberately in timing-critical paths to exploit a technique called time borrowing, where a path that runs slightly long in one half-cycle can borrow time from the next — something a flip-flop cannot permit. This requires careful, manual timing analysis and is not a practice for general use.
Latches are also appropriate in asynchronous or semi-asynchronous circuits where there is no global clock, in address decode logic that requires immediate response to input changes, and in certain power-gating schemes where a running clock would waste energy. In all these cases, the designer must ensure the enable signal itself is glitch-free and well-timed — because any noise on the enable line during the active window will corrupt the stored value.
On FPGAs, the situation is more clear-cut. FPGA fabric is built around the dedicated flip-flops in every logic cell. Some families allow a cell’s storage element to be configured as a latch, but synthesis tools flag inferred latches, timing analysis handles them poorly, and a latch built from LUT feedback creates a combinational loop with uncertain timing. Unless you have a specific architectural reason, latches in FPGA designs should be avoided entirely.
Common Applications in Digital Systems
Understanding where each element appears in real hardware — from discrete logic ICs to the registers inside a processor — helps connect the theory to practice. The applications below reflect the typical division of labor between latches and flip-flops in production designs.
Flip-Flop Applications
- CPU registers and pipeline stages: D flip-flops hold operand values and intermediate results between pipeline stages, ensuring data is synchronized to the processor clock.
- Counters and frequency dividers: T and JK flip-flops chain together to form binary ripple or synchronous counters used in clocks, timers, and frequency synthesis circuits.
- Shift registers: Cascaded D flip-flops move data serially, enabling serial-to-parallel and parallel-to-serial conversion in communications interfaces such as SPI and UART.
- Clock domain crossing: Synchronizer flip-flops (typically two in series) reduce the probability of metastability when signals cross between asynchronous clock domains.
- State machines: The current state of a finite state machine (FSM) is stored in flip-flops, with combinational logic computing the next state and output based on the current state and inputs.
Latch Applications
- Address latching on multiplexed buses: In microcontroller interfaces with a multiplexed address/data bus, a transparent latch holds the address valid while the bus switches to data mode — a classic application of level-triggered behavior.
- Low-power storage in ASIC paths: Latches are used in power-managed ASIC blocks where logic is gated off for long periods; the latch holds state without a continuous clock.
- Control signal gating: Simple enable-gated latches capture and hold control signals in circuits that need an immediate response to an asynchronous event, provided the enable source is clean.
- ASIC time-borrowing paths: As described above, expert designers use latches in specific timing-critical paths to balance slack across pipeline stages and meet cycle-time targets.
Conclusion
The distinction between a latch and a flip-flop comes down to one fundamental question: does the storage element respond continuously to a control level, or only at a clock edge? Latches are level-sensitive, transparent while enabled, compact, and fast — but they introduce timing uncertainty that is hard to manage at scale. Flip-flops are edge-triggered, immune to input noise between clock events, and deeply integrated into the static timing analysis workflows that modern synchronous design depends on.
In practice, flip-flops are the default choice for synchronous digital design, and any unintended latch inferred in RTL synthesis is a warning worth investigating. Latches have a legitimate role in ASIC design for area and power optimization, in asynchronous control paths, and in specific timing-borrow techniques — but those applications call for deliberate, well-analyzed placement, not accidental inference. Knowing the difference, and understanding the architectural reasons behind it, is a basic competency for anyone working with sequential digital logic.
Frequently Asked Questions
Is a latch faster than a flip-flop?
A transparent latch passes data straight from D to Q while it is enabled, so its data path is short, and it needs fewer gates than a flip-flop. A flip-flop adds a defined clock-to-Q delay because data must pass through two latch stages. In return, the flip-flop gives predictable, edge-aligned timing that static timing analysis can verify across a whole design.
Why do synthesis tools warn about inferred latches?
An inferred latch usually means an if or case statement in combinational RTL does not assign a value on every branch, so the tool has to hold the previous value. Unintended latches make timing hard to analyze and let glitches through while enabled. Complete every branch or add a default assignment unless the latch is deliberate.
Can you use latches in an FPGA design?
It is possible but rarely advisable. FPGA fabric, synthesis and timing tools are built around flip-flops; some families can configure a storage element as a latch, but inferred latches are flagged as warnings and are harder to constrain. Use flip-flops unless there is a specific architectural reason.
What causes metastability in a flip-flop?
Metastability occurs when data changes inside the setup-and-hold window around the clock edge, leaving the output temporarily between logic levels before it resolves. It is most common where signals cross between unrelated clock domains, which is why designers place two or more synchronizer flip-flops in series at those crossings.
Which type of flip-flop is most common?
The D flip-flop. Its single data input avoids the SR forbidden state, and it forms the basis of registers, pipeline stages, shift registers and state-machine storage in microprocessors, FPGAs and ASICs. JK and T behavior is usually synthesized from D flip-flops rather than built as separate primitives.
Part discontinued, obsolete or hard to find?
WIN SOURCE is a global independent distributor of electronic components, supporting component supply, shortage sourcing, lifecycle management and alternative solutions. Visual inspection, non-destructive testing and electrical testing are applied according to material risk, customer requirements and the applicable quality process, and orders are covered by the published return policy and a 3-year warranty on eligible components.
Stock and pricing are updated daily — search a part number or contact us for current availability, lead time and a quote.
© 2026 Win Source Electronics. All rights reserved. This content is protected by copyright and may not be reproduced, distributed, transmitted, cached, or otherwise used without the prior written permission of Win Source Electronics.

