Sunteți pe pagina 1din 2

Represent each of the following sentences with a BOOLEAN EQUATION:

1. The elevator door should only open id the elevator is stopped, it is level with the floor
and the timer has not yet expired, or if the elevator is stopped, it is level with the floor,
and a button is pressed.
Legend: logic 1 Elevator will open (Output, Z)
- Elevator is level with the floor (Input B)
- Timer is not yet expired (Input C)
- Button is pressed (input D)

logic 0 Elevator is stopped (Input A)

A B C D C AB C ABD Z=AB C + ABD = AB (C + D)


0 0 0 0 1 0 0 0
0 0 0 1 1 0 0 0
0 0 1 0 0 0 0 0
0 0 1 1 0 0 0 0
0 1 0 0 1 0 0 0
0 1 0 1 1 0 0 0
0 1 1 0 0 0 0 0
0 1 1 1 0 0 0 0
1 0 0 0 1 0 0 0
1 0 0 1 1 0 0 0
1 0 1 0 0 0 0 0
1 0 1 1 0 0 0 0
1 1 0 0 1 1 0 1
1 1 0 1 1 1 1 1
1 1 1 0 0 0 0 0
1 1 1 1 0 0 1 1

2. You should laugh at a joke if it is funny, it is in good taste, and it is not offensive to
others, or if it is told in class by your professor (regardless of whether it is funny and in
good taste), and it is not offensive to others.
Legend: logic 1 Laugh at a joke (Output, Z)
- Joke is funny (Input A)
- Joke is in good taste (Input B)
- Joke is told in class by the professor (input D)

logic 0 Joke is not offensive to others (Input C)

A B C D C AB C CD Z=AB C + C D = C (AB + D)
0 0 0 0 1 0 0 0
0 0 0 1 1 0 1 0
0 0 1 0 0 0 0 0
0 0 1 1 0 0 0 0
0 1 0 0 1 0 0 0
0 1 0 1 1 0 1 0
0 1 1 0 0 0 0 0
0 1 1 1 0 0 0 0
1 0 0 0 1 0 0 0
1 0 0 1 1 0 1 0
1 0 1 0 0 0 0 0
1 0 1 1 0 0 0 0
1 1 0 0 1 1 0 1
1 1 0 1 1 1 1 1
1 1 1 0 0 0 0 0
1 1 1 1 0 0 0 1
3. You should wear your overshoes if you are outside in a heavy rain and you are
wearing your new suede shoes, or if your mother tells you to.

Legend: logic 1 Wear overshoes (Output, Z)

- You are outside in a heavy rain (Input A)


- You are wearing your new suede shoes (Input B)
- Your mother tells you to (input C)

logic 0 Otherwise

A B C AB Z= AB + C
0 0 0 0 0
0 0 1 0 1
0 1 0 0 0
0 1 1 0 1
1 0 0 0 0
1 0 1 0 1
1 1 0 1 1
1 1 1 1 1

S-ar putea să vă placă și