Question 1 Report
A turnstile at a sports stadium is modelled as a finite-state machine (FSM). It has two states: L (locked) and U (unlocked). A visitor can present a valid card, represented by input C, or try to push through, represented by input P. The turnstile output is either OPEN or CLOSED. The machine begins in state L. A valid card unlocks the turnstile. Once unlocked, another valid card leaves it unlocked; a push causes it to lock again.
The state code for L is 00. Complete the questions using the diagram and transition table.
| Current state | Input | Next state | Output |
|---|---|---|---|
| L | C | U | OPEN |
| L | P | ? | ? |
| U | C | ? | ? |
| U | P | L | CLOSED |
(a) State the two possible input symbols. [2]
(b) Identify the start state. [1]
(c) Complete the two incomplete rows of the transition table. [2]
(d) Complete the two-bit state code: U = __. [1]
(e) Convert the binary code for U into denary. [1]
(f) Give one suitable physical device that could detect a visitor pushing through the turnstile. [1]
(g) State the next state when the current state is U and the input is C. [1]
(h) Explain why an FSM is suitable for modelling this turnstile. [3]
(a) The input symbols are C and P [2].
(b) The start state is L, the locked state [1].
(c)
| Current state | Input | Next state | Output |
|---|---|---|---|
| L | P | L | CLOSED |
| U | C | U | OPEN |
A push while locked leaves it locked; a valid card while unlocked leaves it unlocked [2].
(d) The other two-bit state code is U = 01 [1].
(e) \(01_2=\textbf{1}\) in denary [1].
(f) An infrared beam sensor could detect a visitor pushing through [1].
(g) From U with input C, the next state is U [1].
(h) The turnstile has a small finite set of clearly defined states: locked and unlocked. Its next state and output depend on the current state and current input. Therefore states and transitions represent all its possible behaviour [3].
Everything you need to excel in your exams