# Designing two 8-bit code sequence detector that accepts overlapping sequences

#### Electronicnoobee

Joined Nov 21, 2020
2
Hi, I have to design a sequence detector that accepts overlapping sequences for two 8-bit codes. The codes are 00110001 and 01110011. A logical 1 output will be generated when either one of two 8-bit code sequences are correctly detected sequentially.

So, I'm stuck at drawing the Mealy model state diagram. This is what I was able to draw (picture attached below). However, I don't know where to connect some of the states. For example, if the input at S6 is 1, I don't know if I should connect it to S3 or S9 as it can be a part of overlapping sequence for both sequences. I have the same problem for S7 and S13. Is my Mealy model state diagram right?

#### jpanhalt

Joined Jan 18, 2008
11,088
Hi, I have to design a sequence detector that accepts overlapping sequences for two 8-bit codes. The codes are 00110001 and 01110011. A logical 1 output will be generated when either one of two 8-bit code sequences are correctly detected sequentially.
I am unclear what you are asking. Can you post the exact question put to you?

For example, what defines a sequence? To me, that is 2 or more characters in the same locations (i.e., bit number). Thus, in the example you give, I find several such overlaps: xx1100xx. Thus, 11, 10, 00,110, 100, and 1100 are overlapping sequences. There must be some other conditions to fulfill.

#### Electronicnoobee

Joined Nov 21, 2020
2
I am unclear what you are asking. Can you post the exact question put to you?

For example, what defines a sequence? To me, that is 2 or more characters in the same locations (i.e., bit number). Thus, in the example you give, I find several such overlaps: xx1100xx. Thus, 11, 10, 00,110, 100, and 1100 are overlapping sequences. There must be some other conditions to fulfill.
So basically, random inputs will be entered in. The machine will take in the input 1 by 1 ,and once either one of the 8-bit sequence is detected, the machine should have a logic 1 output.

Something like this (pic attached below), where the sequence is 0001 and 0010. For example, after the sequence 0010, the LSB is shared with the MSB of the 0001 sequence.

Hope this clarifies it.(pic attached below)

#### jpanhalt

Joined Jan 18, 2008
11,088
I am seeing two questions:
1) As originally stated, you asked for detecting overlapping sequences of 2, 8-bit numbers ("for two 8-bit codes") , either of which could be anything from 0xFF to 0; and
2) Your second post asks to detect whenever either "0010" or "0001" or both (e.g., "00010") appear in a sequence of unlimited length.

Which is it?

#### jpanhalt

Joined Jan 18, 2008
11,088
Now, you seem to be looking for either of two specific 8-bit sequences. That is not my interpretation of the actual question you posted in #3.

1) You need to state clearly the exact question you need to answer.
2) If it is a specific sequence of a defined number of bits, have you considered using XOR with each of the defined bit patterns?
3) Are Samuel Wong 1 and Electronicnoobee the same person or in the same class?

#### Samuel Wong 1

Joined Jun 4, 2018
6
Btw I managed to solve it already. Thanks for your help anyways

• Deleted member 115935

#### jpanhalt

Joined Jan 18, 2008
11,088
@Samuel Wong 1
Congratulations. Now maybe the TS will have success too.

#### WBahn

Joined Mar 31, 2012
26,398
Based on the example, it appears to me that the problem is asking for a HI output if the most recent eight-bit sequence is either of the two target sequences.