PyGCSE Python Lab

D-Type Flip-Flops — Sequential Logic & Memory

Learn how D-type flip-flops store a single bit of data, how the clock edge triggers updates, and their role in registers and memory.

📚 Learning Steps

💡 Study Tips
  • • Read through at your own pace
  • • Try the interactive simulators hands-on
  • • Study the pseudocode — it appears in exams
  • • Quiz yourself before moving on

Step 1: Combinational vs Sequential Logic

📖 Theory

So far you've seen combinational logic — logic gates where the output depends ONLY on the current inputs (e.g., AND, OR, adders).

Sequential logic is different: the output depends on the current inputs AND the previous state. This gives circuits memory — they can "remember" values.

Why does this matter?

Combinational circuits can compute but cannot STORE results
Sequential circuits can store data — essential for registers, counters, and memory
The fundamental building block of sequential logic is the flip-flop

A flip-flop stores a single bit (0 or 1) and only changes its stored value when triggered by a clock signal. This is how computers store data at the hardware level.

🎯 Key Points
  • Combinational logic: output depends only on current inputs
  • Sequential logic: output depends on inputs AND previous state
  • Sequential logic provides MEMORY — circuits can store data
  • Flip-flops are the fundamental building block of sequential logic
  • A flip-flop stores exactly 1 bit
0/5 steps completed