09/25/2006

A student writes: Dear prof Patt, Which exact diagram are you expecting for question 3? A block diagram, a state diagram or maybe a combinational logic circuit? They're all easy but I would like to know which one you want. My friend <<name witheld to protect the excuse>> is bugging me because he does not understand which one is needed for the homework problems. Please help me calm his anxiety so that he will be able to sleep at night. Thanks for your cooperation and have a great day. <<name withheld to protect the compassionate Friend of *****'s>> Actually, any of the above is fine. But now that you ask, I prefer a state diagram, with each state being a circle, arcs show transitions from current state to next state, outputs are contained inside the states, and the input that takes one from the current state to the next state is labeled on each arc. ...like we did in class today. That is the easiest for you to draw, the most intuitive for you to see what is going on, and the easiest for the grader to see if there are any mistakes in your state machine. By the way, there are two models of a finite state machine. The one we used in class, where the output is associated only with the state is called a Moore model. The other one, called a Mealy model, is where the output is associated with the state and the current input. I like to use the Moore model but there is no right and wrong model. You are not expected to memorize these names Moore and Mealy in this course. Example: Suppose I wish to construct a finite state machine that counts 1's and 0's inputs, outputing a 1 whenever the count is even. The state diagrams (preferred representations are shown below). Please forgive the very primitive drawings. We will post a much pretty version in the email archives. Moore Model: Mealy Model: Good luck with your friend. I hope he is now able to sleep. Yale Patt