Search for question
Question

1. You have an interview on the third floor of the

Amazon building. To get to the third floor, you need to take

an elevator. You knew that in the interview, they were going

to ask you about an FSM problem, so you decided to practice

using that elevator as an example. The building has a total of

4 floors (Hint: those will be your different states): Ground

level, 1st floor, 2nd floor, and 3rd floor. Inside the elevator,

you can press either UP (which takes you one floor up) or

DOWN (which takes you one floor down), meaning that there

are only 2 buttons (Hint: your input will need to be 1 bit to

express those 2 options, you can call it "A"). The Amazon

employees knew you were coming to the interview, so they

put up a digital sign that will say: "Far" when you are on the

Ground level and on the 1st floor, "Very close" when you are

on the 2nd floor, and "Arrived" when you are on the 3rd floor

(Hint: your output can be 3 different things which means you

will need 2 bits to express it when using binary encodings,

you can call them "X" and "Y").

Write:

- The state transition diagram

- The state transition table

- The state transition table with binary encodings (show

what each thing means, for example, State0 => 2 bits

S, S=00)

- Equations for the next states and outputs

- Simplify those equations if you can

- The state machine circuit