Skip to main content

Setup/hold time; RS to D and JK conversion

Short answer

Setup time is the minimum stable data before the clock edge; hold time is the minimum after. To convert RS to D flip-flop, use S=D and R=not D. For JK, use S=J Q' and R=K Q, derived from excitation tables and K-maps.

What is the Setup time and hold time of a flip-flop? With the help of excitation table and K-map, convert R-S flip flop into D and J-K flip flops.

Setup time and hold time

  • Setup time (tst_s or tsut_{su}): the minimum time for which the data input(s) (D, J-K, S-R) must be stable before the active clock edge, so that the flip-flop reads them correctly.
  • Hold time (tht_h): the minimum time for which the data input(s) must remain stable after the active clock edge.
 CLK   _______________|‾‾‾‾‾‾‾‾‾‾
 D     XXXX|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾|XXXX
           |<-- ts -->|<th>|
                      ^ active edge

If either is violated, the output may be wrong or may go into a metastable state. Typical TTL values: ts≈20t_s \approx 20 ns, th≈5t_h \approx 5 ns.

Method of conversion

  1. Write the characteristic table of the required flip-flop (inputs and QnQ_n give Qn+1Q_{n+1}).
  2. For each row, read the inputs needed on the available (S-R) flip-flop from its excitation table.
  3. Simplify the S and R expressions with K-maps and build the input logic.

S-R excitation table used:

QQ+SR
000x
0110
1001
11x0

R-S to D flip-flop

DQQ+SR
0000x
01001
10110
111x0
K-map for S
Q\D    0   1
 0     0   1
 1     0   x

K-map for R
Q\D    0   1
 0     x   0
 1     1   0
S=D,R=D‾S = D, \qquad R = \overline{D}
              +---------+
 D --+------->| S     Q |---> Q
     |   CLK->|>  SR    |
     +-[NOT]->| R    Q' |---> Q'
              +---------+

Since R is always the complement of S, the forbidden input S = R = 1 can never occur.

R-S to J-K flip-flop

JKQQ+SR
00000x
0011x0
01000x
011001
100110
1011x0
110110
111001
K-map for S
Q\JK   00  01  11  10
 0      0   0   1   1
 1      x   0   0   x

K-map for R
Q\JK   00  01  11  10
 0      x   x   0   0
 1      0   1   1   0
S=J Q‾,R=K QS = J\,\overline{Q}, \qquad R = K\,Q
            +-----+      +---------+
 J -------->|     |      |         |
 Q' ------->| AND |----->| S     Q |---> Q
            +-----+      |         |
            +-----+ CLK->|>  SR    |
 K -------->|     |      |         |
 Q  ------->| AND |----->| R    Q' |---> Q'
            +-----+      +---------+
 (Q and Q' are fed back from the outputs)

Check: for J = K = 1 with Q = 0, S = 1, R = 0 (set); with Q = 1, S = 0, R = 1 (reset), so the output toggles and S = R = 1 never occurs.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Logic chapter 6 questions →