Skip to main content

D Flip-Flop - The Data or Delay Flip-Flop


💡 What Is a D Flip-Flop?​

A D flip-flop (Delay or Data flip-flop) is a sequential circuit that captures and stores a single bit of data. It's the most widely used flip-flop type!


🔌 How It Works​

Inputs​

  • D (Data): The bit to store
  • CLK (Clock): Synchronizes when the flip-flop updates

Outputs​

  • Q: Current stored value
  • QĖ… (Q bar): Inverse of Q

Behavior​

On the active clock edge (usually rising edge from 0 to 1):

  • Q captures the value of D
  • Q remains stored until the next clock edge

📊 Truth Table​

DCLKQ (next)
0↑0
1↑1
X0Q (hold)
X1Q (hold)

↑ = rising edge (0→1)


🔧 How to Build a D Flip-Flop​

Simple Construction​

A D flip-flop can be built from:

  • SR latch + AND gates
  • Or from NAND gates

Edge-Triggered​

Edge-triggered D flip-flops only update on the clock edge, making them very stable and reliable.


💡 Common Uses​

1. Registers​

Multiple D flip-flops form a register to store multi-bit data.

Example: 8 D flip-flops = 8-bit register

2. Shift Registers​

Chaining D flip-flops creates a shift register that can move data serially.

3. Counters​

D flip-flops can form counters by feeding outputs back into inputs.

4. Synchronization​

D flip-flops synchronize signals crossing between different clock domains.

Professional Explanation

The D flip-flop is called a "delay" flip-flop because it delays the input D by one clock cycle - the output at time t+1 is equal to the input at time t.

D flip-flops are the building blocks for almost all sequential circuits in modern digital design. Their simplicity makes them ideal for building complex systems like CPUs and memory!


🎓 Classroom Example​

Create a Simple Memory:

  1. Connect a single D flip-flop
  2. Connect a switch to D input
  3. Connect a pushbutton to CLK (momentary high)
  4. Connect an LED to Q

Students can see how:

  • Setting D and pressing the button stores the value
  • The LED stays lit (or dark) even after D changes
  • New values are only stored on the button press

This demonstrates memory in action!


💡 Summary​

  • D flip-flop: Simple data storage element
  • Captures D on active clock edge
  • Holds state until next clock edge
  • Key uses: Registers, shift registers, counters, synchronization
  • Most common: Edge-triggered (rising edge)