Mr Spock is the highly logical Science Officer supporting the impulsive Captain Kirk at the helm of the star ship Enterprise in the long running TV and film franchise – Star Trek. I seem to remember him often saying, “But that is illogical, Captain” although I cannot find a single example.
Logic plays an important part in science, especially in electronics where logic is used to describe how some circuits work. There are two circuits in particular with which you should all be familiar. They are the AND circuit and the OR circuit. They are both decision making circuits that will do something when the correct conditions are satisfied.
AND Circuit
If you build a circuit that has two switches in series with a lamp, it is possible to draw up a Truth Table to describe every possible state that the circuit can be in.

There are four possible conditions for this circuit…
- Both switches are open
- the lamp is out
- Switch A is open and switch B is closed
- the lamp is out
- Switch A is closed and switch B is open
- the lamp is out
- Both switches are closed
- the lamp is on
This could be expressed in a table as shown below.

Now let’s replace open & off with 0 (zero) and closed & on with 1 (one). This is how the table now appears.

Can you imagine any uses for an AND circuit?
Use One – Bank Security
The two push switches are replaced with key operated switches and the lamp is replaced with a system for opening an electronic lock on a safe. The two keys belong to a Bank Manager and his Assistant Manager. Now the safe can only be opened when key A AND key B are used at the same time – just stealing one of them is not enough. Ha criminals, foiled by science!
Use Two – Car Safety
Switch A is connected to the gear stick of a car and switch B is a pressure sensor in the seat. The lamp is now a switch connected to the ignition system of a car. The car ignition will only work when the car is in neutral AND there is someone heavy sitting in the driver’s seat.
Double check that you understand everything so far. Don’t move on until you are comfortable with what an AND circuit is and how it behaves.
OR Circuit
The OR circuit is constructed slightly differently. Instead of the switches being in series they are now in parallel so either one of them can switch the output on.

The possible outcomes for the circuit are now…
- Both switches are open
- the lamp is out
- Switch A is open and switch B is closed
- the lamp is on
- Switch A is closed and switch B is open
- the lamp is on
- Both switches are closed
- the lamp is on
Here are the results in table form.
It is very easy to imagine uses for an OR circuit.
Use One – Fire Alarm
Replace switch A with a heat sensor and switch B with a smoke sensor. Replace the lamp with a loud bell. If there is too much heat OR there is smoke then the alarm will sound.
Use Two – Burglar Alarm
Replace switch A with a pressure pad near your back door and replace switch B with a motion detector inside the front door. The lamp could be a flashing light or loud siren. When either the pressure trigger OR the motion trigger are set off the alarm will sound.
You don’t have to limit yourself to just two switches (or input sensors). You could also combine series and parallel switches to make a circuit with a more complex truth table.
This has been a simple introduction to electronic logic. It is a way for electric circuits to make decisions based upon the circumstances. It is the basis of all modern electronics. Read it through again and ask if you don’t understand what is going on.
Questions…
- If the battery in the circuit above is 4.5 V, how many cells does it contain?
- What are the two properties of a circuit that affect the current that flows?
- What happens to the overall resistance of a circuit if you add lamps in series?
- What happens to the overall resistance of a circuit if you add lamps in parallel?
- How does the resistance of an LDR change with light intensity?
- Suggest a way in which an LED is different from a lamp.
Here is a brief clip of Mr Spock being logical.



Comments