What is a State Transition Diagram?
A State Transition Diagram is the graphical representation of a State Transition Table.
- States are represented by a circle.
- State name or value is written inside the circle.
- State value is typically the combined value of all the flip-flops in the circuit at any given time.
- States are joined by directed lines which always start from the current state and end at the next state.
- The arrows are marked by the input value(s) that cause the transition.
- The arrows are also marked by the output value(s), if any combinational output is present, by writing a slash after the input and then writing the output value(s).
How to Generate a State Transition Diagram from a State Transition Table?
- Draw one circle for each unique combination of all flip-flop values.
- For each row of the state table, iterate:
- Draw an arrow/directed line starting from the circle representing the current state value and ending it at the circle representing the next state value in that row.
- Mark each arrow/directed line, annotate it with the input combination that caused that state transition.
- For any combinational output(s), annotate the arrow/directed with the output value(s) by first adding a slash after the input(s) that cause that state transition.
Example: Generate a State Diagram from the State Table
In continuation of our analysis example, we have the following state table:
Master state machine conversion with our interactive step-by-step animation. Each row of the state table transforms into a directed arrow connecting the current state to the next. The input and output values are labeled directly along each line, separated by a forward slash (Input/Output). Explore the animation below to see how all eight rows build the complete state diagram.