Loading lessons...
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 table | Excitation table | |
|---|---|---|
| Given | inputs and present state Q | present state Q and next state Q+ |
| Find | next state Q+ | the inputs needed |
| Used for | analysis | design (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.
| Q | Q⁺ | S | R |
|---|---|---|---|
| 0 | 0 | 0 | X |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | X | 0 |
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.
| Q | Q⁺ | J | K |
|---|---|---|---|
| 0 | 0 | 0 | X |
| 0 | 1 | 1 | X |
| 1 | 0 | X | 1 |
| 1 | 1 | X | 0 |
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+.
| Q | Q⁺ | D | T |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 0 |
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-flop
- Write the characteristic table of the required flip-flop (its inputs and Q, giving Q+).
- For each row, read the inputs the given flip-flop needs for Q → Q+ from its excitation table.
- Simplify each input of the given flip-flop with a K-map over (required inputs, Q).
- Draw the logic.
Convert an SR flip-flop into a JK flip-flop.
| J | K | Q | Q⁺ | S | R |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | X |
| 0 | 0 | 1 | 1 | X | 0 |
| 0 | 1 | 0 | 0 | 0 | X |
| 0 | 1 | 1 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 1 | X | 0 |
| 1 | 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 1 |
- Columns Q+ come from the JK characteristic table; S, R from the SR excitation table.
- S = ∑ m(4, 6) + d(1, 5) over J, K, Q: the two 1s pair as JQ'.
- R = ∑ m(3, 7) + d(0, 2): the two 1s pair as KQ.
K-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.
Convert a JK flip-flop into a T flip-flop.
| T | Q | Q⁺ | J | K |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | X |
| 0 | 1 | 1 | X | 0 |
| 1 | 0 | 1 | 1 | X |
| 1 | 1 | 0 | X | 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.
- K = ∑ m(3) + d(0, 2): grouping with the don't-care at TQ' gives K = T.
Convert a JK flip-flop into a D flip-flop.
| D | Q | Q⁺ | J | K |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | X |
| 0 | 1 | 0 | X | 1 |
| 1 | 0 | 1 | 1 | X |
| 1 | 1 | 1 | X | 0 |
- J = ∑ m(2) + d(1, 3) gives J = D.
- K = ∑ m(1) + d(0, 2) gives K = D'.
JK to T, JK to D, D to T and SR to JK conversions
Convert a D flip-flop into (a) a JK flip-flop and (b) a T flip-flop.
- For a D flip-flop D = Q+, so the conversion logic is simply the characteristic equation of the required flip-flop.
- (a) JK: D = Q+ = JQ' + K'Q (two AND gates, one OR gate, using Q and Q' as feedback).
- (b) T: D = Q+ = T oplus Q (one XOR gate).
Convert a T flip-flop into a JK flip-flop.
| J | K | Q | Q⁺ | T |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 1 |
- T = Q oplus Q+ for each row: T = ∑ m(3, 4, 6, 7) over J, K, Q.
- Minterms 4 and 6 group as JQ'; minterms 3 and 7 group as KQ.
Convert (a) an SR flip-flop into a D flip-flop and (b) a T flip-flop into a D flip-flop.
- (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'.
- (b) T must be 1 exactly when the state changes, that is when D differs from Q: T = D oplus Q.
4. Summary of Conversions
| Required ↓ / Given → | SR | JK | D | T |
|---|---|---|---|---|
| SR | J = S, K = R | D = S + R'Q | T = SQ' + RQ | |
| JK | S = JQ', R = KQ | D = JQ' + K'Q | T = JQ' + KQ | |
| D | S = D, R = D' | J = D, K = D' | T = D oplus Q | |
| T | S = TQ', R = TQ | J = K = T | D = 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:
// 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
endmoduleThe JK rows are exactly the JK characteristic table, and the T flip-flop toggles on every T = 1:
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 1Key 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.
📝 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)