A sequential circuit is a logic circuit whose output depends on the present value of its input signals and the sequence of past inputs (the state). This is in contrast to combinational logic, whose output is a function of only the present input. This is possible because sequential circuits have memory elements.
There are two types of sequential circuits:
A flip-flop is a fundamental memory element in sequential logic. It can store one bit of information (0 or 1). It is a bistable multivibrator, meaning it has two stable states.
The Set-Reset (SR) flip-flop has two inputs, S and R. S sets the output to 1, and R resets it to 0. A major drawback is the invalid state when both S and R are 1.
The Data (D) flip-flop has a single data input D. The output Q simply follows the input D at the clock edge. It prevents the invalid state of the SR flip-flop.
The JK flip-flop is an improvement on the SR flip-flop. It has J and K inputs. When J=1 and K=1, the output toggles (flips to its opposite state) on the clock edge, resolving the invalid state issue.
The Toggle (T) flip-flop has a single input T. If T=1, the output toggles on the clock edge. If T=0, the output holds its state. It can be made from a JK flip-flop by tying J and K inputs together.
The analysis of a sequential circuit involves determining its behavior from its logic diagram. This is done by deriving its state table and state diagram.
The goal is to reduce the number of states in a state table, which can lead to a simpler circuit with fewer flip-flops. Two states are considered equivalent if, for every possible input, they produce the same output and transition to the same or equivalent next states. This is a complex process often done using a partitioning method.
Once the state table is reduced, we must assign a unique binary code to each state. The number of bits required is `ceil(logâ‚‚(n))`, where `n` is the number of states. The choice of assignment can significantly affect the complexity of the resulting circuit. There are various assignment rules (e.g., assigning adjacent codes to adjacent states in the state diagram) to simplify the logic.
An excitation table is crucial for the design of sequential circuits. It shows the necessary flip-flop input(s) required to transition from a present state (Q) to a desired next state (Q(t+1)).
| Present State Q(t) | Next State Q(t+1) | J | K | S | R | D | T | 
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | X | 0 | X | 0 | 0 | 
| 0 | 1 | 1 | X | 1 | 0 | 1 | 1 | 
| 1 | 0 | X | 1 | 0 | 1 | 0 | 1 | 
| 1 | 1 | X | 0 | X | 0 | 1 | 0 | 
('X' represents a don't care condition).
This is a systematic approach to creating a sequential circuit from a specification.
A counter is a register that goes through a predetermined sequence of states. The design follows the general procedure. For example, to design a 3-bit synchronous up-counter, the states would be 000, 001, 010, ..., 111, and back to 000. We would use this sequence to create the state table and derive the logic for the flip-flop inputs.