3.4.4 · D3Sequential Circuits

Worked examples — JK and T flip-flops

2,238 words10 min readBack to topic

The scenario matrix

Every question about a JK or T flip-flop is really one of these case classes. The columns say what kind of surprise the case brings; the last column names the worked example that kills it.

# Case class What makes it its own case Killed by
A JK — all 4 input rows, one edge each behave differently: hold / reset / set / toggle Ex 1
B JK toggle from both start states Toggle depends on current ; and give opposite results Ex 2
C JK — degenerate "hold" (inputs 00) Nothing changes; the boring-but-vital no-op Ex 3
D T flip-flop — the trap People assume T "always toggles"; holds Ex 4
E T flip-flop — limiting behaviour ( forever) Frequency division; needs many edges, not one Ex 5
F Design (reverse): given a transition, find JK inputs Uses the excitation table + don't-cares Ex 6
G Design (reverse): find T input for a transition Ex 7
H Real-world word problem Translate "count seconds" into flip-flop stages Ex 8
I Exam twist — change every clock, trace a waveform Combine A+B over a timeline; watch for edge-only update Ex 9
J Exam twist — the race / level-triggered gotcha Why the equation needs [[Edge-Triggering and Master-Slave edge-triggering]]

We now sweep the table top to bottom.


Worked examples


Coverage check

Recall Did we hit every cell of the matrix?

Cell A (all 4 JK rows) ::: Ex 1 Cell B (toggle from both start states) ::: Ex 2 Cell C (degenerate hold) ::: Ex 3 Cell D ( holds, not toggles) ::: Ex 4 Cell E (limiting forever ⇒ ÷2) ::: Ex 5 Cell F (reverse JK design, don't-cares) ::: Ex 6 Cell G (reverse T design, ) ::: Ex 7 Cell H (real-world 3-bit counter) ::: Ex 8 Cell I (waveform, changing inputs) ::: Ex 9 Cell J (race / level-triggered gotcha) ::: Ex 10

Connections

  • Parent: JK and T flip-flops — the machinery these examples exercise
  • SR Flip-Flop — the ancestor whose forbidden state we now trace safely
  • D Flip-Flop — compare the "no forbidden state" behaviour
  • Edge-Triggering and Master-Slave — resolves Ex 10's race
  • Ripple Counters — Ex 5 and Ex 8 are single stages of one
  • Excitation Tables and Sequential Design — powers Ex 6 and Ex 7
  • Karnaugh Maps — where Ex 6's don't-cares pay off
  • XOR Gate — the engine inside every T example