1. Goals for this week:
2. Logisim setup
See the Logisim Install page for instructions on how to set up Logisim on a your personal computer.
3. Starting point code
You can download the a sample firstcircuit.circ file to your computer for the demos. Use right click and save as, or cmd click on OSX if the file opens in the browser. Save the file to a folder you can easily access such as your desktop, your home directory, etc.
4. Preview Notes
We will talk much more about logic gates and their connections to binary arithmetic in the next couple of class lectures. For today’s in lab exercise, a few slides will suffice.
5. Learning Logisim
For this lab, we’ll be using Logisim to
create and test digital circuits using the logic gates (
etc.) we’ve been talking about in class.
We will start by demo’ing some the basics of Logisim (adding gates, inputs, and outputs) by implement a simple circuit. You and your partner will next run through the Logisim tutorial to create an XOR circuit.
firstcircuit.circwith Logisim. You can do this by starting logisim then going to the File→Open menu and navigating to the folder containing the
Together, we are going to implement a 1-bit circuit that computes
(X AND Y) OR X, and we will add some tester circuitry around it.
After we try this out together, you can double click on "firstcircuit" circuit and see my solution to each step.
Next, we will create a new circuit interface to the circuit we just built. add this new circuit to a tester circuit containing some tester functionality. (details about creating sub-circuits are in the "Subcircuits" part of the Logisim User’s Guide).
Let’s first create a new circuit by choosing Project→Add Circuit, and entering the name of the new circuit:
1-bit X. You should now see 3 circuits in the subcircuits folder:
Copy your circuit into the new
1-bit Xwindow. Only include the input and output (do not include the counter or clock parts). Add two inputs and the single output, and add labels to each (X, Y, 1-bit X). And you can add probes to the inputs if you’d like.
Next, select the
1-bit Xcircuit and add a label for it:
Finally, lets add a new tester circuit (
Project→Add Circuit) Add your
1-bit Xcircuit and add some inputs and outputs to the circuit. If you hover with your mouse over the input and outputs, you will see their labels. You can also add a counter and a clock to test.
5.2. Advice on Using Logisim
Save your changes frequently. Occasionally Logisim freaks out and you need to exit Logisim and restart it. If you have saved your changes as you go, you will not lose your work if this happens.
Logisim will run very slowly if you are remotely logged in due to X-forwarding events (i.e., using ssh -Y on Mac or Linux to enable X-forwarding).
6. Lab 3 Assignment
Next, let’s look over the Lab assignment and then get started on it!
After I talk through the assignment, you and your partner should start by
running through the
Logisim tutorial: Beginner’s Guide to build
XOR gate using only
NOT gates (plus inputs and
outputs). Build your gate as a new component that you
can then deploy in main.