Sequential Logic Circuits: Flip-Flops, Registers, Counters, and Finite State Machines
Combinational vs. Sequential Circuits: Principles and Structural Models
Digital logic circuits are divided into two fundamental classifications: combinational circuits and sequential circuits. Their operational distinction lies in the presence or absence of memory elements and internal feedback.
A combinational circuit produces outputs that are solely a function of its current inputs at any given instant. It possesses no memory of past inputs or historical events. For any specified set of input variables, there is an immediate and unique output pattern, subject only to the physical propagation delays of the internal logic gates. Representative examples of combinational circuits include logic gates, adders, subtractors, multiplexers, demultiplexers, encoders, and decoders.
A sequential circuit produces outputs that depend not only on the present input values but also on the present state of the circuit. The present state is a stored representation of the history of past inputs, retained within internal memory elements. Consequently, applying an identical set of inputs to a sequential circuit at different times can yield entirely different outputs depending on the stored state.

As shown in the block diagram, a sequential circuit consists of combinational logic coupled with a memory section constructed from flip-flops or latches. The combinational logic receives external inputs as well as present-state signals fed back from the flip-flops. It generates the circuit's external outputs and computes the next-state signals required to update the memory elements. A periodic clock signal () synchronizes the updating of these memory elements across the system.
Sequential circuits serve as the foundation of digital computation, enabling counting, timing generation, temporary and bulk data storage, and the execution of finite-state decision logic.
The Set-Reset (SR) Latch and Flip-Flop
Memory cells that store a single binary bit ( or ) are categorized into latches and flip-flops. A latch is a level-sensitive device whose output changes immediately in response to input changes while enabled. A flip-flop is a synchronous, clock-controlled device whose state transitions occur exclusively at specific transitions (rising or falling edges) or active phases of a clock signal.
SR Latch Using Cross-Coupled NOR Gates
The fundamental 1-bit memory cell can be constructed using two cross-coupled NOR gates, designated as NOR 1 and NOR 2. The output of NOR 1 represents the true state (), which is fed back into one of the inputs of NOR 2. The output of NOR 2 represents the complementary state (), which is fed back into one of the inputs of NOR 1.

The external inputs are Set () and Reset (). The circuit exhibits active-high operation:
Operating State | |||
|---|---|---|---|
(hold) | No change (Memory) | ||
Reset | |||
Set | |||
Invalid / Forbidden |
When and , the cross-coupling latches the present state, and the outputs remain fixed. Setting and forces the output to (Set). Setting and forces to (Reset). If both inputs are simultaneously asserted (), both NOR outputs are forced to logic , violating the complementary relationship . Furthermore, if both inputs transition simultaneously from to , the final state becomes indeterminate and unpredictable due to unequal propagation delays through the two gates.
SR Latch Using Cross-Coupled NAND Gates
An alternative implementation utilizes two cross-coupled NAND gates. In this configuration, the control inputs are active-low, commonly denoted as (or ) and (or ).

The behavior of the cross-coupled NAND latch is summarized below:
Operating State | |||
|---|---|---|---|
Invalid / Forbidden | |||
Set | |||
Reset | |||
(hold) | No change (Memory) |
Because the inputs are active-low, asserting (with ) sets the latch to . Asserting (with ) resets the latch to . When and , the latch retains its previous state. The forbidden condition occurs when , which forces both and to logic .
Clocked SR Flip-Flop
To synchronize state updates with a system clock, steering logic is added to the basic latch. In the clocked SR flip-flop, two AND gates precede an internal NOR-based SR latch, with one input of each AND gate tied to a common clock line ().

When , both AND gates output logic , isolating the inputs and from the latch and maintaining the hold condition (). When , the AND gates permit the values of and to pass into the latch.
State | ||||
|---|---|---|---|---|
(hold) | No change (disabled) | |||
(hold) | No change | |||
Reset | ||||
Set | ||||
Invalid | Forbidden () |
Characteristic Equation, Characteristic Table, and Excitation Table
The algebraic relationship describing the next-state behavior of an SR flip-flop is given by its characteristic equation:
This equation is valid strictly under the operational constraint:
The characteristic table lists the next state () for every combination of inputs , , and present state ():
(unspecified) | |||
(unspecified) |
The excitation table specifies the required input combination ( and ) to achieve a desired transition from a known present state () to a designated next state ():
Here, denotes a don't-care condition. For example, to maintain a present state of (), must be , while can be either (hold) or (reset).
Worked Example: State Progression
Consider an SR flip-flop initially at state .
A clock pulse is applied with inputs and :
The flip-flop sets to .
On the subsequent clock pulse, the inputs change to and :
The flip-flop resets back to .
Practical Applications and System Limitations
The SR flip-flop is utilized in specific digital sub-circuits:
Switch Debouncing: Interfacing mechanical switches or pushbuttons produces transient voltage spikes due to contact bounce. An SR latch eliminates these erratic oscillations, yielding clean, single-transition digital pulses.
Control Flags: It serves as a simple latching flag to capture asynchronous status events, remaining set until explicitly cleared by control logic.
Basic Storage Registers: It functions as an elemental 1-bit memory cell.
Foundational Building Block: It constitutes the internal core around which more sophisticated flip-flops are constructed.
The primary limitation of the SR flip-flop is the invalid output state produced when . Circuit designers must introduce external gating or select alternative flip-flop architectures to prevent this condition.
The Universal JK Flip-Flop, Race-Around Condition, and Master-Slave Architecture
The JK flip-flop eliminates the undefined state of the SR flip-flop while retaining its Set, Reset, and Hold functions. It is designated as a universal flip-flop because suitable external connections enable it to emulate SR, D, or T flip-flops.
Logic Implementation and Functional Behavior
The JK flip-flop is constructed by adding feedback from the outputs of an SR latch to its input gating logic. Specifically, the complementary output is routed back into the AND gate associated with input , and the true output is routed back into the AND gate associated with input .

This cross-coupled feedback ensures that when and , only the gate opposite the current state is enabled. Consequently, instead of entering a forbidden state, the flip-flop toggles, inverting its output on every active clock pulse.
State | ||||
|---|---|---|---|---|
(hold) | Disabled (No change) | |||
(hold) | No change | |||
Reset | ||||
Set | ||||
(toggle) | Toggle |
Characteristic and Excitation Analysis
The algebraic characteristic equation of the JK flip-flop is derived using Karnaugh mapping:
The characteristic table defines the full next-state mapping across all input combinations:
The excitation table defines the inputs and required to induce a specified state transition:
The Race-Around Condition
In a level-triggered JK flip-flop, a timing pathology known as the race-around condition occurs when , , and the clock pulse duration () exceeds the internal gate propagation delay () of the flip-flop.

Under these conditions, if the flip-flop starts at , asserting causes the output to switch to after delay . However, because the clock remains high (), this new output feeds back into the gate, causing the circuit to toggle again to after another interval . The output continues oscillating between and at intervals of for the entire duration that :
When the clock signal falls back to , the final state of is indeterminate, depending entirely on the exact ratio of the pulse width to the internal propagation delay.
To prevent the race-around condition:
The clock pulse width must be strictly smaller than the propagation delay (), which is difficult to guarantee across manufacturing and temperature variations.
Edge-triggered flip-flops can be employed, sampling inputs only during the narrow transition threshold of the clock.
A Master-Slave JK architecture can be implemented.
Master-Slave JK Flip-Flop Architecture
A Master-Slave JK flip-flop connects two separate flip-flops in series with complementary clocking:
Master Flip-Flop: A positive-level-triggered JK stage receiving external inputs and , clocked directly by .
Slave Flip-Flop: A negative-level-triggered (or inverted) JK stage whose inputs are driven by the outputs () of the master, clocked by (via an inverter).

During circuit operation:
While , the master is active and responds to inputs and , updating intermediate nodes and . Concurrently, , keeping the slave disabled and isolated, which holds the primary outputs and stable.
While , the master is disabled and isolated from any further input fluctuations. Concurrently, , enabling the slave to copy the states and to the external outputs and .
Because the master and slave are never active simultaneously, the complete circuit responds to inputs during the clock high period but updates its external outputs only when the clock transitions low. This two-phase transfer prevents continuous feedback oscillations and eliminates the race-around condition.
Step-by-Step State Execution Trace
Consider a JK flip-flop starting from an initial state subjected to four successive clock pulses:
Clock Pulse | (before) | Executed Operation | (after) | ||
|---|---|---|---|---|---|
1 | Set | ||||
2 | Toggle | ||||
3 | Reset (no change) | ||||
4 | Toggle |
For Clock Pulse 2 (), applying the characteristic equation yields:
The state flips from to . After four clock pulses, the final state is .
Data (D) and Toggle (T) Flip-Flops
The D and T flip-flops are single-input variations derived by simplifying the SR and JK architectures to serve specific functional roles in digital systems.
D Flip-Flop (Data / Delay Flip-Flop)
The D flip-flop captures and stores the logic level present on its single data input line (). It is constructed by taking a clocked SR flip-flop and placing an inverter between the Set and Reset terminals, enforcing and .

Because the inputs to the internal SR stage are always complementary, the condition is structurally impossible, eliminating the invalid state by design.
State | |||
|---|---|---|---|
Rising edge | Reset | ||
Rising edge | Set | ||
or (no edge) | (no change) | Hold |
The characteristic equation is:
The characteristic table and excitation table are structured as follows:
Characteristic Table: | Excitation Table: | ||||
|---|---|---|---|---|---|
The excitation requirement for a D flip-flop is straightforward: the input must match the desired next state , independent of the present state . Due to its reliable data capture, the D flip-flop is the primary element used in registers, memory arrays, shift registers, and bus synchronizers.
T Flip-Flop (Toggle Flip-Flop)
The T flip-flop has a single input (). It is constructed by tying together the and inputs of a JK flip-flop ().

Tying the inputs together eliminates the independent Set and Reset states, leaving only Hold and Toggle:
State | |||
|---|---|---|---|
Rising edge | (hold) | No change | |
Rising edge | (toggle) | Toggle | |
or (no edge) | (no change) | Hold |
The characteristic equation is expressed using the exclusive-OR () operation:
The characteristic and excitation tables are:
Characteristic Table: | Excitation Table: | ||||
|---|---|---|---|---|---|
The excitation table is symmetric: whenever the state is to be preserved (), and whenever the state is to be inverted. This toggle capability makes the T flip-flop standard in binary counters and frequency division circuits.
Comparative Evaluation of Flip-Flop Architectures

Feature | SR Flip-Flop | D Flip-Flop | JK Flip-Flop | T Flip-Flop |
|---|---|---|---|---|
Data Inputs | ||||
Invalid State Present? | Yes () | No | No | No |
Toggle Capability? | No | No | Yes () | Yes () |
Characteristic Eq. | ||||
Typical Use Cases | Latches, debouncers, status flags | Storage registers, memory, FIFO buffers | General counters, versatile registers | Binary counters, frequency dividers |
Comparative Worked Example: D vs. T Flip-Flop State Traces
Starting from an initial state , both flip-flops are evaluated across four clock cycles with specific input sequences:
For the D Flip-Flop ():
Pulse 1:
Pulse 2:
Pulse 3:
Pulse 4:
For the T Flip-Flop ():
Pulse 1:
Pulse 2:
Pulse 3:
Pulse 4:
Both flip-flops finish with a final state of .
Registers and Data Storage Systems
A register is a group of flip-flops sharing a common clock that stores an -bit binary word as a unified entity. An -bit register uses flip-flops, typically D flip-flops, and provides basic working storage within central processing units, peripheral controllers, and system buses.
Registers fall into two main classes: buffer (storage) registers, which load and hold words in parallel without lateral movement, and shift registers, which move their bits positionally on clock pulses.
4-Bit Parallel-In Parallel-Out (PIPO) Buffer Register
A basic buffer register stores multi-bit data temporarily so it can be sampled or routed asynchronously later. A 4-bit buffer register uses four D flip-flops (FF0 to FF3) sharing a single clock line.

External data lines () connect directly to the respective flip-flop inputs. When an active rising clock edge occurs, each input bit transfers simultaneously into its corresponding flip-flop stage, updating outputs in parallel during a single clock cycle.
(after clock edge) | ||
|---|---|---|
Rising edge | ||
(no active edge) | Any arbitrary word | Unchanged (Retained state) |
Because all bits transfer in parallel, a buffer register executes no internal bit shifting. It isolates internal bus segments, synchronizes data transfers between subsystems operating at different clock rates, and implements processor register files (such as accumulators and general-purpose registers).
Shift Registers: Operational Topologies, Shifting Sequences, and Counters
A shift register is an array of cascaded flip-flops whose outputs feed directly into the inputs of adjacent stages. When clocked, the entire stored binary word moves incrementally by one bit position to the left or right.
Shift registers are categorized by how data enters and exits the array: Serial-In Serial-Out (SISO), Serial-In Parallel-Out (SIPO), Parallel-In Serial-Out (PISO), and Parallel-In Parallel-Out (PIPO).
Serial-In Serial-Out (SISO) Shift Register
In a 4-bit SISO register, four D flip-flops (FF0, FF1, FF2, FF3) are connected in series. The output of each flip-flop drives the data input of the next stage. A single input line feeds FF0, and output data is taken solely from FF3.

Data enters sequentially, one bit per clock cycle, and propagates through the cascade. Loading an -bit word requires clock cycles, and reading it out serially requires another clock cycles. Consequently, a SISO register acts as an -cycle digital delay line.
Shifting Sequence for Word
Loading the word into the register (least significant bit first: , then , then , then ) proceeds as follows:
Clock Pulse | Serial In | FF0 () | FF1 () | FF2 () | FF3 (, Serial Out) |
|---|---|---|---|---|---|
(Initial) | |||||
1 | |||||
2 | |||||
3 | |||||
4 |
After 4 clock pulses, the complete 4-bit word resides within the register ().
Serial-In Parallel-Out (SIPO) Shift Register
A SIPO register receives data serially via a single line but provides parallel access to every flip-flop output (). It converts serial data into parallel words, making it standard in communication receivers (e.g., UART and SPI) to convert bit-serial transmission lines into parallel bus words for processors.
Data shifts into the register over clock pulses. Once loaded, all bits are read simultaneously from the parallel outputs in a single clock cycle ( delay cycles for reading).
Parallel-In Serial-Out (PISO) Shift Register
A PISO register accepts a complete parallel data word along lines and outputs it serially over a single line. Multiplexers precede each flip-flop input, controlled by a shared signal.

When ( active), the multiplexers select parallel inputs . On the next clock edge, the entire word loads into the flip-flops simultaneously (1 clock pulse).
When , the multiplexers switch to select the output of the preceding flip-flop (). Subsequent clock pulses shift the word rightward by one bit per cycle, emerging serially from FF3.
Worked Trace: PISO Serialization
Consider a PISO register loaded with the parallel word :
Step | Register Contents: | Serial Output () |
|---|---|---|
Parallel Load | ||
Pulse 1 | ||
Pulse 2 | ||
Pulse 3 | ||
Pulse 4 |
Each pulse shifts the contents rightward (), filling the most significant bit () with . After 4 clock cycles, the serial output line has produced the bits , and the register is cleared to .
Bidirectional and Universal Shift Registers
A bidirectional shift register can shift stored bits either right or left based on a mode control signal. Gating logic at each flip-flop input selects between the left neighbor's output () to shift right and the right neighbor's output () to shift left. In arithmetic units, shifting left by one bit multiplies an unsigned binary integer by , while shifting right divides it by .
A Universal Shift Register integrates multiple functional modes into a single circuit, typically using 4x1 multiplexers to drive each flip-flop input.

Mode selection is governed by two control lines, and :
Control Line | Control Line | Operating Mode | Multiplexer Selection |
|---|---|---|---|
Hold | Selects flip-flop's own output (), preventing state changes | ||
Shift Right | Selects output of the preceding stage () | ||
Shift Left | Selects output of the subsequent stage () | ||
Parallel Load | Selects external parallel input lines () |
Standard integrated circuits such as the commercial IC 74194 implement this universal shift register architecture.
Shift Register Counters: Ring Counter and Johnson Counter
Connecting the output of the final stage of a shift register back into the input of the first stage forms a circulating shift register counter.
Ring Counter
A ring counter recirculates the true output of the final flip-flop back into the data input of the initial flip-flop ().

The register is initialized with a single logic (e.g., for a 4-bit counter). Clock pulses circulate this isolated around the loop:
Pulse | ||||
|---|---|---|---|---|
(Init) | ||||
1 | ||||
2 | ||||
3 |
An -stage ring counter provides unique states. Because exactly one flip-flop output is active at any point, the state is self-decoding, eliminating the need for an external decoding network to drive sequential timing lines.
Johnson (Twisted-Ring) Counter
A Johnson counter connects the complemented output of the final stage back to the input of the first stage (). Starting from an initialized state of , inverted bits fill and subsequently clear the register:
Pulse | ||||
|---|---|---|---|---|
(Init) | ||||
1 | ||||
2 | ||||
3 | ||||
4 | ||||
5 | ||||
6 | ||||
7 |
An -stage Johnson counter cycles through unique states using flip-flops, doubling the state count of a standard ring counter while requiring simpler decoding logic than binary counters.
Shift Register Performance and Topological Summary
Feature | SISO | SIPO | PISO | PIPO |
|---|---|---|---|---|
Data In Method | Serial | Serial | Parallel | Parallel |
Data Out Method | Serial | Parallel | Serial | Parallel |
Clock Cycles to Load Bits | ||||
Clock Cycles to Read Bits | (instantaneous) | (instantaneous) | ||
Primary Function | Signal delay, data buffer | Serial-to-parallel conversion | Parallel-to-serial conversion | High-speed data storage |
Asynchronous (Ripple) Counters
A counter is a sequential circuit that cycles through a predetermined sequence of states upon the arrival of clock pulses. Counters are classified by their clock distribution into asynchronous (ripple) counters and synchronous counters.
In an asynchronous counter, flip-flops do not share a common clock line. Only the first stage (FF0, Least Significant Bit) receives the external system clock. Each subsequent stage is clocked by the output ( or ) of the preceding flip-flop, causing state changes to ripple sequentially down the chain.
2-Bit Asynchronous UP Counter
A 2-bit ripple UP counter uses two T flip-flops with their inputs tied to logic (), operating in toggle mode.

The external clock drives FF0, causing output to toggle on each active clock edge. Output is routed to the clock input of FF1, which triggers on the falling edge () of . As a result, FF1 toggles at half the frequency of FF0.
Clock Pulse | (MSB) | (LSB) | Decimal Equivalent |
|---|---|---|---|
(Initial) | 0 | ||
1 | 1 | ||
2 | 2 | ||
3 | 3 | ||
4 | 0 (Rollover) |
The counter cycles through binary states ().
4-Bit Asynchronous UP and DOWN Counters
A 4-bit ripple UP counter cascades four T flip-flops (FF0 to FF3), tracking counts from to ( states).

Only FF0 receives the external system clock; each subsequent stage is clocked by the true output () of the preceding stage. Assuming negative edge-triggered flip-flops, when falls from to , stage toggles, producing an upward binary count sequence:
To construct an asynchronous DOWN counter using negative edge-triggered flip-flops, the clock input of each subsequent stage is driven by the complemented output () rather than the true output.

This complementary clock connection reverses the sequence, decrementing the output on each clock pulse:
Count | ||||
|---|---|---|---|---|
15 | ||||
14 | ||||
13 | ||||
12 | ||||
11 | ||||
10 |
The count continues downward () before rolling over to .
Mod-N Asynchronous Counter (Reset Logic Truncation)
A binary counter with flip-flops naturally cycles through states, operating as a Modulo- counter. To design a counter with a non-power-of-two modulus ( where ), reset logic detects state and clears the counter back to zero.
In a MOD-6 counter, flip-flops are required because . The counter must cycle through six states: (decimal to ). Decimal state () is the first invalid state.

A NAND gate monitors outputs and . The instant the counter reaches state (), the NAND gate outputs logic . This active-low signal feeds into the asynchronous CLEAR inputs of all three flip-flops, immediately resetting the counter to .
Sequence Step | Decimal Equivalent | Status | |||
|---|---|---|---|---|---|
0 | 0 | Stable state | |||
1 | 1 | Stable state | |||
2 | 2 | Stable state | |||
3 | 3 | Stable state | |||
4 | 4 | Stable state | |||
5 | 5 | Stable state | |||
6 (Transient) | 6 | Momentary state (triggers NAND to reset counter to ) |
State is a transient state lasting only a few nanoseconds, determined by the propagation delays of the NAND gate and flip-flop clear paths.
Timing Limitations of Asynchronous Counters
While asynchronous counters require minimal gating logic, their cascaded clocking introduces cumulative propagation delay. For an -stage ripple counter where each flip-flop has propagation delay , the total settling time is:
If the clock period () is shorter than , higher-order stages cannot settle before the next clock pulse arrives, causing counting errors. Furthermore, because transitions occur at slightly different times across stages, temporary intermediate states appear on the output bus during state changes, producing glitches in connected decoding logic.
Synchronous Counters
A synchronous counter connects the clock inputs of all flip-flops to a single, common clock line, causing all stages to update simultaneously on each active clock edge.
Because all flip-flops toggle at the same instant, next-state transitions cannot rely on clock ripple. Instead, combinational logic evaluates the present state of the counter to pre-compute whether each flip-flop should hold or toggle on the upcoming clock edge.
2-Bit Synchronous UP Counter
A 2-bit synchronous up counter uses two T flip-flops driven by a shared clock.

Stage 0 toggles on every active clock pulse ().
Stage 1 should toggle only when the lower-order bit is high (), so its input is driven directly by that output: .
Clock Pulse | Decimal Equivalent | ||
|---|---|---|---|
(Initial) | 0 | ||
1 | 1 | ||
2 | 2 | ||
3 | 3 | ||
4 | 0 (Rollover) |
Because both flip-flops are triggered together by , the entire output word transitions simultaneously within a single flip-flop propagation delay ().
4-Bit Synchronous UP Counter Design
A 4-bit synchronous up counter extends this look-ahead gating using JK or T flip-flops.

A binary counter bit must toggle if and only if all preceding lower-order bits are logic . Connecting each stage to an AND gate evaluating all previous stage outputs replicates the binary carry look-ahead condition:
Stage 0:
Stage 1:
Stage 2:
Stage 3:
Because the control inputs are established before the clock edge arrives, all four flip-flops switch concurrently, maintaining a constant propagation delay of a single flip-flop regardless of bit width.
Synchronous Up/Down Counter
A synchronous counter can be configured for bidirectional counting by adding a mode control line () and steering logic (multiplexers or AND-OR configurations) to the flip-flop inputs:
When , the steering logic selects the true outputs (), causing the counter to increment ().
When , the steering logic selects the complemented outputs (), causing the counter to decrement ().
MOD-6 Synchronous Counter Design Example
A synchronous MOD-6 counter cycles through states through and resets upon reaching state ().

Three flip-flops provide natural states ( to ). An AND gate monitors outputs and . When the counter enters state (), the gate asserts the synchronous or asynchronous CLEAR line (), resetting all flip-flops to .
Pulse | State Description | |||
|---|---|---|---|---|
(Init) | Count 0 | |||
1 | Count 1 | |||
2 | Count 2 | |||
3 | Count 3 | |||
4 | Count 4 | |||
5 | Count 5 | |||
6 (Detected) | Detected by AND gate (); resets counter to |
This detect-and-reset methodology generalises to any arbitrary count modulus .
Comparative Evaluation: Asynchronous vs. Synchronous Counters
Operational Parameter | Asynchronous (Ripple) Counter | Synchronous Counter |
|---|---|---|
Clock Distribution | Each stage is clocked by the preceding flip-flop's output | All flip-flops share a single common clock line |
Switching Speed | Slower; cumulative delay increases with bit width () | Faster; fixed single-stage propagation delay () |
Circuit Complexity | Minimal; requires few or no external logic gates | Higher; requires look-ahead AND/OR gating |
Output Glitches | Prone to decoding glitches during rippling transitions | Clean, simultaneous output transitions |
Representative Standard ICs | IC 7493 (4-bit binary ripple counter) | IC 74163, IC 74169 (4-bit synchronous counters) |
Practical Engineering Applications and Finite State Machines (FSMs)
Sequential circuits serve four primary functions across digital systems: counting/timing, data storage/movement, finite-state control, and memory addressing.
Counters: Digital Clocks, Timers, and Frequency Dividers
A binary counter stage toggles at half the frequency of its input clock, functioning as a divide-by-2 frequency divider. Cascading flip-flops divides the input clock frequency by :
Digital clocks leverage this property using cascaded MOD-N counters.

A quartz crystal oscillator generates a stable reference frequency of (). Because , passing this signal through a 15-stage binary counter ( divider) yields an exact (1 pulse per second) timing tick. This signal drives:
A MOD-60 Counter to track seconds ( to ).
A second MOD-60 Counter, pulsed by the rollover of the seconds stage, to track minutes ( to ).
A MOD-24 Counter, pulsed by the rollover of the minutes stage, to track hours ( to ).
The counter outputs drive 7-segment display decoders to render human-readable time.
Shift Registers: Serial Communication (UART) and Buffering
Shift registers form the hardware interface between serial communication channels and parallel computing buses. In a Universal Asynchronous Receiver-Transmitter (UART):

The Transmitter (TX) uses a PISO shift register to parallel-load a byte from the system bus and shift it out bit-by-bit over a single physical line.
The Receiver (RX) uses a SIPO shift register to reconstruct the incoming serial bitstream into an 8-bit parallel byte before transferring it to the processor.
Shift registers also implement First-In, First-Out (FIFO) buffers to reconcile throughput disparities between decoupled subsystems, such as keyboard input buffers, print spoolers, and network packet queues.
Finite State Machines (FSMs)
A Finite State Machine is a sequential circuit that transitions through a finite set of operational states based on clock pulses and external inputs. FSMs are divided into Moore machines (where outputs depend solely on the present state) and Mealy machines (where outputs depend on both the present state and current inputs).
Moore FSM Example: Traffic Light Controller
A traffic light controller uses an internal timer to sequence through three fixed states.

Because outputs depend only on the current state, this is a classic Moore machine:
State | Active Signal Output | Duration () | Next State |
|---|---|---|---|
S0 | Red | S1 | |
S1 | Green | S2 | |
S2 | Yellow | S0 |
An auxiliary timer counts down the duration for each state, asserting a trigger signal upon expiration to advance the state machine to the next phase in a closed cycle ().
Mealy FSM Example: Sequence Detector for Pattern "101"
A sequence detector evaluates an incoming serial bitstream and asserts an output flag whenever a target pattern is identified. In an overlapping "101" Mealy sequence detector, the state definitions are:
S0: Reset state (no bits of the pattern observed).
S1: The most recent bit observed was a logic .
S2: The two most recent bits observed were .

Transitions and outputs are formatted as :
From S0: Input ; Input .
From S1: Input ; Input .
From S2: Input ; Input (pattern "101" recognized).
Transitioning from S2 back to S1 on input allows the trailing to serve as the leading bit of a subsequent overlapping "101" sequence, which is essential for packet framing and protocol parsing.
Vending Machine Controller FSM
A vending machine dispensing a item accepts and coins:
State (Total Accumulated) | Inserted Coin | Next State | Action Taken |
|---|---|---|---|
S0 () | S5 | None | |
S5 () | S10 | None | |
S5 () | S15 | None | |
S15 () | S0 | Dispense item and return excess change |
CPU Control Units and Memory Addressing
A central processing unit's Program Counter (PC) is a specialized synchronous counter that increments sequentially on each instruction cycle to fetch code across memory addresses.
Address sequencing in Direct Memory Access (DMA) controllers and cache-line fill controllers similarly uses hardware counters to stream blocks of data without software intervention.

The processor control unit itself is implemented as a sequential state machine:
Hardwired Control Unit: Implemented as a combinational gate array and state flip-flops, providing high-speed execution at the cost of rigid architectural complexity.
Microprogrammed Control Unit: Stores control words in a dedicated Control Memory (Microcode ROM). A Micro-Program Counter () addresses this ROM, which emits horizontal or vertical control signals to the datapath and Arithmetic Logic Unit (ALU). A next-address field within the microinstruction feeds back to update the , creating a programmable sequential state machine.
Numerical Methods and Circuit Design Practice
Designing synchronous and asynchronous sequential circuits requires determining the necessary number of flip-flops, deriving excitation requirements, and calculating frequency division.
Sizing Rule for Modulo-N Counters
To construct a counter with distinct states, the minimum number of flip-flops () required is governed by the inequality:
Taking the base-2 logarithm:

For a MOD-6 counter (, states to ):
Evaluate (Insufficient capacity).
Evaluate (Sufficient capacity).
Thus, flip-flops are required. A 3-bit counter possesses possible states, leaving unused states ( and ). The design must ensure that the counter never enters or hangs in these unused states.
Deriving Flip-Flop Inputs Using Excitation Tables
When designing sequential state machines, required flip-flop input values are determined from the excitation tables based on desired state transitions ():
To force a state transition from to :
Using an SR Flip-Flop: Set .
Using a JK Flip-Flop: Set (don't care).
Using a D Flip-Flop: Set .
Using a T Flip-Flop: Set .
To hold a state at ():
Using an SR Flip-Flop: Set .
Using a JK Flip-Flop: Set .
Using a D Flip-Flop: Set .
Using a T Flip-Flop: Set .
Frequency Division Calculations
A 4-bit ripple counter driven by an input clock frequency divides the frequency across its stages:
Output of Stage 0 ():
Output of Stage 1 ():
Output of Stage 2 ():
Output of Stage 3 (, MSB):
If the input clock is , the MSB toggles at:
Similarly, dividing a crystal oscillator down to requires flip-flop stages, since , satisfying: