In this experiment, you will explore the notion of combinational circuits and basic combinational design.
Circuit diagrams for all 3 circuits with pin numbers labeled. A verbal description of the function of the final circuit. A truth table for the first function (the light controller).
Consider the problem of constructing the logic for a light controller for a room in a house. The following features are desired:
The light should come on if:
The last item requires further explanation. First of all, how is the system going to know if a person is in the room? One or both of two methods could be used:
Either of these could be set up to produce a binary 1 at the output if a person is detected.
The auxiliary switches mentioned would be the regular wall switches as found in most houses. If we assume that the room has two doors, it is convenient to have a switch by each door. In the usual set up, if both switches are up or both are down, the light is off. The light only comes on if one switch is up and one is down, thus allowing the light to be cut on or off from either switch no matter what the state of the switches is. In our case, not only must one switch be up and one down, but a person must also be detected for the lights to come on (unless one of the other conditions [e.g. the Burglar Alarm] cuts them on). Note that the person detector will probably have a timer which keeps the output high for a short time (maybe a few minutes) after a person is detected. Basically, what we need is a circuit which will cut the lights on if
The Burglar Alarm is on OR · the Master Switch is on OR · a person is detected AND one but not both auxiliary switches is up.
Let's assign some variable names to the various switches and such so that we can write an equation to describe the desired binary function.
Let Burglar Alarm = B Master Switch = S Person Detector = P Auxiliary Switches = S1 and S2
Note that the condition of S1 and S2 necessary to activate the lights is an exclusive OR function (one but not both). Using the EXOR symbol ,Å, we can now write the complete function
fL = B + Sm + P (S1 ÅS2)
We can draw a circuit for this function in the following manner:
|
In lab, we will wire the output directly to one of the lights (LED's) since these require only 5 Volts DC.
One immediate problem is the lab of a 3-input OR in your kit. You can, however, make a 3-input OR from two 2-input OR's. How? Hint: the OR operation is associative; i.e.
A + B + C = (A + B) + C.
Connect this circuit and check to see that it works. Use the two left switches for S1 and S2, the next switch for P, and the right most switch for Sm. Use one of the pulsers for B, making certain to use the pin that goes high when the button is depressed. Have your instructor verify the count.
It's possible to implement this same function using only AND, OR, and NOT gates. Using Boolean Algebra,
fL = B + Sm + P (S1 ÅS2)
= B + Sm + P (S1' S2 + S1S2')
= B + Sm + P(S1'S2 + S1S2')
Draw a diagram for this circuit, showing how to use 2-input AND gates to make the 3-input AND's. Wiring and checking this circuit is optional.
Now that we have looked at a real life example, let's look at an arbitrary function to see how we might realize it. Rather than specifying the logic with words as in the previous example, we will use a truth table. This will be a function of 4 variables (A,B,C,D), thus the truth table will have 16 entries.
| A | B | C | D | f |
| 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Using your skill with Boolean Algebra, we can right an equation for this expression and simplify it to Minimal Sum of Products Form, giving you:
f = B'D' + A'B'C + ABC + CD'
Draw a circuit for this function using only AND, OR, and NOT gates. You need two 3-input AND gates and one 4-input OR gate. All you have available are 2-input gates, thus you must discover how to make
Remember that both AND and OR operations are associative.
Wire this circuit and have the lab instructor verify its funciton.