DE Notes
Complete guide to D flip-flop: circuit diagram, truth table, excitation table, timing diagram, master-slave D flip-flop, preset/clear inputs, and applications in registers and pipelines.
What is a D Flip-Flop?
The D (Data) flip-flop is the most widely used flip-flop. It has a single data input D and a clock input. On the active clock edge, the output Q follows the D input.
Characteristic equation (next state):
The output simply follows whatever D was at the clock edge — hence the name "Data" flip-flop.
Excitation Table
The excitation table answers: "What input D is needed to go from Q(t) to Q(t+1)?"
| Q(t) | Q(t+1) | D (required) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Conclusion: D = Q(t+1) always. To get any desired next state, simply apply that value to D.
Timing Diagram
| CLK | ─┐ ┌─┐ ┌─┐ ┌─┐ ┌─ |
| D | ───────┐ ┌───┐ |
| Q | ─────────┐ ┌─── |
Setup time: D must be stable BEFORE clock edge (typically 5-10 ns) Hold time: D must remain stable for a brief period AFTER clock edge (typically 0-2 ns) Propagation delay (tpd): Time from clock edge to Q changing (typically 5-15 ns)
Master-Slave D Flip-Flop
Built from two latches — eliminates the "1s catching" problem. First (master) latch captures D when CLK=1; second (slave) latch transfers to output when CLK=0.
Building D Flip-Flop from SR Flip-Flop
SR flip-flop has forbidden state (S=R=1). D flip-flop eliminates this by tying R = D̄:
D Flip-Flop Applications
1. Data Register (Storage)
2. Shift Register
3. Pipeline Register (between combinational stages)
4. Frequency Divider
| Q toggles every clock cycle | output is CLK/2 |
| Two cascaded | CLK/4 |
| Three cascaded | CLK/8 |
IC Implementations
| IC | Type | Description |
|---|---|---|
| 7474 | Dual D | 2 positive edge-triggered D flip-flops with preset/clear |
| 74175 | Quad D | 4 D flip-flops, common clock and clear |
| 74374 | Octal D | 8 D flip-flops, 3-state outputs |
7474 Pin connections: D, CLK, PR̄ (preset), CLR̄ (clear), Q, Q̄
Preset/Clear operation:
- PR̄ = 0 (active LOW): forces Q=1 asynchronously (ignores clock)
- CLR̄ = 0 (active LOW): forces Q=0 asynchronously (ignores clock)
- Both HIGH: normal clocked operation
Interview Questions
Q1: What is the characteristic equation of a D flip-flop? Q(t+1) = D. The next state equals the D input at the active clock edge. This is why D flip-flops are ideal for data storage — the D input directly specifies the desired next state.
Q2: How does a D flip-flop differ from a D latch? A D latch is level-sensitive — when Enable=1, Q continuously follows D. A D flip-flop is edge-triggered — Q only updates at the active clock edge (rising or falling). Flip-flops provide predictable, synchronous operation needed in sequential circuits.
Q3: Why is the D flip-flop the most commonly used flip-flop in practice? The D flip-flop's excitation table shows D = Q(t+1) — you simply connect the desired next state directly to D. This makes it trivially easy to implement any state machine or register without excitation equation derivation. Other flip-flops (JK, T) require more complex excitation logic.
Q4: What is setup time violation and what happens if it occurs? Setup time violation occurs when D changes too close to the active clock edge (violating the minimum setup time requirement). The flip-flop enters a metastable state — an indeterminate, unstable condition where Q is neither definitively 0 nor 1. The flip-flop may resolve to either state after a random settling time, causing unpredictable circuit behavior.
Q5: How do you build a 2-bit counter using D flip-flops?
| Q0⁺ = Q0̄ (Q0 toggles every cycle | D0 = Q0̄) |
| Q1⁺ = Q1 ⊕ Q0 (Q1 toggles when Q0=1 | D1 = Q1 ⊕ Q0) |
| Count sequence: 00 | 01 → 10 → 11 → 00 ... |
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for D Flip-Flop — Data Flip-Flop Working, Truth Table, and Applications.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Digital Electronics topic.
Search Terms
digital-electronics, digital electronics, digital, electronics, sequential, circuits, flip, flop
Related Digital Electronics Topics