Courses
Wayne State University
College of Lifelong Learning
Interdisciplinary Studies Program
Computers and Society courses, Winter 2001
    ( http://www.cll.wayne.edu/isp/drbowen/casw01)

Mondays, 6 - 9:40 PM in 113 Rackham
Bullet1.png (242 bytes)Computers and Society
    GST 2710, Section 988, Call Number 95241, 4 credits

Bullet1.png (242 bytes)Computers and Society
    AGS 3360, Section 983, Call Number 98319, 4 credits

Office hours: Mondays 4 - 6 PM in 113 Rackham


                         Instructor

David R. Bowen
2311 A/AB
Wayne State University
Detroit, MI 48202
Daytime tel: (313) 577-1498
Evening tel: (248) 549-8518
FAX: (313) 577-8585
Home Page:
    http://www.cll.wayne.edu/isp/drbowen

Email: d.r.bowen@wayne.edu

CASicon.gif (1333 bytes)
Last updated: 2/25/01
Link back to course Welcome...

Worksheet: Doing Binary Arithmetic With Switches

switch.gif (556 bytes)
We start with a simple electrical circuit with a battery, a switch A and a light bulb C, as in the figure above.


switch1.gif (579 bytes)
With the circuit shown, if the switch is up, there is a complete path for the current, the current flows, and the bulb is on. Test the existence of a complete circuit by starting out from the "+" battery terminal - the one with the little bump on the end, and tracing around with your finger. The switch, "A", has a pivot or joint (the little circle at the left), two contacts (the upper and lower little circles on the right) and a switch element (the straight line, which pivots at the joint and is in contact with either the uppor or lower contact). The switch provides a current path from the pivot to whichever contact the switching element is touching. Electricity, and your finger, can pass right through the pivot and contacts, but cannot jump between them - it can only take the path laid out by the switching element. If you can find a complete path with no gaps, then there is a complete circuit.


switch0.gif (563 bytes)
For the circuit shown, if the switch is down, there is no path for the current, current cannot flow, and the bulb is off. Here, there is a gap when your finger reaches the end of the down-pointing switch; there is no path from there to the rest of the circuit on the right side.


In binary notation, if switch A is down, we will call that a zero; up and we will call it one. If bulb C is off, we will call that zero; on and we will call it one. The table below, that illustrates this, is called a "truth table." This is because, in logic, zero is frequently associated with False and one with True.

A C
0 0
1 1

Fill out the truth table for the switch combination below. Now there are two switches, A and B, and either one can be up (1) or down (0, for a total of four combinations. Frequently there are switches at the top and bottom of a set of stairs, wired in this parallel combination. If the light is off, flipping either switch turns the light on. Similarly, if it is on, flipping either switch turns it off. NOTE: In this style of electrical diagram, wires cross without making electrical contact.
parallel.gif (672 bytes)

A B C
0 0  
0 1  
1 0  
1 1  

Now fill out the truth table below for binary addition (C = A + B)

A B C = A + B
0 0  
0 1  
1 0  
1 1  

Homework:

Below there are two switches, A and B, wired in a combination known as "series." Fill out the truth table for this arrangement. As before, either switch A or switch B can be on or off, making for a total of four combinations. This combination is used, for example, for a car radio, where both the ignition switch and the radio switch have to be on, in order for the radio to be on.
series.gif (612 bytes)

A B C
0 0  
0 1  
1 0  
1 1  

Now fill out the truth table below for binary multiplication (C = A x B)

A B C = A x B
0 0  
0 1  
1 0  
1 1