NivaarExam PrepOfficial exam papers ↗

04-BS-8 · May 2017

Question 4 of 5: Two-Flip-Flop Counter — Synchronicity, State Detection, Timing

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

Notes on this paper

National Exams — May 2017 — 04-BS-8 Digital Logic Circuits. Three-hour, closed-book exam (Casio or Sharp approved calculator only; one hand-written 8.5"×11" aid sheet permitted). Format: five questions offered, each worth 25 marks (100 total); any four constitute a complete paper and only the first four appearing in the answer book are marked. All five are solved below for completeness.

Reference texts: Mano & Ciletti, Digital Design (6th ed., Pearson) — Boolean minimization, PAL/PLA/FPGA architectures, flip-flop conversion, sequential design, arithmetic circuits; Floyd, Digital Fundamentals (11th ed., Pearson) — decoders, number systems, flip-flop characteristic tables, counters.

Question 4: Two-Flip-Flop Counter — Synchronicity, State Detection, Timing (25 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. D1 = Q2, D2 = Q1′ (both flip-flops driven from the same Clock line), Z = Q1·Q2, both flip-flops reset to (Q1,Q2)=(0,0), clock = 10 MHz, flip-flop propagation delay 10 ns, AND-gate propagation delay 5 ns.

Find. (a) synchronous or not, with justification; (b) which (Q1,Q2) state Z flags; (c) the Q1, Q2, Z waveforms over a full cycle.

Approach. Build the one-step-ahead state table from D1=Q2, D2=Q1′, walk it from the reset state to find the repeating cycle, then lay the timing diagram out against the 100 ns clock period using the two stated propagation delays.

  1. Part (a) — synchronous? Both D flip-flops are driven by the same Clock signal, and neither flip-flop's output clocks the other (Q1 and Q2 feed only D inputs, never CLK inputs). Every state change in the circuit therefore happens on the same clock edge, simultaneously — the defining property of a synchronous sequential circuit (as opposed to a ripple/asynchronous design, where one flip-flop's output clocks the next). $$\boxed{\text{Yes -- synchronous (single shared clock, no FF-to-FF clocking)}}$$
  2. Part (b) — state table and detected state. With D1=Q2 and D2=Q1′, the next state (Q1+,Q2+) = (Q2, Q1′). Starting from (0,0): $$ (0,0)\to(0,1)\to(1,1)\to(1,0)\to(0,0)\to\cdots $$ a repeating 4-state cycle (this is a standard 2-bit Gray-code sequence: 00, 01, 11, 10). Z=Q1·Q2 is 1 on exactly one of the four states. $$\boxed{\text{AND gate detects state } Q_1Q_2=11 \text{, occurring once every 4 clock cycles}}$$
  3. Part (c) — timing. Clock period at 10 MHz is 100 ns, edges at t=0,100,200,300,400 ns. Each flip-flop's output settles 10 ns after the triggering edge (t=110, 210, 310, 410 ns), stepping through the cycle found in part (b): Q1 goes 0→1 at t=210 ns (holds through the 11 state) and 1→0 at t=410 ns; Q2 goes 0→1 at t=110 ns and 1→0 at t=310 ns. Both are simultaneously 1 only in the window [210,310) ns; the AND gate adds a further 5 ns, so $$\boxed{Z \text{ is high from } 215\text{ ns to } 315\text{ ns, once every 400 ns}}$$
0100200300400t (ns)Clock1Q11Q21Z1
Fig. Q4(c) — timing diagram, 10 MHz clock (100 ns period), 10 ns flip-flop delay, 5 ns AND-gate delay. Q1/Q2 settle 10 ns after each rising edge; Z (blue) follows 5 ns after Q1=Q2=1 is reached, high for the 210–310 ns window plus the 5 ns gate delay (215–315 ns).
Final results — Question 4
ItemResult
(a)Yes — synchronous (one shared clock, no FF clocks another)
(b)State Q1Q2 = 11 (once per 4-cycle Gray sequence)
(c)Clock period 100 ns; Z high 215–315 ns each cycle