Implement S-R, T, and D Flip-Flops Using a JK Flip-Flop (and State-Table Implementations)

Implement S-R, T, and D Flip-Flops Using a JK Flip-Flop (and State-Table Implementations)

Verified Sources
Nov 3, 2026

A JK flip-flop is a universal sequential element whose next-state behavior is governed by its characteristic equation:
Qn+1=JQn‾+K‾Qn  .Q_{n+1} = J\overline{Q_n} + \overline{K}Q_n \; . 2

We will use this equation (and the JK “operation modes”: hold/set/reset/toggle) to implement three other flip-flop behaviors by driving the JK inputs JJ and KK with combinational logic built from the target inputs and the present state QnQ_n. 2

Key terms: JK flip-flop Characteristic equation Excitation/transition design.

Footnotes

  1. electronicforu: JK Flip Flop Circuit, Truth Table, Limitations, and Uses - Provides the characteristic equation Q(n+1)=JQn′+K′QnQ(n+1)=JQ'_n+K'Q_n. ↩ ↩2

  2. CS UCR PDF: Latches and Flip-Flops (Flip-Flop notes) - States JK characteristic equation derivation and Qnext=K′Q+JQ′Qnext=K'Q+JQ'. ↩ ↩2

JK Flip-Flop characteristic equation (and excitation-style reasoning)

We’ll proceed in layers:

  1. Define desired Qn+1Q_{n+1} behavior for S-R, T, and D.
  2. Substitute into the JK characteristic equation to derive JJ and KK.
  3. Validate with state tables (present-state QnQ_n vs next-state Qn+1Q_{n+1}).

We also use the practical mapping that the JK inputs correspond functionally to SR-style set/reset when exactly one of them is asserted, while J=K=1J=K=1 causes toggle.

Footnotes

  1. Electronics-Tutorials.ws: JK Flip Flop and Master-Slave JK Flip Flop Tutorial - Explains JK vs SR and toggle when both inputs are asserted. ↩

Target behaviors (state tables)

S-R (Set/Reset) flip-flop behavior

For a standard clocked SR flip-flop (no “invalid” simultaneous S and R):

  • If S=1,R=0S=1, R=0 then Qn+1=1Q_{n+1}=1 (set)
  • If S=0,R=1S=0, R=1 then Qn+1=0Q_{n+1}=0 (reset)
  • If S=0,R=0S=0, R=0 then Qn+1=QnQ_{n+1}=Q_n (hold)
  • If S=1,R=1S=1, R=1 the behavior depends on the specific SR convention; in SR latches it is invalid, while JK resolves this via toggle. For our implementation, we will explicitly choose a safe mapping that avoids ambiguity by embedding the desired logic into JK. 2

T flip-flop behavior

A T flip-flop toggles when T=1T=1 and holds when T=0T=0, i.e.:

  • If T=0T=0: Qn+1=QnQ_{n+1}=Q_n
  • If T=1T=1: Qn+1=Qn‾Q_{n+1}=\overline{Q_n}

D flip-flop behavior

A D flip-flop has next state equal to the input:

  • Qn+1=DQ_{n+1}=D (independent of present state)

Key terms: Set Reset Toggle.

Footnotes

  1. CS120b flipflops.pdf (same source section) - Notes SR undefined vs JK toggling when both inputs asserted. ↩

  2. Electronics-Tutorials.ws: JK Flip Flop and Master-Slave JK Flip Flop Tutorial - Explains JK vs SR and toggle when both inputs are asserted. ↩

  3. GeeksforGeeks: T Flip Flop - Gives T flip-flop behavior and characteristic equation Q(n+1)=TQn′+T′QnQ(n+1)=TQ'_n+T'Q_n. ↩

  4. GeeksforGeeks: D Flip Flop - States D flip-flop characteristic equation Qn+1=DQ_{n+1}=D. ↩

Derive J and K for each target flip-flop using the JK characteristic equation

  1. 1
    Step 1

    Use Qn+1=JQn‾+K‾QnQ_{n+1}=J\overline{Q_n}+\overline{K}Q_n as the constraint on desired next-state.

  2. 2
    Step 2

    Express Qn+1Q_{n+1} in terms of the target inputs (S,R or T or D) and optionally QnQ_n.

  3. 3
    Step 3

    Choose JJ so the term JQn‾J\overline{Q_n} produces the required behavior when Qn=0Q_n=0, and choose K‾\overline{K} so the term K‾Qn\overline{K}Q_n produces the required behavior when Qn=1Q_n=1.

  4. 4
    Step 4

    For each present state Qn∈{0,1}Q_n\in\{0,1\}, substitute and confirm the resulting Qn+1Q_{n+1} matches the target truth/state table.

1) Implement an S-R flip-flop using a JK flip-flop

A common functional conversion is to drive the JK inputs with the SR signals:

  • J=SJ = S
  • K=RK = R

Then the JK characteristic equation yields the correct SR-style behavior:

  • With Qn=0Q_n=0: Qn+1=JQn‾+overlineKQn=J=SQ_{n+1}=J\overline{Q_n}+\\overline{K}Q_n = J = S
  • With Qn=1Q_n=1: Qn+1=overlineK=overlineRQ_{n+1}=\\overline{K} = \\overline{R} which equals 1 only when R=0R=0.

This produces: set/hold/reset behavior when (S,R)(S,R) takes on the SR-valid combinations. 2

State table validation (S-R implementation)

Assume J=SJ=S, K=RK=R.

SRQnQn+1 from JK (J=S, K=R)Operation
000S=0S=0Hold (0→0)
001overlineR=1\\overline{R}=1Hold (1→1)
100S=1S=1Set (0→1)
101overlineR=1\\overline{R}=1Set (1→1)
010S=0S=0Reset (0→0)
011overlineR=0\\overline{R}=0Reset (1→0)

For the remaining combination S=1,R=1S=1, R=1, a JK flip-flop will toggle when both inputs are asserted (J=K=1J=K=1).
So, if you must emulate a strictly “no-invalid-condition” SR device, avoid applying S=R=1S=R=1 or add external gating to force it into a safe condition.

JK-to-SR mapping.

Footnotes

  1. Electronics-Tutorials.ws: JK Flip Flop and Master-Slave JK Flip Flop Tutorial - Describes functional relationship of J like S and K like R (supports SR-style mapping). ↩ ↩2

  2. electronicforu: JK Flip Flop Circuit, Truth Table, Limitations, and Uses - Provides the characteristic equation Q(n+1)=JQn′+K′QnQ(n+1)=JQ'_n+K'Q_n. ↩

  3. CS120b flipflops.pdf (same source section) - Notes SR undefined vs JK toggling when both inputs asserted. ↩

About the SR invalid condition

"In SR latches, S=R=1S=R=1 is typically invalid, but JK eliminates the undefined case by toggling when J=K=1J=K=1. If your design requires SR invalid-state avoidance, gate SS and RR so S∧R=0S\wedge R=0." 2

Footnotes

  1. Electronics-Tutorials.ws: JK Flip Flop and Master-Slave JK Flip Flop Tutorial - Explains JK vs SR and toggle when both inputs are asserted. ↩

  2. CS120b flipflops.pdf (same source section) - Notes SR undefined vs JK toggling when both inputs asserted. ↩

2) Implement a T flip-flop using a JK flip-flop

A T flip-flop is equivalent to a JK flip-flop with both inputs tied together:

  • J=TJ = T
  • K=TK = T 2

Then when T=0T=0, J=K=0J=K=0 ⇒ hold; when T=1T=1, J=K=1J=K=1 ⇒ toggle. 2

State table validation (T implementation)

Assume J=K=TJ=K=T.

TQnQn+1 (JK with J=K=T)Operation
000Hold
011Hold
101Toggle (0→1)
110Toggle (1→0)

Toggle (T).

Footnotes

  1. GeeksforGeeks: T Flip Flop - Gives T flip-flop behavior and characteristic equation Q(n+1)=TQn′+T′QnQ(n+1)=TQ'_n+T'Q_n. ↩ ↩2

  2. Rohini College of Engineering PDF (T flip-flop section) - Provides T flip-flop next-state rules (T=0T=0 hold, T=1T=1 toggle). ↩

  3. CS120b flipflops.pdf (same source section) - Notes SR undefined vs JK toggling when both inputs asserted. ↩

Fast design shortcut

"To build a T flip-flop from JK, just wire JJ and KK together to the T input: J←TJ\leftarrow T, K←TK\leftarrow T. The JK 'toggle when J=K=1' property guarantees correct behavior." 2

Footnotes

  1. CS120b flipflops.pdf (same source section) - Notes SR undefined vs JK toggling when both inputs asserted. ↩

  2. GeeksforGeeks: T Flip Flop - Gives T flip-flop behavior and characteristic equation Q(n+1)=TQn′+T′QnQ(n+1)=TQ'_n+T'Q_n. ↩

3) Implement a D flip-flop using a JK flip-flop

A D flip-flop requires:

  • Qn+1=DQ_{n+1}=D

One standard JK-to-D conversion is:

  • J=DJ = D
  • K=overlineDK = \\overline{D}

Verification via the JK characteristic equation:

  • If Qn=0Q_n=0: Qn+1=Joverline0+overlineK0=J=DQ_{n+1}=J\\overline{0}+\\overline{K}0=J=D
  • If Qn=1Q_n=1: Qn+1=Joverline1+overlineK1=overlineK=DQ_{n+1}=J\\overline{1}+\\overline{K}1=\\overline{K}=D because overlineK=overlineoverlineD=D\\overline{K}=\\overline{\\overline{D}}=D.

So in all cases Qn+1=DQ_{n+1}=D, independent of QnQ_n. 3

State table validation (D implementation)

DQnChoose J=D, K=D’Qn+1 from JKOperation
00J=0, K=1Qn+1=0Q_{n+1}=0Set to 0
01J=0, K=1Qn+1=0Q_{n+1}=0Reset to 0
10J=1, K=0Qn+1=1Q_{n+1}=1Set to 1
11J=1, K=0Qn+1=1Q_{n+1}=1Set to 1

[D storage]{def="Next-state equals input, Qn+1=DQ_{n+1}=D, independent of present state"}.

Footnotes

  1. GeeksforGeeks: D Flip Flop - States D flip-flop characteristic equation Qn+1=DQ_{n+1}=D. ↩ ↩2

  2. electronicforu/conversion table excerpt (JK/D relations) - Shows JK-style conversion patterns including JK-to-D mapping logic (contextualized in conversion discussion). ↩ ↩2

  3. electronicforu: JK Flip Flop Circuit, Truth Table, Limitations, and Uses - Provides the characteristic equation Q(n+1)=JQn′+K′QnQ(n+1)=JQ'_n+K'Q_n. ↩

Summary: J and K wiring for each target flip-flop

Target flip-flopDesired next-state ruleJK input wiring
SRSet/Reset/Hold based on S,RJ=SJ=S, K=RK=R
TToggle when T=1T=1 else holdJ=TJ=T, K=TK=T 2
DQn+1=DQ_{n+1}=D alwaysJ=DJ=D, K=overlineDK=\\overline{D}

Key terms: Next-state State table Combinational driving.

Footnotes

  1. Electronics-Tutorials.ws: JK Flip Flop and Master-Slave JK Flip Flop Tutorial - Describes functional relationship of J like S and K like R (supports SR-style mapping). ↩

  2. GeeksforGeeks: T Flip Flop - Gives T flip-flop behavior and characteristic equation Q(n+1)=TQn′+T′QnQ(n+1)=TQ'_n+T'Q_n. ↩

  3. Rohini College of Engineering PDF (T flip-flop section) - Provides T flip-flop next-state rules (T=0T=0 hold, T=1T=1 toggle). ↩

  4. electronicforu/conversion table excerpt (JK/D relations) - Shows JK-style conversion patterns including JK-to-D mapping logic (contextualized in conversion discussion). ↩

Implementation nuances and edge cases

Knowledge Check

Question 1 of 4
Q1Single choice

For a JK flip-flop with characteristic equation Qn+1=JQn‾+K‾QnQ_{n+1}=J\overline{Q_n}+\overline{K}Q_n, which wiring implements a D flip-flop (so that Qn+1=DQ_{n+1}=D)?