CSE-100: Computer Technology and its Impact on Society
Computer Science and Engineering
University of Pennsylvania
Fall Semester 2003
Matt Huenerfauth.
September 19, 2003
You can download the slides from lab 02 from here.
They in PowerPoint format.
During the demonstrations in laboratory 2, we used a logic gate simulation program called LogSim. You can perform these activities on your home computer - your web browser can download and run the LogSim program for you.
Now, go to this web address. When a window pops-up and asks if you want
to install and run "LogSim," click yes.
http://www.math-cs.gordon.edu/courses/cs111/module7/logic-sim/example1.html
Now, you can build circuits out of logic gates.
To Save or Load the diagrams we saw in class...
First, right click on these two links, choose "Save Target As...,"
and save the files onto the Desktop of your computer. These files can be
loaded and viewed using the LogSim program.
exclusiveor.logic - The starting point for the
circuit we will build.
halfadder.logic - Shows how to build a single
column adding circuit from logic gates.
halfadder-simple.logic - Same as above, but uses a pre-built Exclusive Or gate.
...now use the buttons at the bottom right of the screen...
Use "OPEN" button on LogSim to open one of the files you saved to the
Desktop.
Use the "SAVE" or "SAVE AS..." buttons to save any new
circuit you build.
If you want to see these circuits run, you have to press the "Running
Man" icon, then you have to click on the switches connected to the circuit
to turn the power on and off to the circuits. You will see the lightbulbs
light-up (turn green) when there is power coming out of the circuits. When
there is power running over a wire, you will see that the wire also turns green.
To Build, Run, or Erase a Circuit...
The Buttons at the Bottom Left of the Screen to control the "mode" of
the LogSim Program.
Press the appropriate button to enter that "mode" of the program.
Use the "HAND" mode to drag parts from the panel on the left onto
the workspace on the right.
Use the "WIRE" mode to draw wires to connect the black dots between
parts.
Use the "RUNNING MAN" mode to play with your circuit by turning on/off
switches and seeing if lightbulbs light up. You must press the
running-man button before you circuit will work!
Use the "SCISSORS" mode to erase circuits from your workspace.
Use "CLEAR ALL" to erase your workspace.
How all the Circuit Parts Work...
Look at the Parts on the Left Panel:
The "AND," "OR," and "NOT" work just like we
saw in class.
The "NAND," "NOR," and "XOR" are logic gates we
did not learn in class.
The "SWITCH" can be used as a power source for your circuits that you
can turn on and off.
The "CLOCK" is like an automatic Switch that will turn itself on and
off over time.
The "TERMINAL" is like a switch that is always on.
The "LIGHT" is lightbulb that you can connect to the output of your
circuit to see whether it is on or off.