# In Example 9.3, include the additional Boolean variable that for

In Example 9.3, include the additional Boolean variable that for actuation of the warning light, “the driver’s door must be closed” (Ddoor is true if the driver’s door is closed).

Example 9.3

Suppose we want to find a Boolean expression for the truth of the statement “W = The seat belt warning light should be on in my car,” using all of the following Boolean variables:

Case 1:

D is true if the driver seat belt is fastened.

Pb is true if the passenger seat belt is fastened.

Ps is true if there is a passenger in the passenger seat.

Case 2: For actuation of the warning light, include the additional Boolean variable:

M is true if the motor is running.

Need: W = ?

Know–How: Put the W variable on the left side of an assignment sign W ¼ and then array the variables on the other side of the assignment sign.

Case 1:

a) Put D, Ps, and Pb on the right side of the assignment sign. Thus, the temporary (for now, incorrect) assignment statement is W = D Ps Pb.

b) Connect the variables on the right side with the three logic symbols ∙, +, and 0 so that the relationship among the variables on the right side correctly represents the given statement.

A good way to do this is simply to put the symbols the way they should appear in the if statements. For example, since part of the if statement Pb contains the words “the passenger’s seat belt is fastened,” it should also contain a “not.” The corresponding logic variable will appear as Pb 0. Also, you only care about the passenger’s seat belt if the passenger is sitting in the seat; that is the intersection between these two variables.