Intuition What this page is for
The parent note built the machinery : the JK characteristic equation Q n e x t = J Q + K Q , the T equation Q n e x t = T ⊕ Q , and both excitation tables. Here we drill every scenario that machinery can face — every input combination, every starting state, the degenerate "held forever" case, the limiting "clock forever" case, a word problem, and an exam twist. If a real question ever surprises you, it is because you skipped a cell below. So we fill all the cells.
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
J , K ∈ { 0 , 1 } each behave differently: hold / reset / set / toggle
Ex 1
B
JK toggle from both start states
Toggle depends on current Q ; Q = 0 and Q = 1 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 T = 0 trap
People assume T "always toggles"; T = 0 holds
Ex 4
E
T flip-flop — limiting behaviour (T = 1 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
T = Q ⊕ Q n e x t
Ex 7
H
Real-world word problem
Translate "count seconds" into flip-flop stages
Ex 8
I
Exam twist — J , K 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 example Ex 1 — (Cell A) All four JK rows in one shot
Start at Q = 0 . On four separate clock edges (each starting again from Q = 0 ) apply ( J , K ) = ( 0 , 0 ) , ( 0 , 1 ) , ( 1 , 0 ) , ( 1 , 1 ) . Give Q n e x t for each.
Forecast: guess the four outputs before reading — which one flips you?
( 0 , 0 ) : Q n e x t = J Q + K Q = 0 ⋅ 1 + 1 ⋅ 0 = 0 . → hold .
Why this step? Plug into the boxed characteristic equation; with Q = 0 we have Q = 1 , Q = 0 .
( 0 , 1 ) : Q n e x t = 0 ⋅ 1 + 1 ⋅ 0 = 0 + 0 = 0 . → reset (already 0, stays 0).
Why this step? K = 1 enables reset, but Q is already 0, so no visible change.
( 1 , 0 ) : Q n e x t = 1 ⋅ 1 + 1 ⋅ 0 = 1 . → set .
Why this step? J = 1 with Q = 1 drives the set term to 1.
( 1 , 1 ) : Q n e x t = 1 ⋅ 1 + 1 ⋅ 0 = 1 . → toggle (from 0 to 1).
Why this step? Both high = toggle; toggling 0 gives 1.
Verify: table read directly off the parent's characteristic table for Q = 0 : hold→0, reset→0, set→1, toggle→1. ✓ Match.
Worked example Ex 2 — (Cell B) Toggle is
state-dependent
Apply J = K = 1 once, but do it twice: first from Q = 0 , then from Q = 1 . Show the outputs differ.
Forecast: same inputs, different answers — how?
From Q = 0 : Q n e x t = 1 ⋅ 0 + 1 ⋅ 0 = 1 ⋅ 1 + 0 = 1 .
Why this step? Q = 1 so the set term wins.
From Q = 1 : Q n e x t = 1 ⋅ 1 + 1 ⋅ 1 = 1 ⋅ 0 + 0 ⋅ 1 = 0 .
Why this step? Now Q = 0 kills the set term and K = 0 kills the hold term — result 0.
Conclusion: toggle sends 0 → 1 and 1 → 0 . The input is identical; the current state decides.
Why this step? This is the whole reason Q is fed back into S = J Q , R = K Q .
Verify: Q n e x t = Q in both cases: 0 = 1 ✓, 1 = 0 ✓.
Worked example Ex 3 — (Cell C) The degenerate no-op: hold forever
J = K = 0 held across 5 clock edges, starting at Q = 1 . What is the final Q ?
Forecast: does anything happen across 5 edges?
Each edge: Q n e x t = 0 ⋅ Q + 0 ⋅ Q = 0 + 1 ⋅ Q = Q .
Why this step? With J = 0 the set term vanishes; K = 1 makes the second term simply Q .
So Q n e x t = Q every edge — the state is a fixed point.
Why this step? A fixed point of the map Q ↦ Q never moves, no matter how many edges pass.
Final Q = 1 (unchanged from start).
Verify: iterating Q n e x t = Q five times from 1 gives 1 , 1 , 1 , 1 , 1 . ✓ This "boring" cell is exactly how flip-flops store a bit between updates.
Worked example Ex 4 — (Cell D) The
T = 0 trap
A T flip-flop sits at Q = 1 . You apply T = 0 for one edge. Sloppy students say "T = toggle, so it flips to 0." True?
Forecast: flip or hold?
Q n e x t = T ⊕ Q = 0 ⊕ 1 .
Why this step? Use the T characteristic equation; XOR is 1 only when its inputs disagree .
0 ⊕ 1 = 1 (inputs differ… wait — 0 and 1 do differ, so XOR = 1).
Why this step? Careful: 0 ⊕ 1 = 1 . So Q n e x t = 1 — it holds at 1.
So T = 0 holds , confirming the mistake callout in the parent: T toggles only when T = 1 .
Why this step? 0 ⊕ Q = Q always (XOR with 0 is identity), so T = 0 ⇒ Q n e x t = Q .
Verify: 0 ⊕ 1 = 1 = Q (held) ✓; sanity: 0 ⊕ 0 = 0 also holds ✓.
Worked example Ex 5 — (Cell E) Limiting behaviour:
T = 1 forever ⇒ ÷2
Tie T = 1 permanently. Clock runs at 8 MHz . Starting Q = 0 , list Q over 6 edges and give the output frequency.
Forecast: how fast does Q blink compared to the clock?
Each edge: Q n e x t = 1 ⊕ Q = Q (toggle).
Why this step? 1 ⊕ Q flips every bit — XOR with 1 is a NOT.
Sequence from 0: 0 → 1 → 0 → 1 → 0 → 1 → 0 (6 edges).
Why this step? Alternates every edge; one full cycle (0→1→0) spans two edges.
Output period = 2 clock periods ⇒ output frequency = 2 8 MHz = 4 MHz .
Why this step? Frequency and period are reciprocals; doubling the period halves the frequency.
Verify: 8/2 = 4 MHz ✓. This is the divide-by-2 that stacks into ripple counters .
Worked example Ex 6 — (Cell F) Reverse design with JK + don't-cares
You are building a counter and need the transition 0 → 1 at this stage. What ( J , K ) do you wire?
Forecast: one input is forced, one is free — which?
Look up the JK excitation row 0 → 1 : J = 1 , K = X .
Why this step? Excitation tables read transition → required inputs , the reverse of characteristic tables.
Why J = 1 ? To go from 0 to 1 we must set , and J is the set line.
Why K = X (don't care)? K only acts through R = K Q , and Q = 0 here, so R = K ⋅ 0 = 0 regardless of K . K is powerless this edge — freely 0 or 1.
Why this step? A don't-care is a term the K-map can absorb to shrink logic.
Verify: pick K = 1 to stress-test: Q n e x t = J Q + K Q = 1 ⋅ 1 + 0 ⋅ 0 = 1 ✓; pick K = 0 : 1 ⋅ 1 + 1 ⋅ 0 = 1 ✓. Both give the desired 1.
Worked example Ex 7 — (Cell G) Reverse design with T
Same required transition 1 → 0 , but this stage is a T flip-flop. Find T .
Forecast: does the state need to change? If yes, T = ?
Use T = Q ⊕ Q n e x t with Q = 1 , Q n e x t = 0 .
Why this step? T's excitation rule: T = 1 exactly when the state must change.
T = 1 ⊕ 0 = 1 .
Why this step? Inputs differ ⇒ XOR = 1 ⇒ a change is required, so toggle.
Wire T = 1 for this edge.
Verify: feed T = 1 into characteristic eq: Q n e x t = 1 ⊕ 1 = 0 ✓ (matches desired 1 → 0 ).
Worked example Ex 8 — (Cell H) Word problem: a 3-bit second-counter
A digital clock needs a stage that counts 0 , 1 , 2 , … , 7 then wraps, driven by a 1 Hz tick. Using T flip-flops with T = 1 on the least-significant stage, how many stages are needed, and what frequency comes out of the most-significant stage?
Forecast: how many flip-flops for 8 values, and how slow is the top bit?
To count 8 distinct values you need n bits with 2 n ≥ 8 , so n = 3 stages.
Why this step? n bits represent 2 n states; 2 3 = 8 exactly.
Each T stage (with T = 1 , fed by the previous stage) halves the frequency: stage outputs run at 1/2 , 1/4 , 1/8 of the tick.
Why this step? Cell E showed one T stage divides by 2; cascading multiplies the division — this is a ripple counter .
Most-significant (3rd) stage frequency = 2 3 1 Hz = 8 1 = 0.125 Hz .
Why this step? Three divide-by-2 stages give 2 × 2 × 2 = 8 total division.
Verify: 2 3 = 8 ≥ 8 ✓; 1/8 = 0.125 Hz ✓ (one full cycle of the top bit every 8 seconds — matches a mod-8 counter wrapping every 8 ticks).
Worked example Ex 9 — (Cell I) Exam twist: JK waveform with changing inputs
A JK flip-flop starts at Q = 0 . Over 4 clock edges the inputs are, edge by edge: ( J , K ) = ( 1 , 0 ) , ( 1 , 1 ) , ( 0 , 0 ) , ( 0 , 1 ) . Trace Q after each edge.
Forecast: four different rows in a row — track the state carefully, it feeds forward.
Edge 1, ( 1 , 0 ) , Q = 0 : set → Q n e x t = 1 ⋅ 1 + 1 ⋅ 0 = 1 . Now Q = 1 .
Why this step? J = 1 sets; state becomes 1 and carries into the next edge.
Edge 2, ( 1 , 1 ) , Q = 1 : toggle → Q n e x t = 1 ⋅ 0 + 0 ⋅ 1 = 0 . Now Q = 0 .
Why this step? Both high toggles from 1 to 0 (Cell B logic).
Edge 3, ( 0 , 0 ) , Q = 0 : hold → Q n e x t = 0 + 1 ⋅ 0 = 0 . Now Q = 0 .
Why this step? J = K = 0 freezes the state (Cell C).
Edge 4, ( 0 , 1 ) , Q = 0 : reset → Q n e x t = 0 + 0 ⋅ 0 = 0 . Stays Q = 0 .
Why this step? K = 1 resets, but already 0, so no change.
Full trace: Q = 0 → 1 → 0 → 0 → 0 .
Verify: each output equals J Q + K Q evaluated at the current Q : 1 , 0 , 0 , 0 ✓ — and note the state at each edge feeds the next, which is the whole point of a sequential circuit.
Worked example Ex 10 — (Cell J) Exam twist: the race / level-triggered gotcha
A transparent (level-triggered, not edge-triggered) JK sees J = K = 1 held for the entire clock-high phase, which lasts long enough for the gates to settle 6 times. Starting Q = 0 , what does the naive characteristic equation say, and what really happens?
Forecast: does it toggle once, or spin?
Naive equation (one update assumption): Q n e x t = Q , so 0 → 1 , a single toggle.
Why this step? The characteristic equation assumes exactly one update per edge.
Reality with 6 settle-throughs: the output feeds back while J = K = 1 still holds, so it toggles again and again: 0 → 1 → 0 → 1 → 0 → 1 → 0 .
Why this step? A transparent latch re-evaluates continuously; toggle-then-feed-back is an oscillator.
After an even 6 toggles from 0: Q = 0 — but the value at the end is unpredictable in practice because it depends on exact gate delays, not a clean count.
Why this step? This is the race the parent warned about; the cure is edge-triggering / master–slave , which permits one toggle per edge.
Verify: parity check — 6 toggles (even) returns to start: 0 → 0 ✓; the lesson is that the equation is only valid under one update per edge , which real hardware must enforce.
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 (T = 0 holds, not toggles) ::: Ex 4
Cell E (limiting T = 1 forever ⇒ ÷2) ::: Ex 5
Cell F (reverse JK design, don't-cares) ::: Ex 6
Cell G (reverse T design, T = Q ⊕ Q n e x t ) ::: 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
Mnemonic The one-line recall
"Plug Q into the equation, read Q n e x t ; to design, flip the arrow and read the excitation table."
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