- Asked 7/22
- 2081 Bhadra · 12 marks
- 2076 Asoj
Sequence detector 1101 using SR flip-flops
Short answer
Use a Mealy machine with overlap and 2 SR flip-flops. Encode the four states as A=00, B=01, C=10, D=11. The flip-flop equations are S1 = Q1' Q0 X, R1 = Q1 Q0; S0 = Q1 Q0' X' + Q1' Q0' X, R0 = Q1' Q0 + Q0 X'; output Z = Q1 Q0 X.
Design a sequential machine that consists of a single input, X and the single output, Z. The machine is required to give output high when input contains serial message 1101 sequence. Use SR flip-flops only.
The machine has one serial input X and one output Z. Z = 1 when the last four bits received are 1, 1, 0, 1. Only SR flip-flops are used.
A Mealy machine is used (output depends on the present state and the present input), and overlapping sequences are detected. Since the sequence has 4 bits, 4 states are needed, so 2 SR flip-flops () are used, clocked on the positive edge. (A Moore machine would need 5 states.)
Step 1: States
| Present state | Meaning | Next (X=0) | Next (X=1) | Z (X=0) | Z (X=1) |
|---|---|---|---|---|---|
| A | reset / no useful bits | A | B | 0 | 0 |
| B | "1" received | A | C | 0 | 0 |
| C | "11" received | D | C | 0 | 0 |
| D | "110" received | A | B | 0 | 1 |
Step 2: State diagram
Main path (label = X/Z):
A -1/0-> B -1/0-> C -0/0-> D -1/1-> B
Other transitions:
A -0/0-> A B -0/0-> A
C -1/0-> C D -0/0-> A
Step 3: State assignment
| State | A | B | C | D |
|---|---|---|---|---|
| Q1 Q0 | 0 0 | 0 1 | 1 0 | 1 1 |
Step 4: Excitation table
SR excitation: 0→0: S=0, R=X; 0→1: S=1, R=0; 1→0: S=0, R=1; 1→1: S=X, R=0.
| Q1 Q0 | X | Q1+ Q0+ | S1 | R1 | S0 | R0 | Z |
|---|---|---|---|---|---|---|---|
| 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 | 1 1 | X | 0 | 1 | 0 | 0 |
| 1 0 | 1 | 1 0 | X | 0 | 0 | X | 0 |
| 1 1 | 0 | 0 0 | 0 | 1 | 0 | 1 | 0 |
| 1 1 | 1 | 0 1 | 0 | 1 | X | 0 | 1 |
Step 5: K-maps (rows , columns )
| S1: Q1 / Q0X | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 |
| 1 | X | X | 0 | 0 |
| R1: Q1 / Q0X | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | X | 0 | X |
| 1 | 0 | 0 | 1 | 1 |
| S0: Q1 / Q0X | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | X | 0 |
| R0: Q1 / Q0X | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | X | 0 | 1 | 1 |
| 1 | 0 | X | 0 | 1 |
| Z: Q1 / Q0X | 00 | 01 | 11 | 10 |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 |
Step 6: Equations
Step 7: Logic diagram
+-----+ +-----+
S0>|S Q|-Q0 S1>|S Q|-Q1
| FF0 | | FF1 |
R0>|R | R1>|R |
+--^--+ +--^--+
| |
CLK---+-------------+
X = serial input, common to the gates
S1 = Q1'.Q0.X R1 = Q1.Q0
S0 = Q1.Q0'.X' + Q1'.Q0'.X R0 = Q1'.Q0 + Q0.X'
Z = Q1.Q0.X
The gates for each flip-flop input are built from the equations; the output gate gives Z directly (Mealy output).
Check with an input stream
| X | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 |
|---|---|---|---|---|---|---|---|---|---|---|
| State | A | A | B | C | D | B | C | D | B | A |
| Z | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 |
Z = 1 appears exactly on the clock in which the last bit of 1101 arrives; overlapping sequences are also detected.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Sequence detector 1101 using T flip-flops · Digital Logic, chapter 9 · asked 7×
- Sequence detector 001 using JK flip-flops · Digital Logic, chapter 9 · asked 7×
- Sequence detector 011 using JK flip-flops · Digital Logic, chapter 9 · asked 7×
- Sequence detector 1110 using T flip-flops · Digital Logic, chapter 9 · asked 7×
- Sequence detector 1001 using D flip-flops · Digital Logic, chapter 9 · asked 9×
- Sequence detector 1001 using SR flip-flops · Digital Logic, chapter 9 · asked 7×
- Sequence detector 110 using SR flip-flops · Digital Logic, chapter 9
- Sequence detector 1011 using T flip-flops · Digital Logic, chapter 9 · asked 2×
- Sequence detector 1010 using T flip-flops · Digital Logic, chapter 9 · asked 7×
- Sequence detector 101 using T flip-flops · Digital Logic, chapter 9
- Sequence detector 1011 using JK flip-flops · Digital Logic, chapter 9 · asked 3×
- Sequence detector 1101 FSM and VHDL · Embedded System, chapter 9