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:
- Four characteristic equations: SR , D , JK , T ; derive each from the excitation table, not from memory alone.
- Race-around: occurs in a level-triggered JK latch when and the clock pulse is wider than the propagation delay — toggles repeatedly. Cure: master–slave or positive/negative edge triggering.
- Synchronous counter: , , , ; all FFs share one clock, so no ripple delay accumulation.
- Johnson counter: 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.
- Mealy vs Moore: Mealy output (faster, fewer states, glitches possible); Moore output (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 | Action | |
|---|---|---|---|
| 0 | 0 | Hold (no change) | |
| 0 | 1 | 0 | Reset |
| 1 | 0 | 1 | Set |
| 1 | 1 | ? | Forbidden / indeterminate |
Characteristic equation: , valid only with the constraint . The forbidden condition is the main disadvantage of SR; JK removes it by letting and .
1.3 JK Flip-Flop
| J | K | 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 |
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 in a level-triggered JK latch and the pulse width exceeds the propagation delay , keeps toggling and the final state is unpredictable. Remedies: (i) master–slave connection, (ii) edge triggering, (iii) .
1.4 D and T Flip-Flops
- D flip-flop: ; 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: ; with it toggles every clock, with it holds. Obtained from JK by tying , or from D by .
| Conversion | Excitation logic | Reason |
|---|---|---|
| JK → T | JK toggles when both inputs are 1 | |
| D → T | D must be complement of present state when | |
| JK → D | , | Set when D=1, reset when D=0 |
| SR → D | , | Same mapping, with 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 |
|---|---|---|---|
| CLK = 0 | Transparent, follows | Holds | Old value |
| CLK rises 0→1 | Closes, captures | Opens, takes master value | Updates to captured |
| CLK = 1 | Holds | Transparent to master (stable) | Stable |
| CLK falls 1→0 | Opens again | Closes | Stable |
Waveform rule: follows only at the instant of the rising edge; changes in 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 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 or 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: | Single for all stages |
| Decoding glitches | Possible due to skewed transitions | Absent |
| Design complexity | Simple (just connect 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 ) flip-flops. The least significant bit toggles every clock; higher bits toggle when all lower bits are 1:
| Clock pulse | ||||
|---|---|---|---|---|
| 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 . A down counter uses complements: , .
3.3 Ring Counter and Johnson Counter
Ring counter: an -bit shift register with fed back to the serial input, initially loaded with a single 1. For 3 bits: 100→010→001→100. One-hot outputs, states, simple decoding, but poor utilisation ( states unused).
Johnson (twisted-ring) counter: 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 | ||
| States for bits | ||
| 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 clocks |
| SIPO | Serial | Parallel from all s | After 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 :
| Mode | Mux input for stage | |
|---|---|---|
| 00 | Hold | |
| 01 | Shift right | (serial input at MSB) |
| 10 | Shift left | (serial input at LSB) |
| 11 | Parallel load | External |
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
- Write the specification and draw a state diagram (circles = states, arcs = input/output).
- Encode states with flip-flops.
- Build the state table (present state, input, next state, output).
- Choose FF type (D is simplest: ; JK needs excitation table).
- Minimise each next-state/output function with K-maps.
- 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: "
- 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:
- SR: inputs S (set) and R (reset). Truth rows: 00 hold, 01 reset, 10 set, 11 forbidden. Characteristic equation with .
- Defect of SR: the forbidden input combination makes the next state unpredictable; also a level-sensitive SR latch is transparent.
- JK: adds feedback so that means toggle instead of forbidden. Truth rows: 00 hold, 01 reset, 10 set, 11 toggle. Characteristic equation .
- Race-around: in a level-triggered JK with , can toggle several times during one wide clock pulse; cured by master–slave connection.
- D: single data input; . The D input is sampled at the active clock edge, so it eliminates both the forbidden state and transparency.
- 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:
Solution:
- Start from the JK next-state equation for the output: .
- Take the complement: .
- Apply De Morgan: .
- Expand: since .
- Remove the consensus term : if , already covers it; if , covers it. Hence the minimal form is
- Note on the printed statement: the paper prints . Substituting , into that expression gives 1, but the JK truth table gives , so its complement must be 1 — that single case is consistent; however the accepted standard JK complement equation derived from the truth table is . Write the derived equation and, if desired, mention that the overbar belongs on in the standard form.
- Truth-table check of derived form: → → ✓; → both terms 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:
- JK characteristic table: 00→hold, 01→reset, 10→set, 11→toggle (full table in Section 1.3).
- Characteristic equation: .
- Target T behaviour: hold, toggle; equation .
- Conversion: compare the two equations. Setting and makes , so — identical to T.
- Circuit: connect the single T input to both J and K of the JK flip-flop; use a common clock.
- Verification: → → hold ✓; → → toggle ✓.
- 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 and the clock stays high longer than the propagation delay . Because the feedback outputs change while the master latch is still enabled, toggles repeatedly and ends in an uncertain state. It is eliminated by master–slave JK, by edge triggering, or by ensuring clock pulse width .
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:
- Difference: asynchronous (ripple) clocks stages sequentially, giving cumulative delay and decoding glitches; synchronous clocks all FFs together, giving one and clean outputs (table in Section 3.1).
- Block: four T FFs (LSB) to (MSB), all driven by the same clock.
- Input logic: , , , — each bit toggles only when every lower bit is 1.
- Sequence: 0000→0001→0010→0011→0100→0101→0110→0111→1000→…→1111→0000; modulus 16.
- Timing diagram: draw dividing clock by 2, by 2, by 4 and by 8, all transitions aligned at the same clock edge.
- 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:
- Choose three JK flip-flops with common clock; set .
- Derive toggle conditions from the count sequence: toggles every pulse → ; toggles when → ; toggles when → .
- Sketch: three JK blocks stacked, common clock line, one AND gate feeding , wired to .
- State sequence: 000,001,010,011,100,101,110,111,000 (mod-8 up counter).
- Check at 011: ? Wait , so — at the next edge 011 becomes 100 ✓.
- Down-counter variant: replace by 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:
- Circuit: three D flip-flops in a shift chain; , , ; common clock; reset clears to 000.
- State progression: 000 → 100 → 110 → 111 → 011 → 001 → 000 (six unique states, modulus 6).
- Waveform: tabulated in Section 3.3; each stays high for three clocks and low for three clocks, with successive outputs delayed by one clock.
- 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 to a 3-to-8 decoder yields six non-overlapping phase pulses.
- Application: LED chasing/sequencing, stepper-motor phase drive, and division by 6 (output frequency ).
- 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:
- Block: four D flip-flops ; each has a 4:1 mux at its D input; common select lines and common clock.
- Mux inputs: for stage , inputs are (hold), (shift right), (shift left), external (parallel load); boundary stages use serial-in right/left lines.
- Mode table: 00 hold, 01 shift right, 10 shift left, 11 parallel load (Section 4).
- Example: start 0001, mode shift right with serial-in 1 → 1000 → 1100 → 1110 → 1111.
- Neat sketch: draw four FF boxes in a row, muxes above each, arrows between adjacent Q outputs, two shared select lines, one clock line.
- 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:
- Mealy: output ; output may change as soon as input changes, without waiting for the clock edge.
- Moore: output ; output is registered and changes only at clock edges.
- Comparison table: dependence, timing, number of states, glitch risk and speed — see Section 5.1.
- Mealy applications: high-speed sequence detectors (e.g. detect
1101in a serial stream), protocol checkers where immediate response is needed. - Moore applications: traffic-light controllers, vending machines, safe state machines where glitches on outputs could drive actuators.
- 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:
- Circuit: master D latch (clock inverter at its enable) followed by slave D latch; master enabled low, slave enabled high.
- CLK = 0: master transparent, output follows D; slave disabled, Q held.
- Rising edge: master disables and traps the value of D at that instant; slave enables and transfers that trapped value to Q.
- CLK = 1: master held, slave transparent to a stable master output — Q stays constant even if D changes.
- Waveform: draw D changing between edges, and Q updating only at each rising edge.
- Characteristic equation: sampled at the rising edge.
- Benefit: no forbidden input and no race-around; this is the standard cell in registers and FSMs.
Practice Questions (Self-Test)
- (2 Marks) Differentiate between Moore machine and Mealy machine with one application each.
- (2 Marks) What is race around condition and how is it avoided in master–slave JK?
- (7 Marks) Convert a D flip-flop into a T flip-flop and verify with the characteristic tables.
- (7 Marks) Design a 4-bit synchronous down counter and write the toggle equations.
- (7 Marks) Draw a 4-bit SISO shift register and explain how a serial word is converted to parallel form.
- (7 Marks) For a sequence detector that outputs 1 when
101has been received, draw Mealy and Moore state diagrams and state which uses fewer states.