NivaarExam PrepOfficial exam papers ↗

22-Elec-A4 Digital Systems and Computers · December 2018

Question 2 of 6: Synchronous counter with JK flip-flops

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

22-Elec-A4 Digital Systems & Computers — 2018-Dec (Worked Solutions)

National Exams — December 2018 · 16-Elec-A4 Digital Systems & Computers. Closed book, 3 hours. Six questions, 12 marks each; the rubric requires any five, but all six are solved here as a study resource. Approved Casio/Sharp calculator permitted. A Boolean-identity table and the flip-flop excitation table are supplied with the paper and are used where needed.

Reference texts. M. M. Mano & M. D. Ciletti, Digital Design (6th ed.) — Boolean minimization, NAND/NOR realizations, K-maps, synchronous counters; J. F. Wakerly, Digital Design: Principles and Practices (5th ed.) — counters, PAL/PLA devices; C. Hamacher, Z. Vranesic, S. Zaky & N. Manjikian, Computer Organization and Embedded Systems (6th ed.) — CPU registers, endianness, stacks, parallel I/O; Motorola M68HC11 Reference Manual — big-endian storage, PUSH semantics, Port B addressing.

Question 2: Synchronous counter with JK flip-flops (12 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. The 6-state Gray-like sequence on $Q_AQ_BQ_C$ (A = MSB, C = LSB); JK flip-flops; the standard excitation table $0\!\to\!0:JK{=}0X$, $0\!\to\!1:1X$, $1\!\to\!0:X1$, $1\!\to\!1:X0$.

Find. The six JK input equations, a proof of self-start, and the output timing diagram.

000010100101011001State sequence (6-state cycle)
Part (a): state-transition diagram of the required 6-state cycle. Unused states are 110 and 111.

Approach. Tabulate present→next for each used state, read the JK inputs from the excitation table, minimise each on a 3-variable K-map (with 110, 111 as don't-cares), then substitute the two unused states into the finished equations to test self-start.

The excitation table gives, for every transition, the flip-flop inputs:

State-transition table with JK inputs (X = don't-care)
$Q_A Q_B Q_C$$Q_A^{+}Q_B^{+}Q_C^{+}$$J_A K_A$$J_B K_B$$J_C K_C$
0 0 00 1 00 X1 X0 X
0 1 01 0 01 XX 10 X
1 0 01 0 1X 00 X1 X
1 0 10 1 1X 11 XX 0
0 1 10 0 10 XX 1X 0
0 0 10 0 00 X0 XX 1
  1. Minimise the A-stage inputs. $J_A$ is 1 only at 010 (with 110/111 as don't-cares) and $K_A$ is 1 at 101 and 011: $$J_A=B\overline{C},\qquad K_A=C.$$
  2. Minimise the B-stage inputs. $J_B$ is 1 at 000 and 101; grouping with don't-cares gives $\overline{A}\,\overline{C}+AC$. Every entry of $K_B$ is 1 or don't-care, so it ties high: $$J_B=\overline{A}\,\overline{C}+AC=\overline{A\oplus C},\qquad K_B=1.$$
  3. Minimise the C-stage inputs. $J_C$ is 1 only at 100 (expands to $A$ using the don't-cares) and $K_C$ is 1 only at 001 (expands to $\overline{A}\,\overline{B}$): $$\boxed{J_C=A,\qquad K_C=\overline{A}\,\overline{B}.}$$
  4. Draw the circuit. Three JK flip-flops clocked in parallel, each driven by the equations above (a single 2-input AND for $J_A$, an XNOR for $J_B$, one AND for $K_C$; $K_B$ tied to logic 1).
    JAKAQQ'CLRJBKBQQ'CLRJCKCQQ'CLRJA =B.C'KA =CCLKQAQA'JB =(A XNOR C)KB =1CLKQBQB'JC =AKC =A'.B'CLKQCQC'Synchronous JK counter (A=MSB, C=LSB); inputs from the minimised equations
    Part (a): final synchronous counter. Each J/K pin carries its minimised expression; all flip-flops share CLK and $\overline{CLR}$.
  5. (b) Self-start test. Substituting the unused states into the finished equations: 110 gives $J_AK_A{=}10,\ J_BK_B{=}01,\ J_CK_C{=}10\Rightarrow 101$, and 111 gives $J_AK_A{=}01,\ J_BK_B{=}11,\ J_CK_C{=}10\Rightarrow 001$. Both unused states drop into the main cycle in one clock, so the counter is $\boxed{\text{self-starting}}$.
    1101011 clk1110011 clk-> enters cycle-> enters cycleUnused states recover in one clock (self-starting)
    Part (b): both unused states enter the cycle after a single clock — the design is self-correcting.
  6. (c) Timing diagram. Starting from 000 at $t=0$ (after $\overline{CLR}$ is released) the outputs step through 000, 010, 100, 101, 011, 001 and repeat.
    CLK12345678QAQBQCt = 0 (CLR released)
    Part (c): output waveforms over 8 clock pulses; the pattern repeats every 6 clocks.
Question 2 — results
ItemResult
$J_A,\ K_A$$B\overline{C}$,   $C$
$J_B,\ K_B$$\overline{A\oplus C}$,   $1$
$J_C,\ K_C$$A$,   $\overline{A}\,\overline{B}$
Self-starting?Yes (110→101, 111→001)
Period6 clocks