Digital Electronics / Sequential Circuits

Sequential Circuits

Learn how digital circuits remember information, how latches and flip-flops store bits, and why clock timing turns logic into counters, registers, and finite-state machines.

Introduction

A sequential circuit is a digital circuit whose output depends on present inputs and past history. This history is stored in memory elements such as latches and flip-flops.

Sequential logic is important because real digital systems must remember counts, states, instructions, addresses, flags, and previous decisions.

Why This Topic Matters

  • Industry relevance: processors, registers, counters, memory controllers, communication interfaces, and FSMs are built from sequential logic.
  • Timing relevance: setup time, hold time, clock edge, and propagation delay decide whether digital hardware works reliably.
  • Exam relevance: GATE and PSU questions often test flip-flop truth tables, excitation tables, characteristic equations, and state transitions.
  • Interview relevance: candidates are expected to explain why memory is needed and how clocked storage prevents uncontrolled changes.

Prerequisites

  • Logic gates and Boolean algebra
  • Combinational circuits
  • Basic feedback idea
  • Clock signal and timing diagram basics
  • Truth table interpretation
  • Binary states 0 and 1

Basic Intuition

A combinational circuit is like a calculator with no memory. A sequential circuit is like a notebook: it can remember what happened earlier and use that stored information for the next output.

Sequential logic answers: "What should the output be now, considering what the circuit remembered before?"

Core Theory Explanation

1. Memory Through Feedback

Sequential circuits store data by feeding output information back into the circuit. This feedback creates stable states, so a bit can remain stored even after the input changes.

2. Latches

A latch is level-sensitive. It can respond while an enable signal is active. SR and D latches are basic storage elements, but uncontrolled level sensitivity can cause timing problems.

3. Flip-Flops

A flip-flop is edge-triggered. It samples input only at a clock edge. This makes system behavior predictable because many storage elements update together at controlled instants.

4. State

The stored value is called the present state. After the next clock edge, the circuit moves to a next state based on inputs and current state.

Step-by-Step Mathematical Derivation

1. D Flip-Flop

A D flip-flop copies input D to output Q only at the active clock edge.

$$ Q_{n+1} = D $$

Physical meaning: the next stored bit equals the data bit sampled at the clock edge.

2. T Flip-Flop

A T flip-flop holds when T is 0 and toggles when T is 1.

$$ Q_{n+1} = T \oplus Q_n $$

Physical meaning: T controls whether the stored bit should remain same or change to its complement.

3. JK Flip-Flop

JK flip-flop improves SR behavior by allowing the 11 input condition to toggle instead of becoming invalid.

$$ Q_{n+1}=JQ_n' + K'Q_n $$

Working Principle

  1. Inputs and present state are applied to the sequential circuit.
  2. Combinational logic decides the next-state value.
  3. The clock edge arrives.
  4. Flip-flops sample and store the next-state value.
  5. The stored value becomes the new present state.
  6. Outputs are generated from present state, inputs, or both depending on circuit type.

Diagram Explanation

Animated working: D flip-flop stores a bit on clock edgeUnlike combinational logic, output depends on present input plus stored state.DCLKD FFsamples D at clock edgeQFunction: next state follows D only at the active clock edge.
SR Latch Circuit Diagram Here
D Flip-Flop Timing Diagram Here
JK Flip-Flop State Diagram Here
Sequential Circuit Block Diagram Here

Important Formulas

D flip-flop

$$ Q_{n+1}=D $$

The next stored bit is simply the input sampled at the active clock edge.

T flip-flop

$$ Q_{n+1}=T\oplus Q_n $$

If T is 0, output holds. If T is 1, output toggles.

JK flip-flop

$$ Q_{n+1}=JQ_n' + K'Q_n $$

J sets, K resets, and J=K=1 toggles the state.

Setup condition

$$ t_{clk} \ge t_{pd}+t_{setup}+t_{skew} $$

Clock period must be long enough for data to travel and settle before sampling.

Real-World Applications

  • Registers inside processors
  • Counters and timers
  • Finite-state machines in controllers
  • Memory elements and data buffers
  • Serial communication shift logic
  • Clocked control units in digital ICs
  • Debouncing and synchronization circuits
  • Pipeline registers in high-speed CPUs

Solved Examples

Beginner Example

A D flip-flop has $$ D=1 $$ at the active clock edge. Find next state.

Using $$ Q_{n+1}=D $$, next state is $$ 1 $$.

Intermediate Numerical

A T flip-flop has $$ Q_n=0 $$ and $$ T=1 $$. Find $$ Q_{n+1} $$.

$$ Q_{n+1}=T\oplus Q_n=1\oplus0=1 $$.

Advanced Problem

For a JK flip-flop with $$ J=1, K=1, Q_n=1 $$, find next state.

When J=K=1, JK flip-flop toggles, so $$ Q_{n+1}=0 $$.

Common Mistakes

  • Confusing latch level sensitivity with flip-flop edge triggering.
  • Forgetting that sequential output depends on previous state.
  • Using D flip-flop equation for JK or T flip-flop questions.
  • Ignoring setup and hold time in timing problems.
  • Thinking clock changes data; clock only controls when data is sampled.
  • Missing the invalid condition in basic SR latch analysis.

Comparison Tables

ElementControlKey BehaviorUse
LatchLevelTransparent when enabledBasic storage
D FFClock edgeStores DRegisters
T FFClock edgeToggles when T=1Counters
JK FFClock edgeSet, reset, hold, toggleGeneral sequential logic

Interview Questions

  • What is the main difference between combinational and sequential circuits?
  • Why does a flip-flop need a clock?
  • What is setup time and hold time?
  • Why is SR latch invalid for S=R=1?
  • How does JK flip-flop remove the invalid condition?
  • Why are D flip-flops widely used in registers?
  • What does present state and next state mean?

Exam-Oriented Notes

  • D flip-flop is easiest: next state equals D.
  • T flip-flop toggles only when T=1.
  • JK flip-flop toggles when J=K=1.
  • Always identify whether the circuit is latch-based or flip-flop-based.
  • For state tables, write present state, input, next state, and output separately.

Revision Summary

  • Sequential circuits have memory.
  • Output depends on present input and past state.
  • Latches are level-sensitive; flip-flops are edge-triggered.
  • D flip-flop stores data; T flip-flop toggles; JK can set, reset, hold, or toggle.
  • Important equations: $$ Q_{n+1}=D $$, $$ Q_{n+1}=T\oplus Q_n $$, $$ Q_{n+1}=JQ_n'+K'Q_n $$.

Practice Questions

Conceptual

  • Explain why sequential circuits require memory.
  • Differentiate latch and flip-flop with timing behavior.
  • Why is clock synchronization important?

Numerical

  • Find $$ Q_{n+1} $$ for D=0.
  • Find $$ Q_{n+1} $$ for T=1 and $$ Q_n=1 $$.
  • Find JK next state for J=0, K=1, $$ Q_n=1 $$.

MCQs

  • Which device is edge-triggered: latch or flip-flop?
  • Which flip-flop is commonly used in registers?
  • Which flip-flop toggles when input T is 1?