Skip to main content

Sequence detector 1101 using T flip-flops

Short answer

Mealy machine with 2 T flip-flops; states A(00), B(01), C(10), D(11). T1 = Q1Q0 + Q0x, T0 = Q1x' + Q1'x + Q0x', y = Q1Q0x. Overlapping sequences detected.

Design a sequential machine that has a single input 'x' and single output 'y'. The machine is required to give high output (y=1) when it detects the serial sequence of x = 1101 message. Use T flip-flops only.

The machine has a single input x and a single output y; y = 1 when the last four bits received are 1, 1, 0, 1. Only T 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 T flip-flops (Q1Q0Q_1Q_0) are used, clocked on the positive edge. (A Moore machine would need 5 states.)

Step 1: States

Present stateMeaningNext (x=0)Next (x=1)y (x=0)y (x=1)
Areset / no useful bitsAB00
B"1" receivedAC00
C"11" receivedDC00
D"110" receivedAB01

Step 2: State diagram

 Main path (label = x/y):
 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

StateABCD
Q1 Q00 00 11 01 1

Step 4: Excitation table

T excitation: T = 1 when the flip-flop must change, T = 0 when it must hold (T=Q⊕Q+T = Q \oplus Q^+).

Q1 Q0xQ1+ Q0+T1T0y
0 000 0000
0 010 1010
0 100 0010
0 111 0110
1 001 1010
1 011 0000
1 100 0110
1 110 1101

Step 5: K-maps (rows Q1Q_1, columns Q0xQ_0x)

T1: Q1 / Q0x00011110
00010
10011
T0: Q1 / Q0x00011110
00111
11001
y: Q1 / Q0x00011110
00000
10010

Step 6: Equations

T1=Q1Q0+Q0xT0=Q1x‾+Q1‾x+Q0x‾y=Q1Q0x\begin{aligned} &T_1 = Q_1Q_0 + Q_0x \\ &T_0 = Q_1\overline{x} + \overline{Q_1}x + Q_0\overline{x} \\ &y = Q_1Q_0x \end{aligned}

Step 7: Logic diagram

   +-----+       +-----+
T0>|T   Q|-Q0 T1>|T   Q|-Q1
   | FF0 |       | FF1 |
   |     |       |     |
   +--^--+       +--^--+
      |             |
CLK---+-------------+
x = serial input, common to the gates
T1 = Q1.Q0 + Q0.x
T0 = Q1.x' + Q1'.x + Q0.x'
y = Q1.Q0.x

The gates for each flip-flop input are built from the equations; the output gate gives y directly (Mealy output).

Check with an input stream

x1101101100
StateABCDBCDBCD
y0001001000

y = 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)

All Digital Logic chapter 9 questions →