- 2075 Asoj · 10 marks
Machine from 3-state diagram using SR
Short answer
Assign states X=00, Y=01, Z=10. Output F=1 only in Z with W=1 (three consecutive 1s). S1=Q0 W, R1=W', S0=Q1' Q0' W, R0=Q0, F=Q1 W. Two S-R flip-flops.
Design a synchronous sequential machine from the state diagram given below. Use S-R Flip-Flop. [Figure: state diagram with three states X, Y, Z, edges labelled input/output: X→X on 0/0; X→Y on 1/0; Y→X on 0/0; Y→Z on 1/0; Z→Z on 1/1; Z→X on 0/0]
The state diagram is a Mealy diagram with 3 states. To avoid confusion with the state names X, Y, Z, the input is called W and the output F. From the diagram, F = 1 only when the machine is in Z and W = 1, i.e. the machine detects three or more consecutive 1s. Flip-flops: S-R.
State diagram (given)
Arc label = input/output
X --1/0--> Y --1/0--> Z --1/1--> Z
X --0/0--> X (self loop)
Y --0/0--> X
Z --0/0--> X
State table
| Present state | Next, W=0 | Next, W=1 | F (W=0) | F (W=1) |
|---|---|---|---|---|
| X | X | Y | 0 | 0 |
| Y | X | Z | 0 | 0 |
| Z | X | Z | 0 | 1 |
State assignment
X = 00, Y = 01, Z = 10 (flip-flop outputs ). The unused code 11 is taken as don't care (x) in all K-maps. The flip-flops are cleared to 00 at power-on (start state). Checking the final equations, from 11 the machine goes to a valid state on the next clock (W=0 goes to X, W=1 goes to Z), so it is self-starting.
Excitation table of S-R flip-flop
| Q | Q+ | S | R |
|---|---|---|---|
| 0 | 0 | 0 | x |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 0 | 1 |
| 1 | 1 | x | 0 |
Transition and excitation table
| Q1 Q0 | W | Q1+ Q0+ | S1 | R1 | S0 | R0 | F |
|---|---|---|---|---|---|---|---|
| 0 0 | 0 | 0 0 | 0 | x | 0 | x | 0 |
| 0 0 | 1 | 0 1 | 0 | x | 1 | 0 | 0 |
| 0 1 | 0 | 0 0 | 0 | x | 0 | 1 | 0 |
| 0 1 | 1 | 1 0 | 1 | 0 | 0 | 1 | 0 |
| 1 0 | 0 | 0 0 | 0 | 1 | 0 | x | 0 |
| 1 0 | 1 | 1 0 | x | 0 | 0 | x | 1 |
K-maps and simplified equations
S1 W=0 W=1
Q1Q0=00 0 0
Q1Q0=01 0 1
Q1Q0=11 x x
Q1Q0=10 0 x
R1 W=0 W=1
Q1Q0=00 x x
Q1Q0=01 x 0
Q1Q0=11 x x
Q1Q0=10 1 0
S0 W=0 W=1
Q1Q0=00 0 1
Q1Q0=01 0 0
Q1Q0=11 x x
Q1Q0=10 0 0
R0 W=0 W=1
Q1Q0=00 x 0
Q1Q0=01 1 1
Q1Q0=11 x x
Q1Q0=10 x x
F W=0 W=1
Q1Q0=00 0 0
Q1Q0=01 0 0
Q1Q0=11 x x
Q1Q0=10 0 1
Logic diagram
+-------------+ +----------+
W ------>| next-state |---->| FF1, FF0 |--+--> Q1, Q0
+----->| logic | | (CLK) | |
| +-------------+ +----------+ |
+-------------------<--------------------+
| +-------------+
+----->| output |----> F
W ------>| logic |
+-------------+
Gates needed (two S-R flip-flops with a common clock; complements are taken from the outputs or NOT gates):
- : a 2-input AND for .
- : direct line .
- : a 3-input AND for .
- : direct line .
- : a 2-input AND for .
Check: input W = 0111101 gives F = 0001100 — F = 1 at the 3rd and 4th consecutive 1, as the diagram requires (Z → Z on 1/1).
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Machine from 4-state diagram using SR · Digital Logic, chapter 9
- Flip-flop as state machine; SR to JK · Digital Logic, chapter 6
- SR flip-flop diagram, excitation table, equation · Digital Logic, chapter 6
- Positive edge SR flip-flop and its state diagram · Digital Logic, chapter 6
- SR drawback; edge triggered JK flip-flop · Digital Logic, chapter 6 · asked 3×
- SR drawbacks; D flip-flop operation · Digital Logic, chapter 6
- Combinational vs sequential; JK flip-flop · Basic Electronics Engineering, chapter 6
- SR flip-flop operation · Basic Electronics Engineering, chapter 6 · asked 6×
- Slab design, three edges continuous, 5x4 m (Fe500) · Design of RCC Structure, chapter 9
- Types of flip-flops; JK flip-flop · Basic Electronics Engineering, chapter 6 · asked 2×