## Monday, May 11, 2009

### State Diagrams

I was in my Computer Logic and Design class and was noticing something about figuring out how to setup a sequence recognizer for an equation of the form xk+z, on our last test we had the equation 4k+3, now that just plain had me stumped. Apparently the teacher had gone over a similar problem in class, but either I had not attended that day, or well I think I might have ADD because I don't think I've actually managed to follow along for an entire class ever. Back to the point of the post.

We got the answer guide and I noticed something there were 4 states, the question went something like this:
Create a state diagram of the following equation: 4k+3, for example when you have gotten 3 1's you will output a 1, then when you get 4 more 1's you'll get a 1...so on and so forth

This started a connection, because she showed that we would look at the states as the following,
Zero 1's at 4k + 0, k=0,1,2,3,4... OUTPUT 0
One 1 at 4k + 1, k = 0,1,2,3,4... OUTPUT 0
Two 1's at 4k + 2, k = 0,1,2,3,4... OUTPUT 0
Three 1's at 4k+3, k = 0,1,2,3,4... OUTPUT 1 So I thought to myself well then if you have z (from 4k+z) then you must need z+1 states,