---
title: "State diagram and state table"
subject: "Digital Logic"
chapter: 9
key: "semester_3/digital_logic:state-diagram-table-define"
source: https://www.bctengineer.com/q/semester_3/digital_logic/state-diagram-table-define
site: BCT Engineering
---

# State diagram and state table

Digital Logic · Chapter 9: Sequential Machines

- Asked in: 2070 Chaitra, 2 marks
- Video: [Introduction to State Table, State Diagram & State Equation](https://www.youtube.com/watch?v=NNOSWnTHakY) — Neso Academy
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/digital_logic/state-diagram-table-define
- Whole chapter: https://www.bctengineer.com/md/semester_3/digital_logic/chapter-9

## Question

Define state diagram and state table with example.

## Short answer

A state diagram is a graph of states with edges labeled input/output. A state table lists present state, input, next state, output in tabular form. Example: Mealy machine for two consecutive 1s; states A (no 1) and B (one 1); output Z=1 when X=1 in state B.

## Answer

A **state diagram** is a graph that shows the behaviour of a sequential circuit: each state is a circle, and each arrow shows the move to the next state on a clock pulse, labelled input/output (Mealy) or with the output written inside the circle (Moore).

A **state table** gives the same information in tabular form: for every present state and input, it lists the next state and the output.

**Example:** a Mealy machine that gives Z = 1 when two consecutive 1s arrive (states A = no 1, B = one 1).

```text
 Arc label = X/Z

 A --1/0--> B --1/1--> B  (self loop)
 A --0/0--> A  (self loop)
 B --0/0--> A
```

| Present state | Next (X=0) | Next (X=1) | Z (X=0) | Z (X=1) |
|---|---|---|---|---|
| A | A | B | 0 | 0 |
| B | A | B | 0 | 1 |

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. In a state diagram, what do the circles and the arrows represent?
   A. Circles are flip-flops; arrows are clock lines
   B. Circles are states; arrows are moves to the next state on a clock pulse, labelled with input/output
   C. Circles are outputs; arrows are inputs
   D. Circles are gates; arrows are feedback paths
   Answer: B. Each state is a circle and each arrow is the transition on a clock pulse, labelled input/output for a Mealy machine. (Key point: State diagram)

2. For each present state and input, what does a state table list?
   A. The flip-flop type and its clock
   B. Only the next state
   C. The next state and the output
   D. Only the K-map groupings
   Answer: C. The state table gives the same information as the diagram: next state and output for every present state and input. (Key point: State table)

3. In the example (Z = 1 on two consecutive 1s), which transition gives Z = 1?
   A. A on X=0
   B. A on X=1
   C. B on X=0
   D. B on X=1
   Answer: D. Z = 1 only when already in B (one 1 received) and another 1 arrives, i.e. B with X=1. (Key point: Mealy example)

## Related in Digital Logic

- [SR flip-flop diagram, excitation table, equation](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Asr-flipflop-diagram-equation) — Digital Logic, chapter 6
- [Edge triggered JK flip-flop with excitation table](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Aedge-jk-excitation) — Digital Logic, chapter 6
- [JK flip-flop with tables and timing diagram](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Ajk-flipflop-timing-diagram) — Digital Logic, chapter 6, asked 2×
- [Positive edge SR flip-flop and its state diagram](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Asr-positive-edge-state-diagram) — Digital Logic, chapter 6
- [JK flip-flop with symbol, equation, state diagram](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Ajk-flipflop-state-diagram) — Digital Logic, chapter 6

## Related in other subjects

- [LCM processor with state table](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Aspp-lcm-state-table-2digit) — Embedded System, chapter 2
- [Two-layer profile stress diagram, 6 m sand](https://www.bctengineer.com/question.md?key=semester_4%2Fsoil_mechanics%3Asand-clay-profile-stress-diagram-capillary) — Soil Mechanics, chapter 6
