Visual walkthrough — JK and T flip-flops
Step 0 — The words we're allowed to use
Before any equation, four plain-English objects. Everything else is built from these.
That's it. No +, no ⊕, no bars-on-products yet — we earn each one.
Step 1 — The disease: SR's forbidden row
WHAT. The SR Flip-Flop has inputs (set) and (reset) and obeys one rule per row of a table. Three rows behave; one row is poison.
WHY look here first. You can't appreciate the cure until you see the wound. The picture below draws the four input combinations as four lamps-with-instructions. Three point somewhere definite. The red one points two ways at once.
PICTURE. In the figure, the red row has two arrows leaving it — one shouting "become 1" and one shouting "become 0". A physical circuit cannot obey both, so its output is a coin-flip nobody can predict.

Step 2 — The idea: make the poison impossible, not just banned
WHAT. Instead of writing "please don't press both", we rewire the circuit so both-at-once physically cannot reach the internal SR core.
WHY this and not a warning label. A banned row is a landmine; someone eventually steps on it. A row that cannot exist is safe forever. We achieve this by gating the inputs with the current state and — and remember from Step 0, those two are never both .
PICTURE. Two AND gates sit in front of the old SR core. The top AND feeds the internal Set; the bottom feeds the internal Reset. The red feedback wires carry and back from the output — that loop is the entire invention.

Step 3 — Why the forbidden state now literally cannot happen
WHAT. We check: can the internal and ever both be at the same instant?
WHY it's the payoff. If they can't, the SR core never sees its poison row — the disease is cured structurally, no discipline required.
PICTURE. The figure lines up the two products. For internal we'd need ; for internal we'd need . But and are opposites — the red "blocked" bar shows they can never both light up. One of the two products is always zero.

- because a bit and its opposite can't both be .
- So no matter what are. The forbidden combination is unreachable. ✔
Step 4 — Plug the gated inputs into SR's equation
WHAT. We substitute and into the SR characteristic equation from Step 1.
WHY. SR's formula already tells us the whole behaviour of the core. If we feed it our new wires, out pops the behaviour of the whole JK.
PICTURE. The figure shows the substitution as boxes sliding into slots: the -slot receives , the -slot receives .

- The left term carries the "set only if currently 0" job.
- The right term still needs simplifying — that (NOT of a product) is knotty. We untangle it next.
Step 5 — Untangle with De Morgan
WHAT. We simplify the messy right term into something clean.
WHY De Morgan and not brute force. is "NOT (K AND Q)". De Morgan's law is the only tool that lets us push a bar across a product: . That splits one knot into two simple pieces we can multiply out.
PICTURE. The figure walks the three-line collapse, with the term that dies () struck through in red.

- Line 1→2: (bar splits, AND becomes OR).
- Line 2→3: distribute the over the OR.
- Line 3→4: (Step 0's fact again — a bit times its opposite is nothing).
Step 6 — The JK characteristic equation appears
WHAT. Put the cleaned pieces together.
WHY. This single line is the destination — the parent note's central result, now earned rather than quoted.
PICTURE. The figure reads the equation as two spotlights: the left term lights up only when , the right only when . Together they cover every case with no overlap and no gap.

Step 7 — The toggle, drawn as motion (the whole point)
WHAT. We zoom into the row and watch two clock ticks.
WHY. "Toggle" is a verb — it's easier to see than to read. This step makes the cure visible as a lamp flipping.
PICTURE. Start with the lamp ON (). Because , only the reset path is armed () → it becomes . Next tick , so only the set path is armed () → back to . The red arrow bounces : the flip-flop alternates.

- When : , → resets to .
- When : , → sets to .
- The gating (Step 2) makes toggle self-correcting: whichever state you're in, only the escape route is open.
Step 8 — The degenerate cases (nothing left uncovered)
WHAT. We sweep the boring rows so no reader ever meets a scenario we skipped.
WHY. A derivation is only trustworthy if every corner is drawn. Here are the three non-toggle inputs plus the "what if the clock never ticks" case.
PICTURE. Four mini-panels: hold (, lamp frozen), reset (, lamp forced off regardless of start), set (, lamp forced on regardless of start), and no clock (lamp frozen because updates happen only on an edge — see Edge-Triggering and Master-Slave).

The one-picture summary
Everything above, compressed: SR's poison row (red) → gate inputs with → forbidden state becomes impossible → substitute → simplify → the boxed JK equation → the toggle. Follow the arrows.

Recall Feynman: tell it back in plain words
Start with an old switch that has two buttons — ON and OFF. Its one flaw: press both and it panics. Our fix is sneaky: we put a little doorman in front of each button. The ON-button's doorman only lets the press through if the light is currently off (setting an already-on light is silly). The OFF-button's doorman only lets its press through if the light is currently on. Now here's the beautiful part — the light is either on or off, never both, so only one doorman is ever open at a time. That means the two buttons can never fight. And when you slam both buttons together? Whichever door is open sends the light the other way — so it flips. Press-both = flip. Do it repeatedly and the light blinks half as fast as your presses, which is exactly how a computer counts. Tie both buttons into one and you've got the T flip-flop — one tap, one flip.
Connections
- SR Flip-Flop — the flawed parent we cured
- D Flip-Flop — the other way to kill the forbidden state
- Edge-Triggering and Master-Slave — why one edge = one toggle (Step 8)
- Ripple Counters — cascade toggles to count
- Excitation Tables and Sequential Design — the reverse question
- Karnaugh Maps — where JK's don't-cares pay off
- XOR Gate — the T flip-flop's core,