For convenience the SMs in this material use a condition named other to

# For convenience the sms in this material use a

• Homework Help
• 13

This preview shows page 9 - 12 out of 13 pages.

For convenience, the SM's in this material use a condition named other to indicate the transition that should be taken if none of the state's normal transition conditions are true. Remember that transition conditions are expressions, not statements, so should not end with a semicolon. For each, write the most direct answer, e.g., write "A0 and A1 are true" as A0 && A1 (in that order, without parentheses, without == 1, etc.) Questions: 1. Write the condition for a transition that should be taken if either A0 or A1 is true. A0 || A1 2. Write the condition that detects that A is greater than or equal to 99. A >= 99 3. Write the condition that detects that A2A1A0 is 010. Use individual bit variables A2, A1, A0. !A2 && A1 && !A0 4. A designer intended to have one transition taken if A0 is 1; otherwise, a second transition is taken if A1 is 0 and a third taken if A1 is 1. The designer wrote the conditions !A0, ! A1, and A1. Fix the second condition.

Subscribe to view the full document.

HW2Z2 EEL 4730 RVC Name: Tristan S. Shadd-Simmons ID: 6169148 !A0 && !A1 5. A designer intended to have one transition taken if exactly one of A0 or A1 is 1, and a second transition taken if both are 0s. The designer wrote the conditions as(A0 && !A1) || (!A0 && A1) and as !A0 && !A1. A third transition is missing; write its condition.
HW2Z2 EEL 4730 RVC Name: Tristan S. Shadd-Simmons ID: 6169148 A0 && A1 6. A designer has two transitions leaving a state. One transition's condition is (A1 || A2 || A3). The second transition's condition is "other". What expression does the other represent? Write the expression with the fewest changes to the first expression. !(A1 || A2 || A3) 7. A designer has three transitions leaving a state. One transition's condition is (!A0 && !A1). A second transition's condition is (A0 && A1). A third transition's condition is "other". What expression does the other represent? Start with: !((!A0 ... Don't try to simplify. !((!A0 && !A1) || (A0 && A1)) The earlier state machine model associate’s actions with states only, known as a Mooretype state machine. A Mealy-type state machine allows actions on transitions too. A Mealy-type SM can make some behaviors easier to capture. The Mealy SM increments on the transition that detected the rise, and thus avoids the need for a separate state. Note that Mealy actions are shown graphically following a transition's condition and a /. A Mealy action occurs at which point during an SM tick? Mealy actions are associated with transitions. If taking a transition, the condition must have been true. Can a Mealy action include an if-else statement? Mealy actions have no extra limitations compared to state actions. Even a loop is allowed (that doesn't wait on external events, of course). Integer variable X is 0. A transition with action X = X + 1 points to a state with action X = X + 2. If that transition is taken during an SM tick, what is X after the tick? During the tick, the transition is taken, and its action executed (setting X to 0 + 1, or 1), and then the next state is entered and its action executed (setting X to 1 + 2, or 3).

Subscribe to view the full document.

• Fall '13

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes