Designing a sequential circuit starts from the state equation and the excitation table, which tell you how to wire each flip-flop input. This page lists the equations and excitation tables for the D, JK and T types.
A state equation describes the next state Qstar as a function of the present state Q and the inputs; the excitation table runs backwards: given the present state and the next state you want, what must the flip-flop inputs be? During design you read the excitation table to derive the input logic for every flip-flop. For example, to go from Q 0 to Qstar 1, a D type just needs D 1, a JK needs J 1 with K a don-t-care, and a T needs T 1.
The three types compared: D has Qstar equal to D, the simplest excitation, you get what you feed. JK has Qstar equal to J times Qbar plus Kbar times Q, with J K 1 toggling, J 1 K 0 setting, J 0 K 1 clearing and J K 0 holding, the most flexible. T has Qstar equal to T exclusive-or Q, toggling while T 1. JK covers both D and T behavior but takes more wiring; D is the easiest and dominates modern designs.
A worked JK table has four rows: from 0 to 0 needs J 0, K free; from 0 to 1 needs J 1, K free; from 1 to 0 needs J free, K 1; from 1 to 1 needs J free, K 0. From there write J and K as logic functions of the input variables for each present-state combination, simplify on a Karnaugh map, and the gate circuit follows. That is the standard sequential design routine.
| Present Q | Next Q | J | K |
|---|---|---|---|
| 0 | 0 | 0 | X |
| 0 | 1 | 1 | X |
| 1 | 0 | X | 1 |
| 1 | 1 | X | 0 |
| 0→0 | Hold | 0 | X |
| 1→1 | Hold | X | 0 |
Build the excitation table first and simplify the input logic after; never wire J and K by feel. D is the least work, JK the most flexible, so choose by need.
The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: Sequential logic design per GB/T 4728 and IEC 60617 symbols. Always check the device datasheet and the product design file for ratings and derating.
Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.