11.4 Sequential Circuits

COS2621 - Computer Organisation · 11. Digital Logic

Sequential Circuits

Introduction to Sequential Circuits

Sequential circuits are digital circuits where the output depends on both current inputs and past inputs. This means they include memory elements to store information about previous states. There are two main types of sequential circuits: synchronous and asynchronous circuits.

Synchronous Sequential Circuits

Synchronous sequential circuits use a clock signal to control state changes. All changes occur at specific times determined by the clock. The primary component is the flip-flop, which stores state information. A flip-flop exists in one of two states (0 or 1) and remains in that state when there is no input.

Remember: A flip-flop can be thought of as a basic memory element in digital circuits.

Consider a simple synchronous circuit with a clock signal and two flip-flops, A and B. The states can be represented as follows:

Clock | A | B
0     | 0 | 0
1     | 1 | 0
2     | 1 | 1
3     | 0 | 1

At clock time 0, both A and B are 0. At clock time 1, A changes to 1 while B remains 0. This pattern continues, with the clock signal controlling state changes.

Asynchronous Sequential Circuits

Asynchronous sequential circuits do not rely on a clock signal. They change state immediately in response to input changes, which can lead to race conditions. For example, consider an asynchronous circuit with inputs X and Y, and output Z:

X | Y | Z
0 | 0 | 0
1 | 0 | 1
0 | 1 | 0
1 | 1 | 1

Here, the output Z changes state immediately when inputs X and Y change.

Finite State Machines

A finite state machine (FSM) is a model used to design sequential circuits. An FSM consists of a finite number of states, transitions between those states, and actions based on inputs. FSMs can be Mealy or Moore machines. Consider a simple FSM with states S0 and S1:

Input | Current State | Next State
0     | S0            | S0
0     | S1            | S0
1     | S0            | S1
1     | S1            | S1

This FSM transitions based on input values. If the current state is S0 and the input is 1, it transitions to state S1.

Applications of Sequential Circuits

Sequential circuits are used in various applications, such as digital clocks, memory storage, and control systems. They are crucial for the functioning of computers and digital devices.

Watch out: Be careful with the timing of state changes in asynchronous circuits, as they can lead to unpredictable results.

Check your understanding

  • What are the main differences between synchronous and asynchronous sequential circuits?
  • Explain the role of flip-flops in synchronous circuits.
  • What is a finite state machine, and how is it used in sequential circuits?
  • Consider the following question from a past paper: "The ___ exists in one of two states and, in the absence of input, remains in that state." What is the correct answer?

Test yourself

5 quick questions on this lesson. Pick an answer to see if you're right.

  1. 1. What is the primary component used to store state information in synchronous sequential circuits?

  2. 2. Which type of sequential circuit changes state immediately in response to input changes?

  3. 3. Which of the following is an application of sequential circuits?

  4. 4. The ___ exists in one of two states and, in the absence of input, remains in that state.

  5. 5. In a finite state machine, what does the transition depend on?