

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Strike State Machine
You're designing a baseball scoreb oard. A sub-problem involves keeping track of strikes and fouls. A strike o ccurs when the batter swings at the ball and misses, or when the batter do es not swing at a \go o d" pitch. If a batter earns three strikes during his/her turn at bat, he/she is \out". A foul o ccurs when the batter hits the ball, but the ball do es not land in \fair" territory. Fouls are counted as strikes until the batter earns two strikes. Then fouls are ignored. The state diagram b elow captures these rules. The null input indicates neither a strike nor a foul o ccurred during that clo ck cycle. The strike and foul input cannot o ccur simultaneously, so the output for this case is don't care.
strikes
strike
strikes
strike /
strike /
foul /
strike / out
foul /
foul /
null /
null / null /
Part A Using the state diagram ab ove, complete the state table for this diagram. The inputs are strike, foul, and state bits S 1 and S 0. The outputs are next state bits N S 1 and N S 0 , and out.
S 1 S 0 str ik e f oul N S 1 N S 0 out 0 0 0 0
Part B Determine the simpli ed logical expression for N S 1 , N S 0 , and out using your state table in part A. Complete the Karnaugh maps b elow, identify the prime implicants, and express the result.
0
0
1 1
0
0
1 1
0
0
1 1
out =
Part C Implement this state machine using your expression from part B, plus two register cells. Use an icon for a one bit register cell. You do not have to show the implementation of a register here. Your logic should b e simpli ed.