Lesson 16 +35 XP

Excitation Tables & Flip-Flop Conversion

Excitation Tables & Flip-Flop Conversion

The characteristic table of a flip-flop answers the analysis question: given the inputs, what is the next state? Design needs the reverse question: to move from state Q to state Q+, what inputs must be applied? The answer is the excitation table. It is the key tool for designing counters and state machines, and for converting one type of flip-flop into another.

1. Characteristic Table vs Excitation Table

Characteristic tableExcitation table
Giveninputs and present state Qpresent state Q and next state Q+
Findnext state Q+the inputs needed
Used foranalysisdesign (synthesis)

The excitation table has four rows, one for each transition 0 → 0, 0 → 1, 1 → 0 and 1 → 1. An X (don't-care) appears whenever two different input combinations both produce the same transition.

2. Excitation Tables of the Four Flip-Flops

SR flip-flop. To go 0 → 0 the flip-flop must not be set: S = 0, and R may be 0 (hold) or 1 (reset), so R = X. To go 1 → 1 it must not be reset: R = 0, S = X.

QQ⁺SR
000X
0110
1001
11X0

JK flip-flop. It has the most don't-cares, which is why JK designs often need the least logic. To go 0 → 1, either set (J = 1, K = 0) or toggle (J = 1, K = 1) works, so K = X.

QQ⁺JK
000X
011X
10X1
11X0

D and T flip-flops. For D the input is just the next state, D = Q+. For T the input is 1 whenever the state must change, T = Q oplus Q+.

QQ⁺DT
0000
0111
1001
1110
💡 Tip

A quick way to remember the JK table: when Q = 0, only J matters (J = Q+, K = X); when Q = 1, only K matters (K = (Q+)', J = X).

3. The Conversion Procedure

To make a flip-flop of type required out of a flip-flop of type given, put combinational conversion logic in front of the given flip-flop. Its inputs are the new inputs and the present state Q; its outputs drive the given flip-flop.

Block diagram: conversion logic in front of the given flip-flopBlock diagram: conversion logic in front of the given flip-flop

  1. Write the characteristic table of the required flip-flop (its inputs and Q, giving Q+).
  2. For each row, read the inputs the given flip-flop needs for Q → Q+ from its excitation table.
  3. Simplify each input of the given flip-flop with a K-map over (required inputs, Q).
  4. Draw the logic.
SolvedExample 1 · SR flip-flop to JK flip-flop

Convert an SR flip-flop into a JK flip-flop.

JKQQ⁺SR
00000X
0011X0
01000X
011001
100110
1011X0
110110
111001
  1. Columns Q+ come from the JK characteristic table; S, R from the SR excitation table.
  2. S = ∑ m(4, 6) + d(1, 5) over J, K, Q: the two 1s pair as JQ'.
  3. R = ∑ m(3, 7) + d(0, 2): the two 1s pair as KQ.
AnswerS = JQ', R = KQ (AND gates feeding Q' and Q back)

K-maps for S and R in the SR to JK conversionK-maps for S and R in the SR to JK conversion

Because S = JQ' is 1 only when Q = 0 and R = KQ only when Q = 1, S and R can never both be 1, so the forbidden SR input is avoided automatically.

SolvedExample 2 · JK flip-flop to T flip-flop

Convert a JK flip-flop into a T flip-flop.

TQQ⁺JK
0000X
011X0
1011X
110X1
  1. J = ∑ m(2) + d(1, 3) over T, Q: the 1 at TQ' groups with the don't-care at TQ, giving J = T.
  2. K = ∑ m(3) + d(0, 2): grouping with the don't-care at TQ' gives K = T.
AnswerJ = K = T: tie the two inputs together
SolvedExample 3 · JK flip-flop to D flip-flop

Convert a JK flip-flop into a D flip-flop.

DQQ⁺JK
0000X
010X1
1011X
111X0
  1. J = ∑ m(2) + d(1, 3) gives J = D.
  2. K = ∑ m(1) + d(0, 2) gives K = D'.
AnswerJ = D, K = D' (one inverter)

JK to T, JK to D, D to T and SR to JK conversionsJK to T, JK to D, D to T and SR to JK conversions

SolvedExample 4 · D flip-flop to JK and to T

Convert a D flip-flop into (a) a JK flip-flop and (b) a T flip-flop.

  1. For a D flip-flop D = Q+, so the conversion logic is simply the characteristic equation of the required flip-flop.
  2. (a) JK: D = Q+ = JQ' + K'Q (two AND gates, one OR gate, using Q and Q' as feedback).
  3. (b) T: D = Q+ = T oplus Q (one XOR gate).
Answer(a) D = JQ' + K'Q; (b) D = T oplus Q
SolvedExample 5 · T flip-flop to JK flip-flop

Convert a T flip-flop into a JK flip-flop.

JKQQ⁺T
00000
00110
01000
01101
10011
10110
11011
11101
  1. T = Q oplus Q+ for each row: T = ∑ m(3, 4, 6, 7) over J, K, Q.
  2. Minterms 4 and 6 group as JQ'; minterms 3 and 7 group as KQ.
AnswerT = JQ' + KQ
SolvedExample 6 · SR to D and T to D

Convert (a) an SR flip-flop into a D flip-flop and (b) a T flip-flop into a D flip-flop.

  1. (a) From the SR excitation table: D = 0 needs S = 0 and R = 1 or X; D = 1 needs S = 1 or X and R = 0. The simplest choice is S = D, R = D'.
  2. (b) T must be 1 exactly when the state changes, that is when D differs from Q: T = D oplus Q.
Answer(a) S = D, R = D'; (b) T = D oplus Q

4. Summary of Conversions

Required ↓ / Given →SRJKDT
SRJ = S, K = RD = S + R'QT = SQ' + RQ
JKS = JQ', R = KQD = JQ' + K'QT = JQ' + KQ
DS = D, R = D'J = D, K = D'T = D oplus Q
TS = TQ', R = TQJ = K = TD = T oplus Q

Notice the pattern: to drive a D flip-flop, use the characteristic equation of the required type; to drive a T flip-flop, set T = 1 for the rows where the state changes.

5. Flip-Flop Conversion in Verilog

The testbench builds a JK flip-flop from a D flip-flop with D = JQ' + K'Q, steps it through all eight (J, K, Q) rows, and also builds a T flip-flop with D = T oplus Q:

VERILOG
// Flip-flop conversion: a JK and a T flip-flop built from a D flip-flop
module d_ff (
    input      clk,
    input      d,
    output reg q
);
    initial q = 1'b0;
    always @(posedge clk)
        q <= d;
endmodule

module jk_from_d (
    input  clk,
    input  j,
    input  k,
    output q
);
    wire d = (j & ~q) | (~k & q);   // conversion logic: D = JQ' + K'Q
    d_ff ff (.clk(clk), .d(d), .q(q));
endmodule

module t_from_d (
    input  clk,
    input  t,
    output q
);
    d_ff ff (.clk(clk), .d(t ^ q), .q(q));  // D = T xor Q
endmodule

module tb;
    reg clk = 0, j, k, t = 0;   // t = 0 holds the T flip-flop during the JK test
    wire qjk, qt;
    integer i;

    jk_from_d u1 (.clk(clk), .j(j), .k(k), .q(qjk));
    t_from_d  u2 (.clk(clk), .t(t), .q(qt));

    task tick;
        begin
            #5 clk = 1;
            #5 clk = 0;
        end
    endtask

    initial begin
        $display("JK from D:  J K | Q -> Q+");
        // visit every (J, K) from both present states
        for (i = 0; i < 8; i = i + 1) begin
            {j, k} = 2'b00;
            if (qjk != i[2]) begin
                {j, k} = i[2] ? 2'b10 : 2'b01;  // first force the wanted present state
                tick;
            end
            {j, k} = i[1:0];
            #1 $write("            %b %b | %b -> ", j, k, qjk);
            tick;
            $display("%b", qjk);
        end
        $write("T from D, T = 1 1 0 1 0 -> Q =");
        for (i = 4; i >= 0; i = i - 1) begin
            t = (5'b11010 >> i) & 1;
            tick;
            $write(" %b", qt);
        end
        $display("");
    end
endmodule

The JK rows are exactly the JK characteristic table, and the T flip-flop toggles on every T = 1:

OUTPUT
JK from D:  J K | Q -> Q+
            0 0 | 0 -> 0
            0 1 | 0 -> 0
            1 0 | 0 -> 1
            1 1 | 0 -> 1
            0 0 | 1 -> 1
            0 1 | 1 -> 0
            1 0 | 1 -> 1
            1 1 | 1 -> 0
T from D, T = 1 1 0 1 0 -> Q = 1 0 0 1 1
💡 Tip

Key points to remember

  • Excitation table: transition Q → Q+ gives the required inputs; used in design.
  • JK: 0 → 0 (0, X), 0 → 1 (1, X), 1 → 0 (X, 1), 1 → 1 (X, 0). SR: (0, X), (1, 0), (0, 1), (X, 0).
  • D = Q+ and T = Q oplus Q+.
  • Conversion = required characteristic table + given excitation table + K-maps.
  • SR to JK: S = JQ', R = KQ. JK to T: J = K = T. JK to D: J = D, K = D'. D to T: D = T oplus Q.
🎯 END-TERM EXAM PREP

📝 IPU End-Term Exam Corner (5-10 Marks)

  • Q1. What is an excitation table? Write the excitation tables of SR, JK, D and T flip-flops. (5 Marks)
  • Q2. Convert an SR flip-flop into a JK flip-flop. Show the conversion table, K-maps and logic diagram. (10 Marks)
  • Write: the 8-row table with Q+, S and R columns; S = JQ', R = KQ; the circuit with feedback.
  • Q3. Convert a JK flip-flop into a T flip-flop and into a D flip-flop. (5 Marks)
  • Q4. Convert a D flip-flop into a T flip-flop. (2.5 Marks)
  • Q5. Convert a T flip-flop into a JK flip-flop. (5 Marks)