SPSU WebMark

Electric Circuits

School of Computing and Software Engineering
Southern Polytechnic State University
Copyright © 2000, 2002 by Bob Brown

 

A Simple Electric Circuit.

We want to use binary numbers in computers because it is easy to build electronic circuits that can reliably distinguish between two states. In order to understand how electronic components can compute Boolean functions and ultimately form a complete computer, we need to understand the concept of an electric circuit.
Figure 1. An electric circuit. Click on the switch to open or close it.
Figure 1 shows a simple electric circuit. The stylized symbols represent a battery, a switch, and a lamp. The lines represent wires. A diagram that uses stylized symbols such as these is called a schematic diagram. The symbols used in schematic diagrams and the digital logic diagrams we will work with later have been standardized to make it easier for us to communicate.

In order for electricity to perform work, such as lighting a lamp, there must be a complete path from the power source through the parts of an electrical appliance and back to the power source.

In the schematic diagram of Figure 1, the switch is initially shown in the open or off position. There is a path from the battery (the power source) to the switch, and from the switch to the lamp and back to the battery. However, there is no path through the switch. Because the switch is off, the path is interrupted and no current flows. Click on the switch to close it.

When the switch is closed, the path is completed, current flows, and the lamp lights. The necessity for a complete path is why we call this a circuit. In case you are wondering about real-world applications, the diagram in Figure 1 is a good representation of how a flashlight works.

 

Electric Circuits Can Represent Boolean Functions.

It is possible to arrange switches in an electric circuit to represent Boolean functions. We will consider two possible arrangements before we leave mechanical switches and turn to transistors for our circuits.
Figure 2. An electric circuit with two switches in series is similar to the Boolean AND function.
In Figure 2 there are two switches arranged one after the other. For current to flow and make the lamp light, both switches must be closed. If either is open, the path through the circuit is not complete. Two switches arranged in this way are said to be in series.

You can experiment with this circuit by clicking on the switches. The lamp lights only when both switches are closed.

Notice that this circuit is like the Boolean AND function. Both the left switch and the right one must be closed before the circuit is completed and the lamp lights.

Consider the circuit in Figure 3 There are still two switches, but they are arranged differently.

Figure 3. When the two switches are in parallel, the circuit is similar to the Boolean OR function.
Note that closing either the upper or the lower switch will complete the path through the circuit and cause the lamp to light.

Experiment by closing first the upper switch by itself, then the lower switch by itself. Trace the path of the circuit when one of the switches is closed.

What do you expect happens when both switches are closed? Try it and see. The lamp lights because electricity is flowing through both possible paths.

When switches are wired this way, they are said to be in parallel. A circuit with two switches wired in parallel is like the Boolean OR function. The circuit is completed when one of the switches or the other is closed, or when both of them are closed.

Simplifying Circuit Diagrams with Abstraction.

Representing circuits using the schematic symbols in the diagrams above takes a lot of space and presents unnecessary detail. We don't really need to see the filament and the bulb of the lamp. We just need to know whether it is on or off. Similarly, we don't need to see the mechanics of the switch, we just need to know whether it is open or closed. Suppressing unnecessary details is called abstraction. Abstraction lets us focus on the important points of a problem without being distracted by the details.

In the circuit in Figure 4 the switch is represented by a pushbutton.

Figure 4. The switch is replaced by a pushbutton and the lamp by an LED.
Pushing the button once closes the circuit. Pushing it again opens the circuit. The center of the button changes from grey (open) to red (closed) to indicate the state of the curcuit. The lamp is replaced by a representation of a light-emitting diode, or LED. Click on the pushbutton to make it change state.

In many cases, we can abstract a circuit still further. Every electric circuit requires a connection to a power source and a return to the power source.

Figure 5.
Since we know these elements must be present, we can omit them from the diagram. All that's left in the picture is the pushbutton and the LED, as shown in Figure 5. The reduction in size of the diagram will be an advantage as we build more complex circuits.

If you have downloaded Digital Works, you can "wire up" the circuit in Figure 5. Digital Works omits the power source and return wires as we have done here.

In the next section we will see that transistors can function as switches and can be wired in series or parallel to compute Boolean functions.

 


Click here to provide comments and feedback on this Web Lecture.

Table of Contents Next: Transistors and Gates

Originally published: 2000-07-20


Last updated: 2012-10-21 16:34