# State Diagrams and State Tables!

Discussion in 'Homework Help' started by Ryan2, Jul 23, 2015.

1. ### Ryan2 Thread Starter Member

May 29, 2015
31
0
Hello, I'm just starting an electronics course and having some serious difficulty(at least for me) working out state diagrams and state transition tables from looking at state table with given conditions!

The question I'm facing a real problem in, is as following:
Input: In every "t"(time) you have bit x(t).
output: In every "t"(time) you have also bit Y(t).
We have given conditions which are:
for every t:
if x[t:t-2]=111 or x[t:t-2]=010
=> Y(t)=1.
else:
Y(t)=0.

questions's parts: (appearing in the attachment below)
http://postimg.org/image/3vf3h5nmh/
Supposing in this question that x(-1)=x(-2)=0.
I think I have part (a) right -
a) The complete values for the state table is all "0".
However.. Parts (c),(b), and (d) have confused me and couldn't solve them properly even don't know how to initialize in solving them,

the challenge part for me is part (b), I dont know how to go from the state table to the state diagram in this pattern of questions! .

I would really appreciate any guidance you guys could offer me, and would really the answers help me in progress more than you imagine, thanks beforehand!.

Last edited: Jul 24, 2015
2. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
I'll try to get you started. I, S1 and S2 are states. This is not complete.

Code (Text):
1.
2. I ---x=1---S1---
3. |
4. x=0
5. |
6. S2
7. |
8.

Ryan2 likes this.
3. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
You need to show your best attempt to work your homework problem. You don't have to get it right, but we need to see where you are going right and where you are going wrong.

4. ### Ryan2 Thread Starter Member

May 29, 2015
31
0
Alright, I've solved the first part "a" and the completion of this state table is, all its values are "0", and that's completely right according to what the conditions illustrate...
lets start step by step tho-
The second part- determining the states, how actually can I determine? what I think is, because we have three conditions above (including if/else statement) then we should have those three states: 000, 010, 111 . I'm not sure about what I'm saying....

Last edited: Jul 24, 2015
5. ### Ryan2 Thread Starter Member

May 29, 2015
31
0
ofc, I prefer that.

6. ### Ryan2 Thread Starter Member

May 29, 2015
31
0
didn't get you, if you are talking about the state table's completion then I've already solved the first part "a", my whole problem is actually the transmission from this state table to the state diagram-I've no idea exactly how to.

May you complete what you're talking about and illustrate your solving?? maybe I misunderstood you.

Last edited: Jul 24, 2015
7. ### Ryan2 Thread Starter Member

May 29, 2015
31
0
I've tried to transmit from the state table to the state diagram, that's my trying : (see the photo below)

I guess that's completely wrong and I'm saying that because while analyzing between the state table to the state diagram, I faced illogical steps.

May 29, 2015
31
0
any help?

9. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
It was supposed to be the beginning of a sate diagram.

10. ### Ryan2 Thread Starter Member

May 29, 2015
31
0
May you solve it? maybe you've another method of solving which I can find easily the states through.
thanks.

11. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Patience! Not everyone here has nothing better to do than sit around waiting eagerly to respond to your post. While this is definitely an international forum, a large fraction of the active members are in the U.S., so posting at 3am give or take is unlikely to promote rapid responses since some of us need to sleep at least at some point.

Your state diagram shows only two states. It appears that your state transitions are along of the lines of wanting to take three bits at a time. This reveals a pretty fundamental lack of what a state diagram -- or a state machine for that matter - actually is.

A "State" is a condition that tells you all you need to know about the entire history of the input stream up until that point. So, for instance, if you are in state "Fred" then you might know that the last input that was seen was a 0, that the one before that was a 1, and that the one before that was a 0. On the other hand, if you are in state "Sue" then you might know that the last input was a 1 and the one before that was a 0 and the one before that was also a 0. That's all they tell you -- the important things about how you got to be where you are right now. At any given time you will be in a particular state and, upon getting the next single input bit, you have to decide which state you will transition into next (which might be to the same state). So, for instance, if you are in state "Sue" and you next get a 0, you need to transition to a state that tells you that the most recent three bits you have received at a 0, preceded by a 1, preceded by a 0. But since that is precisely what being in state "Fred" would tell you, then you know you need to transition to state "Fred".

Does that help at all?

12. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
No. We have a pretty firm policy of NOT doing your homework for you. Usually the only exception we make is when you want us to submit the solution on your behalf directly to your instructor. If you don't think your instructor would be okay with that, then they probably would not be okay with you even asking someone else to give you the solution.

13. ### Ryan2 Thread Starter Member

May 29, 2015
31
0
I already have submitted my solution(I give a try not exploiting any one).

14. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
And feedback has been given regarding that solution. So now you take that feedback and try to make a better solution and post that here.

This is an iterative process. Just giving you the solution will not actually help you. Figure that you have already seen how to work similar problems, hopefully in both your text and in class, and that something hasn't quite gotten through. So seeing yet one more problem worked by someone else is unlikely to do the trick. Worse, it will probably make you THINK that you understand more than you really do, which will come back to bite you on the exam and in later courses and once you are out of school and in the workplace. You are at the stage where, to really understand this process, YOU have to fight and struggle with it. Our job is to help you make small moves forward when you are stuck. Those moves need to be small because those are where your weaknesses are exposed and having use talk you through those specific sticking points are how you are most likely to have an, "Ah Hah!" moment of comprehension (or, as is often the case, for you to have it yourself as you try to work the problem from where we have gotten you). It can be a slow process, but it is a process that works. The more effort you put in to get as much further down the road each iteration, the faster the whole process goes.

Feb 5, 2010
3,850
965