 Hello everyone, I am Dr. Asha Therange and today we are going to discuss state diagram and state table for sequence detector using Mealy model for non-overlapping type. At the end of this session you will be able to draw state diagram and state table for the non-overlapping type sequence detector using Mealy machine model. These are the contents we will be covering in this session. In the previous session we discussed how to obtain a state diagram and a state table for a sequence detector using Moore model. Now consider the same example to detect a sequence 1001 using Mealy model. Now unlike Moore model, the number of states required to detect the sequence here is same as the number of bits in the sequence. For example, here the number of bits in the sequence is 4. So for the state diagram, 4 states are used. Let us name them S0, S1, S2 and S3. Initially when the reset is pressed it will go to the initial state say S0. Now let us assume that the incoming bit stream is same as the sequence. So here in S0 that is in the initial state if the first bit received is 1 then it will move to the next state that is S1. So here S0 is used to wait for the first bit. Similarly in state S1 if the next incoming bit is 0 it moves to the next state. In here as it is Mealy machine model the output is specified along the transition line, state transition line along with the input. So here after S0 to S1 state transition still the output is 0. From S1 to S2 also output is 0. Now in the third state S2 now it is waiting for the third bit. Here if the incoming third bit is 0 it moves to the next state and the output is still 0 as the complete sequence is not received. Again in state S3 now it is waiting for the fourth bit. If the incoming fourth bit is 1 it means the whole complete sequence is received and now the output should become 1. And after that one complete sequence the state machine has to now start the sequence detection process right from the initial state as it is a non-overloping model. So that is why in state S3 if the incoming bit is 1 the output will finally become 1 that is the end of the sequence and it will move back to the initial state S0 to start the new sequence. Now consider the state S0. Now as shown if the bit 1 is received it is moving to the next state. But if the initial bit received is 0 then it means it will not move ahead and it will remain in the same state and the output is 0. Let us assume that now in state S0 if the incoming bit is 1 it moves to the state S1. Now in S1 we know that it is waiting for the second bit to be received. If the second bit is 0 it will move ahead to S2 else if the second bit received is also 1. It means we have received 1 here again if 1 is received it means the sequence got broken and now this one is treated as the initial bit of the next sequence or the starting bit of the next sequence. Now it will wait for the 0 bit again. So here if in S1 if the incoming bit is 1 it will remain in the same state. Now still the output is 0. Now let us assume that after 1 it receives 0 and it moves ahead. So here now in S2 if the third bit received is 0 that is 1 0 0 it will move to S3 bit. But if instead of 0 in S2 if it receives 1 it means if the third bit is 1 it means the received bit is 1 0 1 it means the sequence again got broken. So here the received third bit in S2 is treated as the first bit of the next sequence and again it will wait for the second bit that is the 0 bit. So here the second bit is obtained in state S1. So here when S2 the incoming bit if it is 1 then it will go back again to the S1 state to wait for the second bit. So here again the output is made 0. Now let us assume that the incoming bit stream is 1 0 now 0. So the received bit stream is 1 0 0 it has reached to state S3. Now we know that if in S3 if 1 is received this is the end of the sequence output is made 1 and it will go back to S0. What else if in S3 0 is received? That means the incoming bit is say 1 0 0 and the fourth bit is also 0 it means the sequence again it got broken. So here again it has to start detecting the sequence right from the first bit that is it will move back again to the initial state and wait for the first bit to arrive. So here the sequence got broken and the output is still 0. So thus this is how the state diagram is obtained for the sequence 1 0 0 1 using the Mealy model. Now let us see how the state table for the sequence detector is obtained for the given state diagram for Mealy model. Now as shown here there are 4 different states. So in the state table here this is the present state part the next state and output depending on the input bit 0 and again the next state and the output depending on the input bit state 1. Since it is a Mealy model both next state and output depends on the present state and the input value. Now let us consider the first state that is S0. So here initially all the states are written in the present state. So S0, S1, S2 and S3. Now consider the state S0. So if the present state is S0. Now if the input bit is 0 the next state is S0 only and the output is 0. So here the next state is S0 and output is also 0. Also consider again the same present state S0. Now the input is 1. So as soon as the input is 1 the next state is S1 and the output is 0. So that is why here when the present state is S0 when input is A1 the next state is S1 and output is 0. Again consider the present state as S1. So here in S1 if the input is 0 it will move to the S2 state that is the next state is S2 and also output is 0. So here in present state when it is S1 input 0 next state is S2 and output is 0. Again consider the same present state S1. Now if input is 1 so here the next state is the same state that is S1 and output is 0. So here next state will be S1 and output is 0. Again now consider state S2. In present state is S2 now if the input is 0 the next state is S3 and the output is 0. Similarly the table in the table will write the next state is S3 and the output as 0. Also in the S2 state if the input is 1 then the next state is S1 and output is 0. So thus when input is 1 in the present state S2 output is S1 and next state is 0. Now finally consider the S3 state. Now in S3 state if the input is 1 finally the output is 1 and the next state is S0. So here you can see as well as when the input is 0 the next state is again still S0 but the output is 0. So this is how it is written here. So S3 when input is 0 output is 0 finally when S3 input is A1 the next state is S0 and output is 1. So this is how based on the state diagram the state table for a sequence detector is obtained. Now pause this video and try to draw the state diagram and the state table to detect the sequence 111 using the Mealy model for this non-ovo lapping type. Well the answer is as shown. So this is the state diagram and the state table for the sequence 111 using the Mealy model. So hence we discussed how to draw the state diagram and state table for a sequence detector using Mealy model for a non-ovo lapping type. These are the references used. Thank you.