Decoder / mux sizes (4.4): decoder n inputs → 2n outputs; mux with 2s data inputs needs s select lines.
Analysing a sequential circuit (4.5): write an input equation for every flip-flop input from the wiring, then evaluate it row by row using present values only.
NOR gets X and A and drives bothJ and K; AND gets A and Q′ of the D flip-flop (B′).
If it changes
Only the input equations change; the row-by-row method stays.
Show solution ↓Hide solution ↑
Solution
How to solve
Name the parts: A is the JK flip-flop, B the D flip-flop, X the input.
Write the input equations from the wires (below).
Since JA=KA, A toggles when (A+X)′=1 and holds otherwise.
Per row: compute A+X, then J=K, then the JK action gives next A; compute B′, then DB, which is next B.
Fill the two Next State columns; the working goes in the extra columns on the right.
Sample answer
From the wiring:
JA=KA=(A+X)′,DB=A⋅B′
Present State
Input
Next State
Working
A
B
X
A
B
A+X
JA=KA
JK action
B′
DB=AB′
0
0
0
1
0
0
1
toggle
1
0
0
0
1
0
0
1
0
hold
1
0
0
1
0
1
0
0
1
toggle
0
0
0
1
1
0
0
1
0
hold
0
0
1
0
0
1
1
1
0
hold
1
1
1
0
1
1
1
1
0
hold
1
1
1
1
0
1
0
1
0
hold
0
0
1
1
1
1
0
1
0
hold
0
0
Final table (rows ABX = 000 → 111): Next A = 1, 0, 1, 0, 1, 1, 1, 1 and Next B = 0, 0, 0, 0, 1, 1, 0, 0.
Behaviour: once A=1 it stays 1 and B alternates (B+=B′ when A=1). From A=0, X=0 sets A to 1 and X=1 keeps it 0.
Watch out: never use the new A to compute B+; every right-hand side uses present values. Take B′ from the D flip-flop’s Q′ output.
Exercise Q4
Complete the truth table for the following sequential circuit:
Input
Present
Next state
X
Y
A
A
B
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
Part
Detail
Asks
Find A+ and B+ for every (X,Y,A).
Needs
JK rule, D rule, XOR (1 when inputs differ).
Look at
X→J, Y→K; Y also goes through an inverter into the XOR with A; XOR drives D. Present B is unused.
If it changes
Column order here is X,Y,A; copy the order of the table you are given.
Show solution ↓Hide solution ↑
Solution
How to solve
Write the equations: JA=X, KA=Y, DB=A⊕Y′.
A+: read XY as JK (00 hold, 01 reset, 10 set, 11 toggle).
B+: compute Y′, then A⊕Y′ using the presentA.
Fill the two Next state columns; the working goes in the extra columns on the right.
Sample answer
From the wiring:
JA=X,KA=Y,DB=A⊕Y′
Input
Present
Next state
Working
X
Y
A
A
B
JK action
Y′
DB=A⊕Y′
0
0
0
0
1
00 hold
1
0⊕1=1
0
0
1
1
0
00 hold
1
1⊕1=0
0
1
0
0
0
01 reset
0
0⊕0=0
0
1
1
0
1
01 reset
0
1⊕0=1
1
0
0
1
1
10 set
1
0⊕1=1
1
0
1
1
0
10 set
1
1⊕1=0
1
1
0
1
0
11 toggle
0
0⊕0=0
1
1
1
0
1
11 toggle
0
1⊕0=1
Result (rows XYA = 000 → 111): Next A = 0, 1, 0, 0, 1, 1, 1, 0 and Next B = 1, 0, 0, 1, 1, 0, 0, 1.
Check: B+=A′ when Y=0 and B+=A when Y=1 ✓.
Watch out: the XOR uses Y′, not Y, and the old A, not A+.
Exercise Q5
A Mux-Not flip-flop (MN flip-flop) behaves as follows: If M = 1, the flip-flop complements the current state. If M = 0, the next state of the flip-flop is equal to the value of N.
a) Derive the characteristic table for the flip-flop.
b) Show how a JK flip-flop can be converted to a MN flip-flop by adding gate(s) and inverter(s).
Part
Detail
Asks
(a) Table of Q(t+1) for every M,N. (b) The J, K logic that makes a JK flip-flop act like it.
Needs
JK excitation table (change → J,K) and K-maps with don’t-cares.
Look at
M=1: toggle (Q′). M=0: copy N.
If it changes
Any conversion: new table → old excitation table → K-map per input → gates.
Show solution ↓Hide solution ↑
Solution
How to solve
Build the table of the new flip-flop with Q and Q+ (8 rows).
For each row, write the J,K that cause Q→Q+: 0→0: J=0,K=d; 0→1: J=1,K=d; 1→0: J=d,K=1; 1→1: J=d,K=0.
K-map each of J and K (rows M, columns NQ) and use the d‘s to enlarge groups.
Draw the gates in front of the JK flip-flop and verify with Q+=JQ′+K′Q.
M
N
Q
Q+
J
K
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
Sample answer
(a) Characteristic table
M
N
Q(t+1)
0
0
0
0
1
1
1
0
Q(t)′
1
1
Q(t)′
Equation: Q+=M′N+MQ′.
(b) Conversion
M
N
Q
Q+
J
K
0
0
0
0
0
d
0
0
1
0
d
1
0
1
0
1
1
d
0
1
1
1
d
0
1
0
0
1
1
d
1
0
1
0
d
1
1
1
0
1
1
d
1
1
1
0
d
1
J (rows M, columns NQ):
M\NQ
00
01
11
10
0
0
d
d
1
1
1
d
d
1
Bottom row gives M, columns 11–10 give N: J=M+N.
K:
M\NQ
00
01
11
10
0
d
1
0
d
1
d
1
1
d
Bottom row gives M, columns 00–01 give N′: K=M+N′.
J=M+N,K=M+N′
Verify: Q+=(M+N)Q′+M′NQ. For M=1: Q+=Q′ (toggle) ✓. For M=0: Q+=N(Q′+Q)=N ✓.
Watch out: use the excitation table (change → inputs), not the characteristic table, and use a d only when it enlarges a group.