Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What does the state machine do after simultaneously pressing \'Dispense\' and in

ID: 2266591 • Letter: W

Question

What does the state machine do after simultaneously pressing 'Dispense' and inserting a second coin?

A. Hot chocolate (no marshmallow) will be dispensed

B. Hot chocolate with marshmallow will be dispensed

C. The system will stay at state 'Slct' until either one of the two is activated again

D. This is an example of an incompletely specified state graph. The result is unknown.

Coin' One coin vends hot chocolate, two coins vend hot Start chocolate plus marshmallow Tmr: Detects the completion of the Timer; Coin: detects a coin drop; Dispense: RstTmr Resets the timer and starts it running; HotChoc dispenses Hot Chocolate; Marshmallow dispenses a marshmallow detects the Dispense button being pressed Tmr RstTmr Sict Coin Tmr Dispense Tmr Ma Marshmallow HotChoc mr RstTmr

Explanation / Answer

A FSM running on a clock of few Khz/Mhz can esily detect a minute difference in timing of two simultaneous inputs. Still as per the question if "Dispense" and "coin" are pressed together then :

D. This is an example of an incompletely specified state graph. The result is unknown.

"Dispense" and "coin" are mutually exclusive inputs and should not occur at a time. Hence (Dispense.Coin') input should transit from "Slct" state to "Chc" state and similarly (Dispense'Coin) input should transit from "Slct" to "Ma" state.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote