 Hello everyone, I am Dr. Asha Thalange and today we are going to discuss state diagram and state table for sequence detector using Moore model for overlapping type. At the end of this session, you will be able to draw the state diagram and state table for the overlapping type sequence detector using Moore machine model. These are the contents we will be covering in this session. Now, before moving ahead, pause this video and recall what is the overlapping type of sequence detector? Well, in overlapping sequence detector, one or more than one bits of one sequence can become the part of the next sequence. For example, consider a sequence detector to detect a sequence 101. Now, let us assume that this is the input bit stream arriving. So, here the first bit of the sequence is one. So, here as the one bit is received, if this is assumed to be the first bit of the sequence, the next bit coming is also one. So, here the sequence gets broken. So, this bit is now assumed to be the first bit of the sequence and then it is stressed again. So, 101. So, here the sequence is being detected and the output is made one. So, this bit is acting as a first bit for the sequence and this bit is acting as a last bit for the sequence. Now, for overlapping type, here this bit can be treated as the first bit for the next sequence. So, here if we start from the same bit, so 101. So, this is the end of the next sequence and output is made again one. Similarly, the same bit can be treated as the first bit for the next sequence. So, again the next sequence is detected as 101 and output is made one here. So, we can see here in this case the last bit of the previous sequence is acting as a first bit for the next sequence. So, in this case there is overlapping of one bit. So, it is possible that depending on the sequence there can be more than one bits of overlapping. So, this is how overlapping type sequence detector method is implemented. Now, let us draw the state diagram for a sequence detector using a Moore model. Let us consider the same example 101. Now, we know that in the Moore model the number of states required to represent the state diagram for a sequence detector is always one bit greater than the number of bits inside the sequence. For example, here the number of bits in the sequence is 4. So, the number of states required is always 4 plus 1 that is 5 states. Initially in the reset mode the first the state machine moves into the initial state. Let us assume that now the incoming bit stream is initially as per the sequence. So, when the first bit is received that is bit 1 is received there is a state transition taking place from S0 state to S1. When the next bit received is 0 then again there is a state transition from S1 to S2. Further again when the third bit is received that is again the state transition takes place from S2 to S3. And finally, when the last bit is received there is a state transition from S3 to S4. And here the whole sequence is received and finally the output is made 1. So, you can see in all other states the output is 0 only once the whole sequence is received the output is made 1 in the state S4. Now, we know that S0 is waiting for the first bit, S1 is waiting for the second bit, S2 is waiting for the third bit and S3 is waiting for the fourth bit. Now, let us consider the initial state again if the incoming bit is instead of 1 if it is 0. So, the first bit if it is 0 it means there is no start of the sequence so, no state transition takes place. So, here the next state is again the same state that is S0. So, it remains in the same state when the first bit received is 0. Now, again let us say if the next bit received is 1 and there is a state transition takes place it moves to state S1. Now, here if 0 is received it moves to next state. Now, if after 1 if again a 1 bit is received. So, here as soon as 1 bit received it means there is a break of a sequence and now this 1 bit is treated as the first bit. So, after first bit here there is a state transition from S0 to S1 to wait for the next bit. So, here even though in S1 if the bit 1 is remaining so, here it will wait in the same state to receive the second bit. So, here there is no state transition and it will remain again in the state S1. Now, let us say that here now 0 is received and thus it will move the state from S1 to S2. So, the received bit is 1 0. Now, here if a 0 bit is received it will move again further. Now, if a bit received at S2 is 1 so, the sequence will be 1 0 1. So, here the sequence got broken. So, if the received bit at S2 is 1 it means we will treat this 1 as the again start of the sequence and the received bit is treated as the first bit. So, it has to move to the place where it will wait for the second bit that is 0. So, here in the case S2 if the next bit received is 1 it will move back again to the state S1 to wait for the second bit. Now, let us assume that the next bit in received in S2 is 0. So, it will move to the next state. It means up till now the received bit is say 1 0 and 0 and now it has reached to S3. So, if in the state if the next bit received is 1 it will move to S4 state, but if the next bit received is again 0 in the S3 state. So, the incoming bit will be 1 0 0 and again 0 it means again the sequence got broken. So, here once the sequence got broken in this case I have to start again from the initial state itself. So, here in S3 if a bit received is 0. So, it will go back again to the initial state and wait for the first one to appear. Only when the first one appears then it will again move to the next state. Now, let us say that it has received all the 4 bits and now it has reached to the state S4. Now, in this S4 once the sequence is completed now here the output is made 1. Now, again there are 2 possibilities when the input received is 1 or the input received is 0 in the state S4. Now, if the input received is 1. So, here it means since it is overlapping here if this is the last bit and the next bit received is also 1. It means we cannot treat this as the start bit as the sequence got broken. Now, here in this case we can treat this as the first bit of the next sequence. And then to wait for the second bit of the sequence we know that we have to move to state S1. So, here in S4 when the incoming bit the next bit received if it is 1 it will move to the S1 state to wait for the next bit that is 0. And then the same thing continues. On the other hand if in S4 if the next bit received is 0. So, it means this last bit of the sequence can be treated as the first bit for the next sequence. And here the next bit received is 0. So, it means what we have received already 1 and 0. So, it has to wait for the third bit and we know that the third bit is received in the state S2. So, here in S4 if the next bit received is 0. So, here it will move to the S2 bit to wait for the third bit. So, in this way this bit is acting here in a overlapping form. So, 1, 0, 0 and 1. So, this is how the circle completes. So, in this way this is how the state diagram for the sequence detector is obtained for the sequence 1, 0, 0, 1 using the Moore model for overlapping type. Now, let us draw the state table for the sequence detector using the Moore model for the given state diagram. Now, as shown here it consists of 5 states. So, these 5 states are written as shown in the present state from S0 to S4. Now, depending on the input value A equal to 0 or A equal to 1 depending on the state transition we put here the next state value. So, consider the present state as S0. So, when present state is S0 if input is A equal to 0. So, the next state is also 0. So, here the next state is S0. Similarly, when input is 1 the next state is S1. So, here when the input is 1 the next state is also S1. Also since it is a Moore model the output depends only on the present state. So, here we know that if for S0 the output is 0. So, here the output is 0. Similarly, for S1 state considering present state as S1 when input is 0 there is a state transition the next state is S2. So, here when input is 0 next state is S2 and S1 when input is 1 the next state is in the same state that is S1. And also in S1 the output is 0. So, during the present state S1 output is again 0. So, this is how the state diagram is converted to the state table. So, similarly for all other states this is what the next state and the output is obtained. So, this is the state table for the sequence detector using the Moore model. Now, pause this video and based on the method discussed try to draw the state diagram and the state table to detect the sequence 1 1 1 using Moore model. For this overlapping type this is the state diagram and state table for the sequence 1 1 1 using Moore model for the overlapping type. These are the references used. Thank you.