The following cases are presented to illustrate various combinatorial logic problems, and possible solutions. It is recommended that you try to satisfy the description before looking at the solution.

Problem: Develop a program that will cause output D to go true when switch A and switch B are closed or when switch C is closed.

Figure 5.1 Sample Solution for Logic Case Study A

Problem: Develop a program that will cause output D to be on when push button A is on, or either B or C are on.

Figure 5.1 Sample Solution for Logic Case Study B

Problem: Develop Ladder Logic for a car door/seat belt safety system. When the car door is open, and the seatbelt is not done up, the ignition power must not be applied. If all is safe then the key will start the engine.

Figure 5.1 Solution to Car Safety System Case

Problem: Design a motor controller that has a forward and a reverse button. The motor forward and reverse outputs will only be on when one of the buttons is pushed. When both buttons are pushed the motor will not work.

Figure 5.1 Motor Forward, Reverse Case Study

Consider the design of a burglar alarm for a house. When activated an alarm and lights will be activated to encourage the unwanted guest to leave. This alarm be activated if an unauthorized intruder is detected by window sensor and a motion detector. The window sensor is effectively a loop of wire that is a piece of thin metal foil that encircles the window. If the window is broken, the foil breaks breaking the conductor. This behaves like a normally closed switch. The motion sensor is designed so that when a person is detected the output will go on. As with any alarm an activate/deactivate switch is also needed. The basic operation of the alarm system, and the inputs and outputs of the controller are itemized in Figure 5.1 Controller Requirements List for Alarm.

Figure 5.1 Controller Requirements List for Alarm

The next step is to define the controller equation. In this case the controller has 3 different inputs, and a single output, so a truth table is a reasonable approach to formalizing the system. A Boolean equation can then be written using the truth table in Figure 5.1 Truth Table for the Alarm. Of the eight possible combinations of alarm inputs, only three lead to alarm conditions.

Figure 5.1 Truth Table for the Alarm

The Boolean equation in Figure 5.1 A Boolean Equation and Implementation for the Alarm is written by examining the truth table in Figure 5.1 Truth Table for the Alarm. There are three possible alarm conditions that can be represented by the conditions of all three inputs. For example take the last line in the truth table where when all three inputs are on the alarm should be one. This leads to the last term in the equation. The other two terms are developed the same way. After the equation has been written, it is simplified.

Figure 5.1 A Boolean Equation and Implementation for the Alarm

The equation and circuits shown in Figure can also be further simplified, as shown in Figure 5.1 The Simplest Circuit and Ladder Diagram.

Figure 5.1 The Simplest Circuit and Ladder Diagram

Figure 5.1 Alarm Implementation Using A High Level Programming Language