2. INTRODUCTION OF STATE DIAGRAM :
A state diagram is a type
of diagram used in computer
science and related fields to describe
the behavior of systems. State diagrams
require that the system described is
composed of a finite number of states;
sometimes, this is indeed the case,
while at other times this is a
reasonable abstraction.
Many forms of state diagrams exist,
which differ slightly and have
different semantics.
3. WHAT IS A STATE DIAGRAM ?
A state diagram shows the behavior of
classes in response to external stimuli.
Specifically a state diagram describes the
behavior of a single object in response to a
series of events in a system.
Sometimes it's also known as a Harel state
chart or a state machine diagram. This UML
diagram models the dynamic flow of control
from state to state of a particular object
within a system.
4. Basic State Diagram Symbols and Notations
States
States represent situations during the life of an
object. You can easily illustrate a state in
SmartDraw by using a rectangle with rounded
corners.
Transition
A solid arrow represents the path between
different states of an object. Label the
transition with the event that triggered it and
the action that results from it. A state can have
a transition that points back to itself.
5. HOW TO DRAW A STATE DIAGRAM ?
Before you begin your drawing find the initial
and final state of the object in question.
Next, think of the states the object might
undergo. For example, in e-commerce a
product will have a release or available date, a
sold out state, a restocked state, placed in cart
state, a saved on wish list state, a purchased
state, and so on.
Certain transitions will not be applicable when
an object is in a particular state, for example a
product can be in a purchased state or a saved
in cart state if its previous state is sold out.
6. INTRODUCTION OF TIMEING CHART
A chart showing the standard times in various parts of the world with reference to a
specified time at a specified place.
7. What is the Difference between a State Diagram and a
TIMING CHART ?
A flowchart illustrates processes that are executed in the system that change the state
of objects. A state diagram shows the actual changes in state, not the processes or
commands that created those changes.
STATE DIAGRAM TIMING CHART
8. GENERATION OF A STATE DIAGRAM FROM A
TIMING CHART
Many times, digital system use a timing chart o describe its function. We can use this
timing chart to create the state diagram. Once the state diagram is obtained we can
designed the system as discussed earlier.
Let us consider the timing chart as shown in figure. As shown in the figure , the
sequential circuit has two inputs A &b along with clock signal and one output Z.
TIMING CHART
9. It can be observed that
Input changes occurs on the negative transitions of
clock and both the inputs are asserted for exactly
one lock period.
System does nothing as long as A and B inputs are
simultaneously zero.
Output assertion begins at positive transition of
clock.
If B is asserted, the system goes to state C and
generates an output at positive clock transition. It
then goes back o state A.
When A is asserted, but b is not asserted, the
system goes to state C, and generates a second
output before returning to state A.
𝐵
1
𝑐
1
𝐴
1
A=1
B=0 B=1
A=B=0