State Machine Diagram Example: Digital Clock


This state diagram shows the critical states of a digital clock, which involves idle, setting hours and setting mins. The state transitions in between states indicates the functions that trigger state changes. For example, when the set function is triggered during the 'setting hours' state, the state will be changed to idle.

Use this state diagram template as a starting point to create your own, or click Create Blank to start from scratch.

What is State Machine Diagram?

A state machine (also called, state chart, state tradition diagram, or simply state diagram) is a behavior which specifies the sequence of states an entity visits during its lifetime in response to events, together with its responses to those events. Typically, it is used for describing the behavior of classes, but state charts may also describe the behavior of other model entities such as use-eases, subsystems, operations, or methods.

Activity vs. State Machines

In UML semantics Activity Diagrams are reducible to State Machines with some additional notations.

Activity Diagrams capture high level activities aspects.

  • Objects have behaviors and states. The state of an object depends on its current activity or condition.
  • The vertices represent the carrying out of an activity and the edges represent the transition on the completion of one collection of activities to the commencement of a new collection of activities.

State Machine Diagram shows the possible states of the object and the transitions that cause a change in state.

  • The vertices represent states of an object in a class and edges represent occurrences of events.
  • The additional notations capture how activities are coordinated.
  • In particular, it is possible to represent concurrency and coordination.

Keen to try VP Online?

No limitations, no obligations, no cancellation fees.

Start a Free Trial