Digital Logic · Latches and Flip-Flops
Present State, Next State, and Memory Elements
Overview
A sequential circuit is a combinational circuit plus a memory element, and that memory element is what makes the circuit's output depend on more than the current inputs.
The value stored in the memory element is the present state; the value computed from the external inputs and the present state becomes the next state, which is stored and then serves as the present state on the following cycle.
Key concepts
- Sequential circuit: a circuit that differs from a combinational circuit by the presence of a memory element.
- External output of a sequential circuit: depends on the external inputs and on the present contents of the memory element. A combinational circuit's external output depends only on the external input.
- Present state: the present contents of the memory element — whatever is currently stored in it.
- Next state: the new contents of the memory element, obtained by taking the external inputs together with the present state.
- Memory media: storage evolved from punch cards to tapes to hard disks to electronic circuits, which is what RAM uses.
How it works
- Whatever is stored in the memory element is the present state.
- The external inputs and the present state are combined to produce the new contents of the memory element.
- These new contents are fed back into the memory element and stored there; this stored value is the next state.
- On the following cycle, the next state becomes the present state for the next state computation, and the process repeats.
Formulas
- — the external output of a sequential circuit
- — the external output of a combinational circuit
- — the new contents of the memory element
- — the stored value carries forward
Worked examples
Punch card encoding: a paper-like medium on which holes are punched.
- Punch = 0
- No punch = 1
Comparison
| Aspect | Combinational circuit | Sequential circuit |
|---|---|---|
| Memory element | Absent | Present |
| External output depends on | External input | External inputs and present state |
Revision summary
- The memory element is the single distinguishing feature of a sequential circuit.
- Present state = current contents of the memory element; next state = new contents.
- Next state is a function of external inputs and present state, not of the inputs alone.
- The next state of one cycle becomes the present state of the following cycle.
- Punch card encoding: punch = 0, no punch = 1.
- Storage media order: punch cards → tapes → hard disks → electronic memory (RAM).
Previous-year exam insights
- The number of flip-flops needed to implement a machine with N states (after state reduction) is the smallest n with = ceil().
Asked inUGC NET 2009 - For a sequential circuit built from flip-flops, the next state is obtained by evaluating each flip-flop's excitation/next-state function at the present state and inputs;
for a D flip-flop the next state equals D, for a T flip-flop next state = T XOR present state, for JK next state = J·Q' + K'·Q.
Asked inGATE 2011GATE 2010GATE 2005 - To find the state sequence of a counter/register circuit, start from the given initial state and repeatedly apply the next-state functions; the set of states visited (before repeating) gives the number of distinct states and the cycle length.
Asked inGATE 2011GATE 2010GATE 2005 - In a state-transition (state) table, the minimum length of an input string to reach a target state from a given initial state is found by BFS over the state graph, expanding one input symbol per step.
Asked inGATE 2009GATE 1995 - Two states are equivalent if, for every input, they produce the same output and go to equivalent next states; state minimization merges equivalent states, and the number of rows of the reduced table is the number of equivalence classes.
Asked inGATE 1996 - For edge-triggered flip-flops, outputs change only at the active clock edge; between edges the stored state is held, so the output sequence over successive clock periods is determined by sampling the next-state logic at each active edge.
Asked inGATE 2005