Pre-class Assignment

Complete participation activities for 12.1–12.3.

Announcements

Learning Objectives and Outcomes

In this lecture you will:

By the end of this lecture you should be able to:

Lecture Content

Wrapping Up The Seatbelt Counter Example

Example: Design a system for an automobile that counts the number of times the car was put into drive (A0 is 1) while the driver's seatbelt was not fastened (A1 is 0). Once the car starts driving, do no further counting until the car is taken out of drive (A0 is 0). While the car is not in drive, a mechanic can view the count by holding a button (A2 is 1) causing the count to appear on B. B is normally 0.

notInDrive state table:

A0 (car in drive) A1 (seat belt) A2 (button) State transition
0 0 0 notInDrive
0 0 1 viewCount
0 1 0 notInDrive
0 1 1 viewCount
1 0 0 increment
1 0 1 increment
1 1 0 inDrive
1 1 1 inDrive

This can be expressed as the following set of transitions: