Flip-Flop Conversion – Lecture 14

Key Principles of Flip-Flop Conversion

  • Goal: implement the behaviour of a desired (target) flip-flop using a different (available) flip-flop by creating suitable combinational logic for the available FF’s inputs.

  • Methodology: The process involves two key tools:

    • 1. Conversion (Excitation) Table Construction: This table maps the behavior of the desired (target) flip-flop onto the excitation requirements of the available flip-flop.

      • It lists all possible combinations of the target FF's inputs (e.g., J, K, D, T), the present state ( Q<em>pQ<em>p ), the desired next state ( Q</em>p+1Q</em>{p+1} , derived from the target FF's characteristic table), and the required inputs for the available FF needed to achieve that Q<em>p+1Q<em>{p+1} from Q</em>pQ</em>p (derived from the available FF's excitation table).

      • Treat the input(s) of the target FF as primary variables, alongside QpQ_p.

    • 2. K-map Minimization: For each input of the available flip-flop (e.g., S, R for SR; J, K for JK), a separate K-map is populated using the corresponding values (0, 1, or X for don't care conditions) from the conversion table.

      • The variables for these K-maps are the target FF's inputs and QpQ_p.

      • Minimal Boolean expressions for each input of the available FF are then derived from these K-maps.

    • These expressions are then implemented with combinational logic gates, and connected to the clock of the available FF.

  • Typical reasons for conversion - Re-use of standard JK, D or T ICs to emulate other types.

    • Reduce gate count in a given design.

    • Provide level-sensitive, edge-triggered or master–slave behaviour that is not natively present.

Catalogue of Conversions Covered

  • SR  →  JK\text{SR} \;\rightarrow\; \text{JK}

  • JK  →  SR\text{JK} \;\rightarrow\; \text{SR}

  • SR  →  D\text{SR} \;\rightarrow\; \text{D}

  • D  →  SR\text{D} \;\rightarrow\; \text{SR}

  • JK  →  T\text{JK} \;\rightarrow\; \text{T}

  • JK  →  D\text{JK} \;\rightarrow\; \text{D}

  • D  →  JK\text{D} \;\rightarrow\; \text{JK}

Detailed Conversion Notes

1. SR ➜ JK
  • Variables: J,  K,  QpJ,\;K,\;Q_p

  • Conversion table built from SR excitation requirements.

  • K-map minimisation yields - S=JQpS = JQ_p

    • R=KQp‾R = K\overline{Q_p}

  • Implementation: - Design two AND gates feeding SR inputs, each gated by Q<em>pQ<em>p or Q</em>p‾\overline{Q</em>p} as indicated, then ORed with the external JJ or KK respectively.

    • Clock of JK becomes the clock of the SR.

  • Practical note: ensures all SR=11SR=11 combinations are eliminated (mapped to don’t-care X).

2. JK ➜ SR
  • Because SR has only Set and Reset, derive them directly from JK.

  • K-maps give very simple results: - J=SJ = S

    • K=RK = R

  • Therefore, wire J to S and K to R; the clock is shared.

  • Caution: states where S=R=1S=R=1 are invalid and are flagged as X in the conversion table.

3. SR ➜ D
  • Desired: single data input DD reproduced by SR.

  • Table shows four legal SR combinations; K-maps yield - S=DS = D

    • R=D‾R = \overline{D}

  • Implementation: - Direct line from DD to S.

    • Inverter from DD to R.

    • Guarantees exactly one of S/R asserted per cycle.

4. D ➜ SR
  • Objective: generate S and R that reproduce the next state behaviour of a D flip-flop.

  • Excitation table & K-map provide single equation (because SR has two inputs but you get one combined condition): - D=S+RQpD = S + RQ_p

    • Rearranged to find required signals:

      • Set when S=D  ∧  Q<em>p‾S = D\;\land\; \overline{Q<em>p} • Reset when R=D‾∧Q</em>pR = \overline{D} \land Q</em>p

  • A minimal implementation is: - S = D  Qp‾D \;\overline{Q_p}

    • R = D‾Qp\overline{D}Q_p

  • Invalid condition S=R=1S=R=1 mapped to X in the table.

5. JK ➜ T
  • A T flip-flop toggles on T=1T=1 and holds on T=0T=0.

  • From JK truth table we realise: - Toggle occurs when J=K=1J=K=1, Hold when J=K=0J=K=0.

  • Therefore a single line solution: - J=TJ = T

    • K=TK = T

  • Implementation: tie both JK inputs together to the external TT.

6. JK ➜ D
  • Need next state Qp+1=DQ_{p+1} = D irrespective of present state.

  • K-map analysis shows - J=DJ = D

    • K=D‾K = \overline{D}

  • Realisation: - Feed DD to J, the complement of DD (via inverter) to K.

7. D ➜ JK
  • Treat JJ and KK as minimisation outputs when the available FF is JK.

  • K-map result: - D=JQ<em>p‾+K‾Q</em>pD = J\overline{Q<em>p} + \overline{K}Q</em>p

    • Solving, we can choose a symmetrical implementation:

      • J=DQ<em>p‾J = D\overline{Q<em>p} • K=D‾Q</em>pK = \overline{D}Q</em>p

  • Alternate, gate-level approach: - Use two ANDs and one OR to meet the equation above.

Common Themes & Observations

  • Every conversion keeps the clocking edge identical; only the combinational front-end changes.

  • Don’t-care (X) entries in tables immensely simplify K-map reduction and gate count.

  • Illegal SR state S=R=1S=R=1 is either avoided (marked X) or never produced by the equations.

  • Converting upwards (single-input ➜ multi-input) often requires gating with QpQ_p; converting downwards (multi-input ➜ single-input) usually involves tying inputs together or inverting one of them.

  • Equations can be implemented in NAND/NOR logic for easier IC realisation.

Real-World Relevance & Design Tips

  • Digital designers rarely keep inventories of every FF type; these conversions permit flexible use of standard ICs like 74LS74 (JK), 74LS73 (JK master–slave) or 74LS74 (D).

  • FPGA tool-flows apply the same principles when mapping HDL-described flip-flops onto the fabric’s primitive elements.

  • Ethically, be aware that mis-using conversions without understanding metastability or timing can lead to latent design faults.

  • Always verify with simulation and, if necessary, timing analysis to ensure that combinational delay from conversion logic does not violate setup/hold requirements.