Before going into the details of sequential logic circuits, let’s discuss some previous concepts. There are two types of digital circuits, combinational logic circuits and sequential logic circuits. This post covers all the aspects of sequential logic circuits and presents the difference between the two types of circuits. In simple terms, sequential logic circuits have a memory element and they have the sense of time.
Difference Between Sequential Logic And Combinational Logic With a Simple Example:
In simple words these are the circuits that add memory and a sense of “time” to the digital circuits. Let’s explain with a help of a simple example.
Imagine a light switch. It’s a simple combinational circuit. The light turns on and off simply by the switch position. That is the output (light on and off) depends solely on the current input (switch position). Now, imagine a traffic light. It changes from red to yellow and yellow to green and again red. These traffic lights always follows a sequence and after a particular internal It changes its state. It remembers its previous state (red, yellow, green) and changes based on a clock signal, creating a sequence. That’s the power of sequential logic!
In short, they have the ability to remember, process information over time, and create complex functionalities.
What Are Sequential Logic Circuits:
A sequential circuit consists of a combinational logic circuit and a memory element. The term sequential refers to the fact that operations are performed in a sequence. Sequential logic circuits are digital circuits in which the output depends not only on the current inputs but also on the history of outputs. This dependency on previous states is facilitated by memory elements such as flip-flops and latches. These memory elements are capable of storing information in binary format, which defines the state of the sequential circuit at any given time.
As discussed earlier, the output of these circuits not only depends on the current input, but also depends on the current state of the memory elements. The state of the circuit is past data values. Similarly, the state of the memory element also depends on inputs and present state. The sequential logic is a function of time, how the inputs change over time, output and the state of the memory element at the given time. The combinational circuits are essentially a part of sequential logic. They helps to evaluate the next state of the circuit This evaluation considers both the circuit’s previous state, stored in memory elements like flip-flops, and the current input values.
A few examples of sequential logic circuits are
- Flip flops,
- Counters
- Shift registers
Block diagram of a simple sequential logic circuit:
The next state ‘ns’ is determined by equation below. It is a function of inputs and present states.
$ latex ns_i= f(X_1,X_2,X_3…. X_N,ps_1,ps_2…ps_N) $
\(ns_i= f(X_1,X_2,X_3…. X_N,ps_1,ps_2…ps_N)\)The output ‘Y’ at any instant of time is a function of input and present state.
\(Y_i= f(X_1,X_2,X_3…. X_N,ps_1,ps_2…ps_N)\)In some cases output is a function of the present state only. In this case, the output ‘Y’
\(Y_i= f(ps_1,ps_2…ps_N)\)
Have a look at equation of outputs. In both cases, the output is associated with the present state.
- The circuit consists of a set of inputs (X1, X2, …, Xn) and corresponding outputs (Y1, Y2, …, Yn).
- Inputs are processed through a combinational circuit, and results are stored in a memory element.
- The outputs are fed back into the system and, along with the current inputs, helps to determine the next output state.
- The “state” of the circuit refers to the data stored in the memory element.
- In sequential circuits, the storage elements are called flip-flops, which can store a single bit (either 0 or 1).
- Flip-flops receive inputs from the combinational circuit and are triggered by a clock signal, which generates pulses at regular intervals (for synchronous sequential circuits).
- These circuits are complex in design, making their operation challenging.
Design Process Of Sequential Logic Circuits:
To design a sequential circuit, follow these steps:
- Understand the Task: Begin by analyzing the problem, typically given as a verbal description of the circuit’s required behavior.
- Create a Block Diagram: Draw a basic block diagram to visualize the system’s components and their relationships.
- Develop a State Table or Diagram: Based on the task and block diagram, create a state table or state diagram to represent the circuit’s possible states.
- Assign Binary Codes to States: Assign unique binary codes to each state (e.g., 00, 01, 10, etc.) to differentiate them.
- Select Flip-Flop Type: Choose an appropriate type of flip-flop and use the state table to derive the input and output equations for the flip-flops.
- Simplify Equations: Simplify the derived equations to optimize the circuit design.
Classification of Sequential Logic Circuits:
Sequential circuits are further classified according to their signal timings into two types:
- Synchronous circuits
- Asynchronous circuits
Synchronous Circuits:
The clock signal:
Synchronous circuits rely on a clock signal to synchronize all their operations. All the state changes occur at discrete instant of time. All of these circuits incorporate a timing device called clock generator. It is an oscillator that produces a pulse of square waves (a binary signal that oscillates between high and low states) of variable frequency. This synchronization helps in achieving predictable and reliable circuit behavior. Examples include counters, shift registers, and finite state machines (FSMs).
Memory elements:
Flip flops and latches are the two basic memory elements. Flipflops are synchronous, on the other hand latches are asynchronous. The flip-flops only update their state (output) at specific moments on the rising or falling edge (depending on the design) of the clock signal. This ensures predictable and well-defined behavior within the circuit.
Predictable timings:
The timing of state changes is predictable and consistent, as all changes occur in sync with the clock signal. This predictability simplifies the design and analysis of the circuit.
Speed limitation:
The clock signal introduces a delay, potentially limiting the circuit’s maximum operating speed.
Asynchronous Circuits:
Free from the clock signal:
Asynchronous circuits do not rely on a clock signal for operation. Instead, state changes occur immediately in response to changes in input signals. In simple words, the behavior of these circuits depends on the state of the input signal. If a change occurs on the input signal, these circuits change the output accordingly. This change on the input signal occurs at any instant of time. While they can be faster than synchronous circuits, they are also more prone to issues like race conditions and glitches. The absence of a clock signal can theoretically lead to faster operation.
Memory elements:
While some asynchronous circuits may use flip-flops, they often employ simpler memory elements like unclocked latches or delay elements. These elements respond directly to changes in the input signals. Latches are asynchronous in nature.
Timing complexity:
The lack of a clock signal means that timing analysis is more complex. Designers must carefully consider propagation delays and race conditions to ensure reliable operation.
Higher speed:
The absence of a clock signal can theoretically lead to faster operation.
The design of asynchronous circuits is more complex compared to synchronous ones. As you progress in your studies, you’ll gain the ability to analyze the trade-offs between these two types of circuits and select the most suitable option for a particular design challenge.