Skip to main content

Setup/hold time; SR to JK conversion

Short answer

Setup time is the minimum time data must be stable before the active clock edge; hold time is the minimum time after the edge. To convert an SR flip-flop to a JK flip-flop, use excitation tables and K-maps to derive S = J Q_n' and R = K Q_n, then connect these to the SR inputs.

What is the Setup time and hold time of a flip-flop? With the help of excitation table and K-map, convert SR flip-flop into JK flip-flop.

Setup time and hold time

  • Setup time (tsut_{su}): the minimum time the data input (D, J, K, S, R) must be stable before the active clock edge so that the flip-flop reads it correctly.
  • Hold time (tht_h): the minimum time the data input must stay stable after the active clock edge.
Data   ===X======STABLE=======X====
             |<-tsu->|<-th->|
CLK    ______________|‾‾‾‾‾‾‾‾‾‾‾‾
                     ^ active edge

If either is violated the flip-flop may store a wrong value or go metastable. Both are given in the data sheet; for LS-TTL flip-flops they are of the order of tens of ns (tsut_{su}) and a few ns (tht_h).

SR flip-flop into JK flip-flop

We add a combinational circuit with inputs J, K and QnQ_n that drives S and R.

SR excitation table

QnQ_nQn+1Q_{n+1}SR
000X
0110
1001
11X0

Conversion table

JKQnQ_nQn+1Q_{n+1}SR
00000X
0011X0
01000X
011001
100110
1011X0
110110
111001

K-maps

 S:      KQn=00 01 11 10    R:     KQn=00 01 11 10
  J=0       0   X  0  0      J=0      X   0  1  X
  J=1       1   X  0  1      J=1      0   0  1  0
S=J Qn′,R=K QnS = J\,Q_n', \qquad R = K\,Q_n

Circuit

J --[AND]-- S +--------+--+-- Q
Q'--[   ]     | SR FF  |  |
              |  CLK   |  |
K --[AND]-- R |        |--|-+-- Q'
Q --[   ]     +--------+  | |
   (feedback of Q, Q' to the AND gates)

Check: J=K=1J = K = 1, Qn=1Q_n = 1: S=0S = 0, R=1R = 1, so Q resets (toggle). The two AND gates never make S=R=1S = R = 1, so the invalid state is removed.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Logic chapter 6 questions →