A sequence detector is designed to detect precisely 3 digital inputs, with overlapping sequences detectable. For the sequence (1,0,1) and input data (1,1,0,1,0,0,1,1,0,1,0,1,1,0), what is the output of this detector?
Correct Answer :
0,1,0,0,0,0,0,1,0,1,0,0
Solution :
The correct option is: 0,1,0,0,0,0,0,1,0,1,0,0
Step-by-Step Explanation:
A sequence detector is a sequential circuit that outputs a high signal (usually 1) whenever a specific sequence of inputs is detected. Here, we need to detect the sequence (1, 0, 1) from the input data stream: 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0. Since overlapping sequences are detectable, the last bits of a previously detected sequence can serve as the starting bits for the next sequence detection.
Since the target sequence (1, 0, 1) has a length of 3 bits, the detector cannot output a valid comparison result until at least 3 bits have been entered. Thus, the first output corresponds to the third input bit, reducing the output sequence length from 14 to 12 bits.
Let's analyze the input stream step-by-step by checking the last three received bits at each step:
1. Inputs 1, 2, 3: The first three bits are 1, 1, 0. This does not match (1, 0, 1).
⇒ Output = 0
2. Input 4: The sequence is now 1, 1, 0, 1. The last three bits are 1, 0, 1. This matches (1, 0, 1).
⇒ Output = 1
3. Input 5: The input stream is 1, 1, 0, 1, 0. The last three bits are 0, 1, 0. No match.
⇒ Output = 0
4. Input 6: The input stream is 1, 1, 0, 1, 0, 0. The last three bits are 1, 0, 0. No match.
⇒ Output = 0
5. Input 7: The input stream is 1, 1, 0, 1, 0, 0, 1. The last three bits are 0, 0, 1. No match.
⇒ Output = 0
6. Input 8: The input stream is 1, 1, 0, 1, 0, 0, 1, 1. The last three bits are 0, 1, 1. No match.
⇒ Output = 0
7. Input 9: The input stream is 1, 1, 0, 1, 0, 0, 1, 1, 0. The last three bits are 1, 1, 0. No match.
⇒ Output = 0
8. Input 10: The input stream is 1, 1, 0, 1, 0, 0, 1, 1, 0, 1. The last three bits are 1, 0, 1. This matches (1, 0, 1).
⇒ Output = 1
9. Input 11: The input stream is 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0. The last three bits are 0, 1, 0. No match.
⇒ Output = 0
10. Input 12: The input stream is 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1. The last three bits are 1, 0, 1. This matches (1, 0, 1) (overlapping with the previous detection).
⇒ Output = 1
11. Input 13: The input stream is 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1. The last three bits are 0, 1, 1. No match.
⇒ Output = 0
12. Input 14: The input stream is 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0. The last three bits are 1, 1, 0. No match.
⇒ Output = 0
Combining the output bits from steps 1 to 12 gives: 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0.
Access expert-curated educational resources and study materials—completely free.
Create, conduct, and manage professional online assessments with Crey. Perfect for teachers and institutes.
Copyright © 2026 Crey. All Rights Reserved.