Sequential Circuit Design: State Tables, State Diagrams & Next-State Logic

Digital circuits can be divided into two broad categories: combinational circuits and sequential circuits.

Combinational circuits such as adders, multiplexers and decoders produce outputs based primarily on their present inputs. Sequential circuits are different: they have memory. Their behavior depends not only on the current inputs but also on the circuit’s previous state.

Sequential circuit design with state transitions and digital logic

This ability to remember previous conditions is what allows digital systems to perform tasks such as:

  • following a sequence of operations,
  • controlling processors,
  • detecting patterns,
  • generating timing sequences,
  • managing communication protocols,
  • controlling machines and embedded systems.

A sequential circuit can be viewed as a system that repeatedly performs three fundamental operations:Read InputsDetermine Next StateStore State\boxed{\text{Read Inputs}\rightarrow\text{Determine Next State}\rightarrow\text{Store State}}

In this article, we will learn how sequential circuits are designed systematically using state variables, state tables, state diagrams, next-state equations, output equations, flip-flops, state assignment, and state reduction.


Table of Contents

1. What Is a Sequential Circuit?

A sequential circuit is a digital circuit whose output depends on:

  1. the present input, and
  2. the present state stored in memory.

Mathematically:Qnext=F(Q,X)\boxed{Q_{next}=F(Q,X)}

and:Y=G(Q,X)\boxed{Y=G(Q,X)}

where:

  • QQ = present state
  • QnextQ_{next} = next state
  • XX = input
  • YY = output

The stored state is generally implemented using flip-flops.


2. Combinational vs Sequential Circuits

Understanding this difference is essential.

FeatureCombinational CircuitSequential Circuit
MemoryNoYes
Depends on previous stateNoYes
Main elementsLogic gatesLogic gates + flip-flops
ClockUsually not requiredCommonly used
ExamplesAdder, MUX, DecoderCounter, Register, FSM

For a combinational circuit:Y=F(X)\boxed{Y=F(X)}

For a sequential circuit:Y=F(X,Q)\boxed{Y=F(X,Q)}

That additional state variable QQ is what gives the sequential circuit memory.


3. Basic Structure of a Synchronous Sequential Circuit

A typical synchronous sequential circuit contains three major components:

                 ┌────────────────────┐
Inputs ─────────►│  Next-State Logic  │──────┐
                 └────────────────────┘      │
                           ▲                  ▼
                           │             ┌─────────┐
                           │             │ Flip-   │
                           └─────────────│ Flops   │
                                         └────┬────┘
                                              │
                                              ▼
                                         Present State
                                              │
                                              └──────────► Output Logic

The basic operation is:Inputs + Present StateNext-State LogicFlip-FlopsNext State\boxed{ \text{Inputs + Present State} \rightarrow \text{Next-State Logic} \rightarrow \text{Flip-Flops} \rightarrow \text{Next State} }

The clock determines when the new state is stored.


4. What Is a State?

A state represents the information currently stored in the sequential circuit.

Suppose a system has two state bits:Q1Q0Q_1Q_0

There are:22=42^2=4

possible states:00,01,10,1100,\quad01,\quad10,\quad11

For three state bits:23=82^3=8

possible states exist.

Therefore, with nn flip-flops:Nstates=2n\boxed{N_{states}=2^n}


5. Present State and Next State

Two terms appear constantly in sequential-circuit design.

Present State

The state currently stored in the flip-flops.

It is commonly written as:QQ

Next State

The state that will be stored after the next active clock edge.

It is commonly written as:QnextQ_{next}

Therefore:QQnext\boxed{Q\rightarrow Q_{next}}

represents a state transition.


6. State Transition

A sequential circuit continuously moves from one state to another.

For example:000100\rightarrow01011001\rightarrow10101110\rightarrow11110011\rightarrow00

This sequence could represent a simple modulo-4 counter.

The important point is that the circuit’s behavior can be described entirely in terms of state transitions.


7. What Is a State Table?

A state table provides a tabular representation of the behavior of a sequential circuit.

A typical state table contains:

  • Present state
  • Input
  • Next state
  • Output

A generic format is:

Present StateInputNext StateOutput
QQXXQnextQ_{next}YY

For a circuit with multiple state bits:

Q1Q0Q_1Q_0XQ1+Q0+Q_1^+Q_0^+Y

where Q+Q^+ means the next state.


8. Example of a State Table

Consider a system with two state bits and no external input.

Suppose its sequence is:000110110000\rightarrow01\rightarrow10\rightarrow11\rightarrow00

The state table is:

Present StateNext State
0001
0110
1011
1100

This table completely describes the required state sequence.


9. What Is a State Diagram?

A state diagram represents the same information graphically.

Each state is represented by a circle, while an arrow represents a transition.

Conceptually:

      ┌─────┐
      │ 00  │
      └──┬──┘
         │
         ▼
      ┌─────┐
      │ 01  │
      └──┬──┘
         │
         ▼
      ┌─────┐
      │ 10  │
      └──┬──┘
         │
         ▼
      ┌─────┐
      │ 11  │
      └──┬──┘
         │
         └────────► 00

The state diagram is particularly useful because it allows the designer to visualize the behavior of the system before implementing the logic.


10. State Diagram vs State Table

These are two different representations of the same sequential behavior.

State DiagramState Table
GraphicalTabular
States shown as circlesStates shown as rows
Transitions shown as arrowsTransitions shown as next-state entries
Easy to visualizeEasy to derive equations

A professional sequential-circuit design often moves through:SpecificationState DiagramState TableLogic EquationsCircuit\boxed{ \text{Specification} \rightarrow \text{State Diagram} \rightarrow \text{State Table} \rightarrow \text{Logic Equations} \rightarrow \text{Circuit} }


11. State Equations

Once the state table is known, Boolean equations can be derived for each next-state variable.

Suppose a circuit has:Q1, Q0Q_1,\ Q_0

Then we need two next-state equations:Q1+=F1(Q1,Q0,X)\boxed{Q_1^+=F_1(Q_1,Q_0,X)}

and:Q0+=F0(Q1,Q0,X)\boxed{Q_0^+=F_0(Q_1,Q_0,X)}

These equations determine what values must be loaded into the flip-flops at the next clock edge.


12. Example: Deriving a Next-State Equation

Suppose a state sequence is:000100\rightarrow01011001\rightarrow10101110\rightarrow11110011\rightarrow00

The least significant bit follows:010\rightarrow1101\rightarrow0010\rightarrow1101\rightarrow0

Therefore:Q0+=Q0Q_0^+=\overline{Q_0}

The lower bit toggles every clock cycle.

The higher bit toggles according to:Q1+=Q1Q0Q_1^+=Q_1\oplus Q_0

This produces the required binary counting sequence.


13. State Assignment

A real circuit cannot directly implement abstract names such as:

IDLE
WAIT
RUN
STOP

These states must be represented using binary values.

This process is called state assignment.

For example:

StateBinary Assignment
IDLE00
WAIT01
RUN10
STOP11

The chosen binary encoding affects the resulting logic complexity.


14. Number of Flip-Flops Required

If a sequential system contains NN states, the number of binary storage elements required is:n=log2N\boxed{n=\lceil\log_2N\rceil}

For example, a system with six states requires:n=log26n=\lceil\log_2 6\rceil

Since:22=4<62^2=4<6

and:23=862^3=8\geq6

we need:3 flip-flops\boxed{3\text{ flip-flops}}


15. State Reduction

Sometimes a state diagram contains states that produce identical behavior and can therefore be combined.

This process is called state reduction or state minimization.

The purpose is to reduce:

  • the number of states,
  • the number of flip-flops,
  • and potentially the amount of combinational logic.

Fewer states can lead to a simpler implementation.

However, the reduction must preserve the external behavior of the original system.


16. Moore Machine

A Moore machine is a finite-state machine in which the output depends only on the present state.

Therefore:Y=G(Q)\boxed{Y=G(Q)}

The input does not directly determine the output.

Conceptually:

Input ─────► Next-State Logic ─────► Flip-Flops
                                      │
                                      ▼
                                    State
                                      │
                                      ▼
                                 Output Logic
                                      │
                                      ▼
                                    Output

The output is associated with the state.


17. Moore State Representation

A Moore state is commonly represented as:State / Output\boxed{\text{State / Output}}

For example:

┌─────────┐
│ S0 / 0  │
└─────────┘

means that whenever the machine is in state S0S0:Y=0Y=0

The output changes when the machine changes state.


18. Mealy Machine

A Mealy machine is different.

Its output depends on:

  • present state, and
  • present input.

Therefore:Y=G(Q,X)\boxed{Y=G(Q,X)}

A conceptual structure is:

                 ┌───────────────┐
Input ──────────►│ Output Logic  │────► Output
       │         └───────────────┘
       │
       ▼
 Next-State Logic ───► Flip-Flops
                            │
                            ▼
                         State

19. Moore vs Mealy

FeatureMooreMealy
Output depends onStateState + Input
Output equationY=G(Q)Y=G(Q)Y=G(Q,X)Y=G(Q,X)
Output associated withStatesTransitions
Response to inputUsually state-change dependentCan respond within current state
Typical designMore state-orientedOften fewer states

Neither model is universally “better.” The appropriate choice depends on the required behavior, timing, and implementation.


20. State Diagram Notation

For a Moore machine, states commonly contain the output:

┌─────────┐
│ S0 / 0  │
└─────────┘

For a Mealy machine, transitions commonly contain:

input / output

For example:

S0 ─── 1/0 ───► S1

meaning:X=1Y=0X=1\rightarrow Y=0

while transitioning from S0S0 to S1S1.


21. Sequential Circuit Design Procedure

A systematic design procedure is extremely useful.

Step 1 — Understand the specification

Determine:

  • Inputs
  • Outputs
  • Required sequence
  • Reset behavior
  • Clock behavior

Step 2 — Identify the states

Determine what information the system needs to remember.

Step 3 — Draw the state diagram

Represent each state and transition.

Step 4 — Create the state table

List:Present StateInputNext StateOutput\text{Present State} \rightarrow \text{Input} \rightarrow \text{Next State} \rightarrow \text{Output}

Step 5 — Assign binary values

Encode each state.

Step 6 — Select flip-flops

Choose D, JK, T, or another appropriate storage element.

Step 7 — Derive excitation equations

Determine the required flip-flop inputs.

Step 8 — Simplify the logic

Use Boolean algebra or Karnaugh maps.

Step 9 — Implement the circuit

Connect the combinational logic and flip-flops.

Step 10 — Verify every state

Check both valid and unused states.


22. Example: Simple Two-State Controller

Consider a system with two states:S0S_0

and:S1S_1

Suppose an input XX determines whether the system changes state.

The required behavior is:S0, X=0S0S_0,\ X=0\rightarrow S_0S0, X=1S1S_0,\ X=1\rightarrow S_1S1, X=0S0S_1,\ X=0\rightarrow S_0S1, X=1S1S_1,\ X=1\rightarrow S_1

Assign:S0=0S_0=0S1=1S_1=1

The state table becomes:

Present State QQXNext State Q+Q^+
000
011
100
111

From the table:Q+=XQ^+=X

Therefore, using a D flip-flop:D=X\boxed{D=X}

This is a simple example of how a behavioral specification becomes hardware logic.


23. Using D Flip-Flops in Sequential Design

D flip-flops are particularly convenient because:D=Q+\boxed{D=Q^+}

For every state bit:D0=Q0+D_0=Q_0^+D1=Q1+D_1=Q_1^+D2=Q2+D_2=Q_2^+

and so on.

Therefore, once the next-state equations have been derived, they can be connected directly to the D inputs.


24. Using JK Flip-Flops

For a JK flip-flop:

QQ+Q^+JK
000X
011X
10X1
11X0

The excitation table is used to determine the required JJ and KK inputs for each state transition.

This is particularly useful in counter and control-circuit design.


25. Using T Flip-Flops

For a T flip-flop:T=QQ+\boxed{T=Q\oplus Q^+}

This provides a direct method of determining the required toggle input.

If:Q=Q+Q=Q^+

then:T=0T=0

The flip-flop holds its state.

If:QQ+Q\neq Q^+

then:T=1T=1

The flip-flop toggles.


26. Karnaugh Maps in Sequential Design

After constructing the state table, the required flip-flop inputs can be simplified using Karnaugh maps (K-maps).

For example, if the circuit has:Q1, Q0, XQ_1,\ Q_0,\ X

then the next-state equation can be expressed as:Q1+=F(Q1,Q0,X)Q_1^+=F(Q_1,Q_0,X)

A K-map can then be used to minimize the Boolean expression.

This can reduce:

  • gate count,
  • propagation delay,
  • hardware complexity.

27. Unused States

If a circuit has:nn

flip-flops, it can represent:2n2^n

states.

But the design may require fewer than that.

For example, six states require three flip-flops:23=82^3=8

Therefore two states are unused.

A professional design should determine what happens if the circuit accidentally enters an unused state.

Possible strategies include:

  • directing unused states to a valid state,
  • using don’t-care conditions when appropriate,
  • designing a self-correcting state machine.

28. Reset State

Most practical sequential circuits require a known starting state.

Suppose the system must begin in:S0S_0

The reset mechanism should force the corresponding flip-flop values.

For example, if:S0=00S_0=00

then reset should establish:Q1=0Q_1=0

and:Q0=0Q_0=0

This prevents unpredictable startup behavior.


29. Synchronous vs Asynchronous Reset

A reset can generally be implemented as either synchronous or asynchronous.

Synchronous Reset

The reset is recognized in relation to the active clock edge.

Asynchronous Reset

The reset can change the flip-flop state independently of the clock.

The choice depends on the architecture and timing requirements.


30. Timing in Sequential Circuits

A sequential circuit must satisfy timing constraints.

For a typical synchronous path:TCLKtCQ+tlogic+tsetup\boxed{ T_{CLK} \geq t_{CQ} + t_{logic} + t_{setup} }

where:

  • tCQt_{CQ} = clock-to-Q delay
  • tlogict_{logic} = combinational logic delay
  • tsetupt_{setup} = setup time

Real designs also account for:

  • hold time,
  • clock skew,
  • clock jitter,
  • routing delay,
  • timing margins.

31. Why the Clock Matters

The clock establishes when the state is updated.

Suppose the state currently is:Q=01Q=01

The next-state logic may calculate:Q+=10Q^+=10

But the flip-flops do not normally store that new state continuously.

At the appropriate clock edge:011001\rightarrow10

The clock therefore provides synchronization across the sequential system.


32. State Machine Example: Sequence Detection

One important application of sequential-circuit design is sequence detection.

Suppose a digital system must detect:101101

in a serial input stream.

The circuit needs to remember how much of the desired pattern has already been observed.

For example:

No match
   ↓
Received 1
   ↓
Received 10
   ↓
Received 101
   ↓
Detected

The memory required to track these conditions is implemented using flip-flops.

This is a classic application of finite-state-machine design.


33. Why State Machines Are Important

Finite-state machines are used throughout digital systems.

Examples include:

  • Traffic-light controllers
  • Vending machines
  • Elevator controllers
  • Communication protocols
  • CPU control units
  • Serial-data detectors
  • Washing-machine controllers
  • Embedded-system control logic

Whenever a system must respond differently depending on what happened previously, a state machine is a natural solution.


34. State Machine as a Digital Decision System

A useful mental model is:Input+Previous StateDecisionNext State\boxed{ \text{Input} + \text{Previous State} \rightarrow \text{Decision} \rightarrow \text{Next State} }

This is what separates a state machine from a simple combinational circuit.

The circuit has a history.


35. Design Verification

After designing the logic, do not stop at obtaining Boolean equations.

Verify:

Every intended state

Check every valid state transition.

Every input combination

Ensure the system responds correctly to all relevant inputs.

Reset behavior

Confirm that the machine reaches its intended initial state.

Unused states

Determine whether the system can recover safely.

Timing

Verify that setup, hold, clock-to-Q and combinational delays meet the required constraints.

This verification step is essential in practical digital design.


36. Common Mistakes

Mistake 1 — Confusing present state with next state

The present state is what is currently stored.

The next state is what will be stored after the appropriate clock event.


Mistake 2 — Forgetting the input in a Mealy machine

For a Mealy machine:Y=G(Q,X)\boxed{Y=G(Q,X)}

not simply:Y=G(Q)Y=G(Q)


Mistake 3 — Treating every state as a separate flip-flop

States are encoded using binary state variables.

For NN states, binary encoding generally requires:log2N\boxed{\lceil\log_2N\rceil}

flip-flops.


Mistake 4 — Ignoring unused states

Unused states must be considered during robust sequential-circuit design.


Mistake 5 — Designing the logic before defining the behavior

A professional design normally starts with the required behavior:SpecificationStatesState TableEquationsCircuit\boxed{ \text{Specification} \rightarrow \text{States} \rightarrow \text{State Table} \rightarrow \text{Equations} \rightarrow \text{Circuit} }

not the other way around.


37. Complete Sequential Design Workflow

The complete process can be summarized as:

SYSTEM REQUIREMENT
        ↓
IDENTIFY INPUTS & OUTPUTS
        ↓
DEFINE STATES
        ↓
STATE DIAGRAM
        ↓
STATE TABLE
        ↓
STATE ASSIGNMENT
        ↓
SELECT FLIP-FLOPS
        ↓
EXCITATION TABLE
        ↓
BOOLEAN EQUATIONS
        ↓
K-MAP / LOGIC SIMPLIFICATION
        ↓
CIRCUIT IMPLEMENTATION
        ↓
TIMING ANALYSIS
        ↓
VERIFICATION

This workflow is one of the most important design processes in sequential digital electronics.


38. Key Equations

General Next-State Equation

Q+=F(Q,X)\boxed{Q^+=F(Q,X)}

Moore Output

Y=G(Q)\boxed{Y=G(Q)}

Mealy Output

Y=G(Q,X)\boxed{Y=G(Q,X)}

Number of States

N=2n\boxed{N=2^n}

Required Flip-Flops

n=log2N\boxed{n=\lceil\log_2N\rceil}

D Flip-Flop

D=Q+\boxed{D=Q^+}

T Flip-Flop

T=QQ+\boxed{T=Q\oplus Q^+}

JK Flip-Flop

Q+=JQ+KQ\boxed{Q^+=J\overline Q+\overline KQ}

Typical Synchronous Timing Constraint

TCLKtCQ+tlogic+tsetup\boxed{ T_{CLK}\geq t_{CQ}+t_{logic}+t_{setup} }


39. Quick Revision

Before moving forward, make sure you can answer these questions:

What is a sequential circuit?

A circuit whose behavior depends on present inputs and stored state.

What is a state?

The information currently stored by the sequential system.

What is a state table?

A tabular representation of present state, inputs, next state and outputs.

What is a state diagram?

A graphical representation of states and transitions.

What is state assignment?

Assigning binary codes to the abstract states.

What is a Moore machine?

A machine whose output depends only on its present state.

What is a Mealy machine?

A machine whose output depends on present state and input.

How many flip-flops are needed for NN states?log2N\boxed{\lceil\log_2N\rceil}


Conclusion

Sequential-circuit design is where digital electronics moves from individual logic components to systems that can remember, react, and control operations over time.

The key concept is the relationship:Present State + InputNext State\boxed{ \text{Present State + Input} \rightarrow \text{Next State} }

Flip-flops provide the memory, combinational logic determines the next state, and the clock coordinates state transitions.

Once you understand how to move from a specification → state diagram → state table → state equations → flip-flop implementation, you have the fundamental methodology needed to design practical digital controllers.

The next step is to go deeper into Finite State Machines (FSMs), where these concepts are applied to Moore and Mealy machines, sequence detectors, state minimization, overlapping/non-overlapping sequences, and real control-system examples.

Share your love
abrarhasnath2004@gmail.com
abrarhasnath2004@gmail.com
Articles: 24

Leave a Reply

Your email address will not be published. Required fields are marked *