Top Banner Ad

BEC302 — Unit 3: Sequential logic design

Table of Contents (31 sections)

BEC302 · DIGITAL SYSTEM DESIGN · Unit 3

Sequential logic design

Unit Scope & Exam Weightage: This unit adds memory to logic: latches and flip-flops (SR, JK, D, T, master–slave, edge-triggered), flip-flop conversion, ripple and synchronous counters, ring and Johnson counters, shift registers (SISO/SIPO/PISO/PIPO, bidirectional, universal), and finite state machines (Mealy/Moore, state diagrams, state reduction, analysis and design of clocked circuits). It is a 14–21 mark unit; every recent paper contains at least one 7-mark flip-flop/counter design plus a 2-marker on race-around, latch vs flip-flop, or Mealy vs Moore.


Front Page: Importance-Wise Topic Roadmap (2023–26 PYQs)

Priority Topic (Exact Syllabus) PYQs Asked Marks Weightage Tag
1 Building blocks like S-R (SR/JK/D/T, latch vs FF, race-around) 9 (2023-24 ×3, 2024-25 ×4, 2025-26 ×2) 7m × 6 + 2m × 3 Survival Mode Tables
2 Applications of Flip Flops: ripple and synchronous counters 2 (2024-25, 2025-26) 7m × 2 Survival Mode Design
3 Flip flop conversion / edge triggered FF 2 (2023-24, 2025-26) 7m × 2 Derivation
4 Finite state machines: Mealy and Moore machines 2 (2023-24, 2025-26) 7m + 2m Comparison
5 Johnson counter / Ring counter 1 (2024-25) 7m Waveforms
6 Universal shift register (with SISO/SIPO/PISO/PIPO) 1 (2025-26) 7m Design
7 state reduction / Analysis of clocked sequential circuits / Design of clocked sequential circuits Integrated in #4 — Supporting Topic

2-Hour Last-Night Survival Checklist:

  1. Four characteristic equations: SR Q+=S+RˉQQ^+=S+\bar RQ, D Q+=DQ^+=D, JK Q+=JQˉ+KˉQQ^+=J\bar Q+\bar KQ, T Q+=T⊕QQ^+=T\oplus Q; derive each from the excitation table, not from memory alone.
  2. Race-around: occurs in a level-triggered JK latch when J=K=1J=K=1 and the clock pulse is wider than the propagation delay — QQ toggles repeatedly. Cure: master–slave or positive/negative edge triggering.
  3. Synchronous counter: T0=1T_0=1, T1=Q0T_1=Q_0, T2=Q0Q1T_2=Q_0Q_1, T3=Q0Q1Q2T_3=Q_0Q_1Q_2; all FFs share one clock, so no ripple delay accumulation.
  4. Johnson counter: Qˉlast\bar Q_{\text{last}} fed back to the first stage; 3-bit sequence 000→100→110→111→011→001→000 gives six overlapping phases for an LED chaser/clock generator.
  5. Mealy vs Moore: Mealy output =f(state,input)=f(\text{state},\text{input}) (faster, fewer states, glitches possible); Moore output =f(state)=f(\text{state}) (glitch-free, one extra state often needed).

1. Building Blocks of Sequential Logic

Sequential circuit (2 Marks): a logic circuit whose output depends on the present inputs and on past history stored in memory elements. Its basic building blocks are latches (level-sensitive) and flip-flops (edge-sensitive). Other blocks are counters, shift registers and FSMs.

1.1 Latch vs. Flip-Flop (2 Marks)

Feature Latch Flip-Flop
Triggering Level-sensitive (enabled while clock is high/low) Edge-sensitive (responds at rising/falling edge)
Storage Transparent during enable Changes only at the clock edge
Feedback Unclocked feedback path possible Internal master–slave/edge circuitry
Timing issue Race-around / transparency Immune to race-around
Use Temporary storage, handshake Counters, registers, state machines

1.2 SR Latch and SR Flip-Flop

SR = Set–Reset. For an active-high NOR-based SR latch:

S R Q(t+1)Q(t+1) Action
0 0 Q(t)Q(t) Hold (no change)
0 1 0 Reset
1 0 1 Set
1 1 ? Forbidden / indeterminate

Characteristic equation: Q(t+1)=S+Rˉ Q(t)Q(t+1)=S+\bar R\,Q(t), valid only with the constraint SR=0SR=0. The forbidden condition is the main disadvantage of SR; JK removes it by letting S=JQˉS=J\bar Q and R=KQR=KQ.

1.3 JK Flip-Flop

J K Q(t)Q(t) Q(t+1)Q(t+1) Action
0 0 0 / 1 0 / 1 Hold
0 1 0 / 1 0 / 0 Reset
1 0 0 / 1 1 / 1 Set
1 1 0 / 1 1 / 0 Toggle
Q(t+1)=JQˉ(t)+KˉQ(t)Q(t+1)=J\bar Q(t)+\bar K Q(t) Q(t+1)‾=JˉQˉ(t)+KQ(t)\overline{Q(t+1)}=\bar J\bar Q(t)+K Q(t)

Master–slave JK: two JK latches in cascade, master enabled when clock is high, slave when clock is low; the output changes only at the falling edge, so race-around is eliminated.

Race-around condition (2 Marks): when J=K=1J=K=1 in a level-triggered JK latch and the pulse width twt_w exceeds the propagation delay tpt_p, QQ keeps toggling and the final state is unpredictable. Remedies: (i) master–slave connection, (ii) edge triggering, (iii) tw<tpt_w<t_p.

1.4 D and T Flip-Flops

  • D flip-flop: Q(t+1)=DQ(t+1)=D; the data present just before the active edge is stored. It is the standard storage element and is edge triggered in practice.
  • T flip-flop: Q(t+1)=TQˉ+TˉQ=T⊕QQ(t+1)=T\bar Q+\bar T Q=T\oplus Q; with T=1T=1 it toggles every clock, with T=0T=0 it holds. Obtained from JK by tying J=K=TJ=K=T, or from D by D=T⊕QD=T\oplus Q.
Conversion Excitation logic Reason
JK → T J=K=TJ=K=T JK toggles when both inputs are 1
D → T D=T⊕QD=T\oplus Q D must be complement of present state when T=1T=1
JK → D J=DJ=D, K=DˉK=\bar D Set when D=1, reset when D=0
SR → D S=DS=D, R=DˉR=\bar D Same mapping, with SR=0SR=0 automatically satisfied

Examiner Tip (flip-flop tables): For "describe SR, D and JK flip-flops in detail", write a four-column table (inputs, present state, next state, action) for each, then the characteristic equation, then one sentence on the defect/remedy (SR forbidden state; JK race-around; D transparent storage). This ordering matches the marking scheme.


2. Edge-Triggered and Master–Slave Operation

Edge-triggered flip-flop (2 Marks): a storage element that samples its input only during a transition of the clock — positive edge (rising) or negative edge (falling). A small triangle on the clock symbol denotes edge triggering; a bubble before it denotes falling edge.

2.1 Positive-Edge-Triggered D Flip-Flop

Circuit idea: a master D latch (enabled when CLK=0) followed by a slave D latch (enabled when CLK=1) with inverted clock control.

Interval Master Slave Output QQ
CLK = 0 Transparent, follows DD Holds Old value
CLK rises 0→1 Closes, captures DD Opens, takes master value Updates to captured DD
CLK = 1 Holds Transparent to master (stable) Stable
CLK falls 1→0 Opens again Closes Stable

Waveform rule: QQ follows DD only at the instant of the rising edge; changes in DD between edges have no effect. This is the behavior the 2023-24 question asks to sketch.

2.2 Master–Slave JK Timing

The master is active for the full high level and the slave for the full low level. Since feedback from QQ reaches the master inputs only while the master is disabled, multiple toggling within one pulse is impossible — hence no race-around.


3. Counters

Counter (2 Marks): a sequential circuit that advances through a predefined state sequence on each clock pulse. It is built from flip-flops whose J/KJ/K or T/DT/D inputs are driven by combinational logic.

3.1 Asynchronous (Ripple) vs. Synchronous Counter

Feature Asynchronous / ripple Synchronous
Clock Only first FF gets external clock; each stage clocks the next All FFs share the same clock
Delay Ripples cumulatively: ttotal≈n tpt_{\text{total}}\approx n\,t_p Single tpt_p for all stages
Decoding glitches Possible due to skewed transitions Absent
Design complexity Simple (just connect QQ to next clock) Needs input logic per stage
Max frequency Low High
Example BCD ripple counter 4-bit binary synchronous counter

3.2 3-Bit Synchronous Binary Up Counter

Use three T (or JK with J=K=TJ=K=T) flip-flops. The least significant bit toggles every clock; higher bits toggle when all lower bits are 1:

T0=1,T1=Q0,T2=Q0Q1\boxed{T_0=1,\qquad T_1=Q_0,\qquad T_2=Q_0Q_1}
Clock pulse Q2Q1Q0Q_2Q_1Q_0 T2T_2 T1T_1 T0T_0
0 000 0 0 1
1 001 0 1 1
2 010 0 0 1
3 011 1 1 1
4 100 0 0 1
5 101 0 1 1
6 110 0 0 1
7 111 0 0 1
8 000 0 0 1

For a 4-bit version add T3=Q0Q1Q2T_3=Q_0Q_1Q_2. A down counter uses complements: T1=Qˉ0T_1=\bar Q_0, T2=Qˉ0Qˉ1T_2=\bar Q_0\bar Q_1.

3.3 Ring Counter and Johnson Counter

Ring counter: an nn-bit shift register with QlastQ_{\text{last}} fed back to the serial input, initially loaded with a single 1. For 3 bits: 100→010→001→100. One-hot outputs, nn states, simple decoding, but poor utilisation (2n−n2^n-n states unused).

Johnson (twisted-ring) counter: Qˉlast\bar Q_{\text{last}} is fed back. For 3 bits:

Clock:  0    1    2    3    4    5    6
Q2      0    1    1    1    0    0    0
Q1      0    0    1    1    1    0    0
Q0      0    0    0    1    1    1    0

Six states; each output is high for three consecutive clocks and the three waveforms are phase-shifted by one clock period. With three LEDs driven through current-limiting resistors, the pattern lights one LED at a time, then overlaps into two and three — a multiphase clock generator for stepper motors and sequencing lights.

Parameter Ring counter Johnson counter
Feedback QlastQ_{\text{last}} Qˉlast\bar Q_{\text{last}}
States for nn bits nn 2n2n
Decoding One variable per state Two variables per state
Self-starting No (needs initial 1) Usually needs reset to 000

4. Shift Registers

Shift register (2 Marks): a chain of flip-flops in which data moves one stage per clock pulse. It is used for serial–parallel conversion, temporary storage, arithmetic shifting and sequence generation.

Type Input Output Operation
SISO Serial at first stage Serial from last stage Data enters bit by bit, exits bit by bit after nn clocks
SIPO Serial Parallel from all QQs After nn clocks the word is available on all outputs
PISO Parallel loaded in one clock Serial from last stage Load word, then shift out bit by bit
PIPO Parallel Parallel Simply stores the word (a register)

Universal 4-bit shift register: four D flip-flops, each preceded by a 4:1 mux with select lines S1S0S_1S_0:

S1S0S_1S_0 Mode Mux input for stage ii
00 Hold QiQ_i
01 Shift right Qi+1Q_{i+1} (serial input at MSB)
10 Shift left Qi−1Q_{i-1} (serial input at LSB)
11 Parallel load External DiD_i

A bidirectional shift register implements only the two shift modes; a universal one adds hold and parallel load.


5. Finite State Machines and Clocked Sequential Design

FSM (2 Marks): a model with a finite set of states, transitions driven by inputs and a clock, and outputs determined by the state (Moore) or by state and input (Mealy). It is specified by a state diagram/table and realised with flip-flops plus next-state combinational logic.

5.1 Mealy vs. Moore

Feature Mealy Moore
Output depends on Present state and input Present state only
Timing Output can change mid-clock when input changes Output changes only at clock edge
Number of states Usually fewer Often one more
Glitch susceptibility Higher (input path to output) Lower
Speed Faster response One clock cycle slower
Typical use Sequence detectors, high-speed controllers Counters, safe control FSMs

5.2 Design Flow for Clocked Sequential Circuits

  1. Write the specification and draw a state diagram (circles = states, arcs = input/output).
  2. Encode states with n=⌈log⁡2N⌉n=\lceil\log_2 N\rceil flip-flops.
  3. Build the state table (present state, input, next state, output).
  4. Choose FF type (D is simplest: Di=Qi+D_i=Q_i^+; JK needs excitation table).
  5. Minimise each next-state/output function with K-maps.
  6. Draw the circuit and verify with a timing/state sequence.

State reduction: merge states that produce identical outputs for every input sequence (equivalence by pairwise implication table). Fewer states → fewer flip-flops → cheaper hardware.

After-Topic PYQs:

  • 2023-24 (7 Marks): "Compare and contrast Mealy and Moore machines and discuss their applications in digital systems design."
  • 2025-26 (2 Marks): "Differentiate between Moore Machine and Mealy Machine."
  • 2023-24 (7 Marks): "Describe the operation of various flip-flops, including S-R, JK, D, and T flip-flops."
  • 2024-25 (7 Marks): "Explain SR, D and JK flip flop in detail."
  • 2024-25 (7 Marks): "Prove that the characteristics equation for the complement output of JK Flip Flop is: Q(t+1)‾=J‾Q‾+K‾Q\overline{Q(t+1)} = \overline{J}\overline{Q} + \overline{K}Q"
  • 2025-26 (7 Marks): "Draw JK flip-flop and write the characteristic table and characteristic equation for it. Explain how will you convert it into T flip-flop."
  • 2023-24 (7 Marks): "Explain positive edge triggered D-flip-flop with the help of circuit diagram and waveforms."
  • 2024-25, 2025-26 (2 Marks): "What is race around condition?"
  • 2024-25 (2 Marks): "Distinguish between Latch and Flip Flop."
  • 2023-24 (2 Marks): "What are the basic building blocks of sequential logic circuits?"
  • 2024-25 (7 Marks): "Differentiate between asynchronous counter and synchronous counter? Explain the working of 4-bit Synchronous counter using suitable circuit diagram and timing diagram."
  • 2025-26 (7 Marks): "Design a 3-bit synchronous binary counter with neat sketch."
  • 2024-25 (7 Marks): "Explain 3-bit Johnson counter with circuit diagram. Also draw its waveform and show that this counter can be used as Multiphase clock generator for controlling the specific light pattern of LED's."
  • 2025-26 (7 Marks): "With the help of neat sketch, explain the operation of 4-bit universal shift register."

Solved Exam-Ready Questions

Solved Q1 (2024-25 — 7 Marks | SR, D and JK Flip-Flops)

Q: Explain SR, D and JK flip flop in detail.

Solution:

  1. SR: inputs S (set) and R (reset). Truth rows: 00 hold, 01 reset, 10 set, 11 forbidden. Characteristic equation Q+=S+RˉQQ^+=S+\bar RQ with SR=0SR=0.
  2. Defect of SR: the forbidden input combination makes the next state unpredictable; also a level-sensitive SR latch is transparent.
  3. JK: adds feedback so that J=K=1J=K=1 means toggle instead of forbidden. Truth rows: 00 hold, 01 reset, 10 set, 11 toggle. Characteristic equation Q+=JQˉ+KˉQQ^+=J\bar Q+\bar KQ.
  4. Race-around: in a level-triggered JK with J=K=1J=K=1, QQ can toggle several times during one wide clock pulse; cured by master–slave connection.
  5. D: single data input; Q+=DQ^+=D. The D input is sampled at the active clock edge, so it eliminates both the forbidden state and transparency.
  6. Conclusion: SR is the simplest theoretical block, JK is the versatile practical latch, D is the preferred storage element in registers and FSMs.

Solved Q2 (2024-25 — 7 Marks | JK Complement Characteristic Equation)

Q: Prove that the characteristics equation for the complement output of JK Flip Flop is: Q(t+1)‾=J‾Q‾+K‾Q\overline{Q(t+1)} = \overline{J}\overline{Q} + \overline{K}Q

Solution:

  1. Start from the JK next-state equation for the QQ output: Q(t+1)=JQˉ(t)+KˉQ(t)Q(t+1)=J\bar Q(t)+\bar K Q(t).
  2. Take the complement: Q(t+1)‾=JQˉ+KˉQ‾\overline{Q(t+1)}=\overline{J\bar Q+\bar KQ}.
  3. Apply De Morgan: Q(t+1)‾=(Jˉ+Q)(K+Qˉ)\overline{Q(t+1)}=(\bar J+Q)(K+\bar Q).
  4. Expand: JˉK+JˉQˉ+KQ+QQˉ=JˉK+JˉQˉ+KQ\bar JK+\bar J\bar Q+KQ+Q\bar Q=\bar JK+\bar J\bar Q+KQ since QQˉ=0Q\bar Q=0.
  5. Remove the consensus term JˉK\bar JK: if Q=0Q=0, JˉQˉ\bar J\bar Q already covers it; if Q=1Q=1, KQKQ covers it. Hence the minimal form is
Q(t+1)‾=JˉQˉ(t)+KQ(t)\boxed{\overline{Q(t+1)}=\bar J\bar Q(t)+KQ(t)}
  1. Note on the printed statement: the paper prints JˉQˉ+KˉQ\bar J\bar Q+\bar KQ. Substituting J=K=1J=K=1, Q=1Q=1 into that expression gives 1, but the JK truth table gives Q(t+1)=0Q(t+1)=0, so its complement must be 1 — that single case is consistent; however the accepted standard JK complement equation derived from the truth table is JˉQˉ+KQ\bar J\bar Q+KQ. Write the derived equation and, if desired, mention that the overbar belongs on KK in the standard form.
  2. Truth-table check of derived form: J=0,K=1,Q=0J=0,K=1,Q=0 → JˉQˉ=1\bar J\bar Q=1 → Q+‾=1\overline{Q^+}=1 ✓; J=1,K=0,Q=1J=1,K=0,Q=1 → both terms 0 → Q+‾=0\overline{Q^+}=0 ✓.

Solved Q3 (2025-26 — 7 Marks | JK to T Conversion)

Q: Draw JK flip-flop and write the characteristic table and characteristic equation for it. Explain how will you convert it into T flip-flop.

Solution:

  1. JK characteristic table: 00→hold, 01→reset, 10→set, 11→toggle (full table in Section 1.3).
  2. Characteristic equation: Q+=JQˉ+KˉQQ^+=J\bar Q+\bar KQ.
  3. Target T behaviour: T=0T=0 hold, T=1T=1 toggle; equation Q+=TQˉ+TˉQQ^+=T\bar Q+\bar TQ.
  4. Conversion: compare the two equations. Setting J=TJ=T and K=TK=T makes Kˉ=Tˉ\bar K=\bar T, so Q+=TQˉ+TˉQQ^+=T\bar Q+\bar TQ — identical to T.
  5. Circuit: connect the single T input to both J and K of the JK flip-flop; use a common clock.
  6. Verification: T=0T=0 → J=K=0J=K=0 → hold ✓; T=1T=1 → J=K=1J=K=1 → toggle ✓.
  7. Use: the resulting T FF is the building block of binary counters (Section 3.2).

Solved Q4 (2024-25, 2025-26 — 2 Marks | Race-Around)

Q: What is race around condition?

Solution: Race-around occurs in a level-triggered JK flip-flop when J=K=1J=K=1 and the clock stays high longer than the propagation delay tpt_p. Because the feedback outputs change while the master latch is still enabled, QQ toggles repeatedly and ends in an uncertain state. It is eliminated by master–slave JK, by edge triggering, or by ensuring clock pulse width tw<tpt_w<t_p.


Solved Q5 (2024-25 — 7 Marks | Synchronous Counter)

Q: Differentiate between asynchronous counter and synchronous counter? Explain the working of 4-bit Synchronous counter using suitable circuit diagram and timing diagram.

Solution:

  1. Difference: asynchronous (ripple) clocks stages sequentially, giving cumulative delay ntpn t_p and decoding glitches; synchronous clocks all FFs together, giving one tpt_p and clean outputs (table in Section 3.1).
  2. Block: four T FFs FF0FF_0 (LSB) to FF3FF_3 (MSB), all driven by the same clock.
  3. Input logic: T0=1T_0=1, T1=Q0T_1=Q_0, T2=Q0Q1T_2=Q_0Q_1, T3=Q0Q1Q2T_3=Q_0Q_1Q_2 — each bit toggles only when every lower bit is 1.
  4. Sequence: 0000→0001→0010→0011→0100→0101→0110→0111→1000→…→1111→0000; modulus 16.
  5. Timing diagram: draw Q0Q_0 dividing clock by 2, Q0Q_0 by 2, Q2Q_2 by 4 and Q3Q_3 by 8, all transitions aligned at the same clock edge.
  6. Advantage: maximum clock rate is set by one FF delay plus one AND-gate delay, not by four cascaded delays; hence it is used in high-speed counters and processors.

Solved Q6 (2025-26 — 7 Marks | 3-Bit Synchronous Counter)

Q: Design a 3-bit synchronous binary counter with neat sketch.

Solution:

  1. Choose three JK flip-flops with common clock; set Ji=Ki=TiJ_i=K_i=T_i.
  2. Derive toggle conditions from the count sequence: FF0FF_0 toggles every pulse → J0=K0=1J_0=K_0=1; FF1FF_1 toggles when Q0=1Q_0=1 → J1=K1=Q0J_1=K_1=Q_0; FF2FF_2 toggles when Q0Q1=11Q_0Q_1=11 → J2=K2=Q0Q1J_2=K_2=Q_0Q_1.
  3. Sketch: three JK blocks stacked, common clock line, one AND gate feeding J2K2J_2K_2, Q0Q_0 wired to J1K1J_1K_1.
  4. State sequence: 000,001,010,011,100,101,110,111,000 (mod-8 up counter).
  5. Check at 011: T2=0⋅1=0T_2=0\cdot1=0? Wait Q0=1,Q1=1Q_0=1,Q_1=1, so T2=1T_2=1 — at the next edge 011 becomes 100 ✓.
  6. Down-counter variant: replace QQ by Qˉ\bar Q in the toggle equations.

Solved Q7 (2024-25 — 7 Marks | 3-Bit Johnson Counter)

Q: Explain 3-bit Johnson counter with circuit diagram. Also draw its waveform and show that this counter can be used as Multiphase clock generator for controlling the specific light pattern of LED's.

Solution:

  1. Circuit: three D flip-flops in a shift chain; D0=Qˉ2D_0=\bar Q_2, D1=Q0D_1=Q_0, D2=Q1D_2=Q_1; common clock; reset clears to 000.
  2. State progression: 000 → 100 → 110 → 111 → 011 → 001 → 000 (six unique states, modulus 6).
  3. Waveform: tabulated in Section 3.3; each QiQ_i stays high for three clocks and low for three clocks, with successive outputs delayed by one clock.
  4. Multiphase clock: the six waveforms are 60° apart in a six-step cycle. Each state energises a different combination of LEDs through drivers/resistors; connecting Q0Q1Q2Q_0Q_1Q_2 to a 3-to-8 decoder yields six non-overlapping phase pulses.
  5. Application: LED chasing/sequencing, stepper-motor phase drive, and division by 6 (output frequency =fclk/6=f_{\text{clk}}/6).
  6. Comparison: a simple ring counter would give only three one-hot phases; Johnson doubles the number of phases with the same hardware.

Solved Q8 (2025-26 — 7 Marks | Universal Shift Register)

Q: With the help of neat sketch, explain the operation of 4-bit universal shift register.

Solution:

  1. Block: four D flip-flops FF3..FF0FF_3..FF_0; each has a 4:1 mux at its D input; common select lines S1S0S_1S_0 and common clock.
  2. Mux inputs: for stage ii, inputs are QiQ_i (hold), Qi+1Q_{i+1} (shift right), Qi−1Q_{i-1} (shift left), external DiD_i (parallel load); boundary stages use serial-in right/left lines.
  3. Mode table: 00 hold, 01 shift right, 10 shift left, 11 parallel load (Section 4).
  4. Example: start 0001, mode shift right with serial-in 1 → 1000 → 1100 → 1110 → 1111.
  5. Neat sketch: draw four FF boxes in a row, muxes above each, arrows between adjacent Q outputs, two shared select lines, one clock line.
  6. Use: universal register in ALUs, serial communications and pattern generators; SISO/SIPO/PISO/PIPO are special selections of these modes.

Solved Q9 (2023-24 — 7 Marks | Mealy vs Moore)

Q: Compare and contrast Mealy and Moore machines and discuss their applications in digital systems design.

Solution:

  1. Mealy: output =f(present state,input)=f(\text{present state},\text{input}); output may change as soon as input changes, without waiting for the clock edge.
  2. Moore: output =f(present state)=f(\text{present state}); output is registered and changes only at clock edges.
  3. Comparison table: dependence, timing, number of states, glitch risk and speed — see Section 5.1.
  4. Mealy applications: high-speed sequence detectors (e.g. detect 1101 in a serial stream), protocol checkers where immediate response is needed.
  5. Moore applications: traffic-light controllers, vending machines, safe state machines where glitches on outputs could drive actuators.
  6. Design note: a Mealy detector usually needs one state fewer than its Moore equivalent, but its output may glitch if the input changes near the clock edge; add an output register if needed.

Solved Q10 (2024-25 — 2 Marks | Latch vs Flip-Flop)

Q: Distinguish between Latch and Flip Flop.

Solution: A latch is level-sensitive and transparent while its enable is active, so its output can follow input changes during that level. A flip-flop is edge-triggered and samples the input only at a clock transition, holding the value for the rest of the cycle. Flip-flops therefore avoid race-around and are used in synchronous counters/FSMs; latches are used for temporary storage and handshaking.


Solved Q11 (2023-24 — 2 Marks | Building Blocks)

Q: What are the basic building blocks of sequential logic circuits?

Solution: The basic blocks are SR, JK, D and T latches/flip-flops (storage); counters (ripple, synchronous, ring, Johnson); shift registers (SISO, SIPO, PISO, PIPO, universal); and finite state machines built from flip-flops plus next-state combinational logic. All of them share the idea of feedback: the stored state is fed back into the input logic.


Solved Q12 (2023-24 — 7 Marks | Positive-Edge D FF)

Q: Explain positive edge triggered D-flip-flop with the help of circuit diagram and waveforms.

Solution:

  1. Circuit: master D latch (clock inverter at its enable) followed by slave D latch; master enabled low, slave enabled high.
  2. CLK = 0: master transparent, output follows D; slave disabled, Q held.
  3. Rising edge: master disables and traps the value of D at that instant; slave enables and transfers that trapped value to Q.
  4. CLK = 1: master held, slave transparent to a stable master output — Q stays constant even if D changes.
  5. Waveform: draw D changing between edges, and Q updating only at each rising edge.
  6. Characteristic equation: Q(t+1)=DQ(t+1)=D sampled at the rising edge.
  7. Benefit: no forbidden input and no race-around; this is the standard cell in registers and FSMs.

Practice Questions (Self-Test)

  1. (2 Marks) Differentiate between Moore machine and Mealy machine with one application each.
  2. (2 Marks) What is race around condition and how is it avoided in master–slave JK?
  3. (7 Marks) Convert a D flip-flop into a T flip-flop and verify with the characteristic tables.
  4. (7 Marks) Design a 4-bit synchronous down counter and write the toggle equations.
  5. (7 Marks) Draw a 4-bit SISO shift register and explain how a serial word is converted to parallel form.
  6. (7 Marks) For a sequence detector that outputs 1 when 101 has been received, draw Mealy and Moore state diagrams and state which uses fewer states.