Contents

Digital Electronics
Number Systems
Logic Gates
Boolean Algebra
Combinational Circuits
Sequential Circuits
Memory & PLDs
Digital System Design
Other Topics
Other Subjects
Section Progress15%

4 of 27 articles

D Flip-Flop

Data flip-flop, no invalid state, transparent latch vs edge.

Darshan N
Updated: 19 March 2026
4 min read

The D flip-flop is the most widely used sequential element in digital systems. It solves a fundamental problem in the SR flip-flop by eliminating the invalid state, making it the preferred building block for registers, memory cells, and data pipelines.

Unlike combinational circuits, a D flip-flop stores a single bit of information and updates it only on the active edge of a clock signal. This controlled update mechanism is what makes synchronous digital design reliable and predictable.

D Flip-FlopDCLKQQ'Data InClockOutputInvertedQ(t+1) = D(at active clock edge)Truth TableD=0, CLK edge: Q=0D=1, CLK edge: Q=1No CLK edge: Q=Q (holds)No invalid state exists
Figure 1: D Flip-Flop symbol showing data input, clock input, and outputs

Core Concept Explanation

The D flip-flop has a single data input called D and a clock input CLK. The output Q follows the D input, but only at the moment of the active clock edge, either rising or falling depending on the design. Between clock edges, the output holds its last value regardless of what happens on the D line.

This is fundamentally different from a transparent latch such as the SR or D latch. In a D latch, when the enable signal is high, any change on D immediately passes through to Q. This is called transparency and it causes problems in synchronous systems because glitches on D can corrupt the output. The edge-triggered D flip-flop fixes this by sampling D only at the instant of the clock edge and ignoring D at all other times.

Internally, a positive edge-triggered D flip-flop is built from two cascaded D latches called the master-slave configuration. The master latch is transparent when CLK is low and the slave latch is transparent when CLK is high. On the rising edge, the master closes and the slave opens, transferring the captured value to Q. This two-stage arrangement ensures that D never has a direct path to Q except at the edge.

Mathematical Expression

The characteristic equation of the D flip-flop is the simplest among all flip-flop types. The next state Q(t+1) depends only on the present value of D, making analysis and design straightforward.

The characteristic equation is: Q(t+1) = D. This means whatever value is present at D during the active clock edge becomes the new stored value. The present state Q(t) plays no role, which is why the D flip-flop has no excitation table ambiguity.

The excitation table shows what D must be to achieve a required state transition. If Q must go from 0 to 0, D must be 0. If Q must go from 0 to 1, D must be 1. If Q must go from 1 to 0, D must be 0. If Q must go from 1 to 1, D must be 1. The pattern is simply D = Q(t+1), which makes it the easiest flip-flop to use in state machine design.

Practical Understanding

In practice, the D flip-flop is the storage element inside every processor register, cache cell, and pipeline stage. When a CPU stores a result in a register, millions of D flip-flops simultaneously capture data on the clock edge. The synchronous behavior ensures all flip-flops update at exactly the same clock event, preventing race conditions that would cause random data corruption.

The D flip-flop is also used to implement shift registers by connecting the Q output of one flip-flop to the D input of the next. Each clock edge shifts the data one position. This forms the basis of serial communication interfaces and FIFO buffers.

Example
Given:
A D flip-flop is clocked at 100 MHz. D input changes 2 ns before the rising edge and holds for 3 ns after the edge. Setup time = 1.5 ns, Hold time = 1 ns.

Why this formula applies:
The flip-flop captures data only if D is stable for setup time before and hold time after the clock edge.

Formula:
Setup check: time D is stable before edge >= t_setup
Hold check: time D is stable after edge >= t_hold

Substitution:
Setup margin = 2 ns >= 1.5 ns (pass)
Hold margin = 3 ns >= 1 ns (pass)

Calculation:
Setup slack = 2 - 1.5 = 0.5 ns
Hold slack = 3 - 1 = 2 ns

Final Answer:
Flip-flop captures data correctly. Setup slack = 0.5 ns, Hold slack = 2 ns. No timing violation.
Exam Tip: The characteristic equation Q(t+1) = D is asked directly in GATE. Also remember: D flip-flop excitation requires D = Q(t+1), making state table design trivially simple compared to JK or SR flip-flops.
  • D flip-flop eliminates the invalid state present in SR flip-flop by tying S = D and R = D-bar internally.
  • Edge-triggered type samples D only at clock edge, transparent latch samples D whenever enable is high.
  • Master-slave construction internally prevents transparency by using two latches with complementary enables.
  • Characteristic equation Q(t+1) = D is the simplest of all flip-flop types.
  • Used in registers, shift registers, pipeline stages, and any synchronous storage application.

Loading lab...

Quick Revision

  • Characteristic equation: Q(t+1) = D
  • No invalid state. SR invalid state (S=R=1) is eliminated since R = D-bar always.
  • Edge-triggered flip-flop captures D only at active clock edge, not during entire clock level.
  • Transparent D latch: output follows D when enable is high, can cause glitch propagation.
  • Master-slave D flip-flop uses two cascaded latches to achieve edge-triggered behavior.
  • Excitation table: D = Q(t+1), so required D value directly equals the desired next state.
  • GATE trap: Do not confuse a level-sensitive D latch with an edge-triggered D flip-flop. They behave differently when D changes during the active clock phase.

D Flip-Flop Quiz

Study data flip-flops and edge-triggering.

Question 1 of 3

Q1.The characteristic equation of a D Flip-Flop is: