Lab 13

Introduction to Logisim.


You *must* complete this assignment with at least 1 partner. Make sure that each of you understands all aspects of your solution. Check off will be done in partnerships.


Preparation

Click here to download and then run the Window's Logisim application. You can learn about Logisim beyond the scope of this lab from the Logism website.

Exercise 1: The Basics (Warm-Up)

Begin by creating a very simple circuit just to get the feel for placing gates and wires.

1. Start by clicking the "And Gate" button. This will cause the shadow of an And Gate to follow your cursor around. Click once within the main schematic window to place an And Gate.

2. Click the "Input Pin" button. Now place two Input Pins somewhere to the left of your And Gate.

3. Click the "Output Pin" button. Then place an Output Pin somewhere to the right of your And Gate. Your schematic should look something like this at this point:

4. Click the "Add Wires" button. Click and drag to connect the dots at the right side of the Input Pins to the left side of the And Gate. This will take several steps, as you can only draw vertical and horizontal wires. Just draw a wire horizontally, release the mouse button, then click and drag down starting from the end of the wire to continue vertically. You can attach to the And Gate anywhere on the left side.

Repeat the same procedure to connect the right side of the And Gate to the Output Pin. After completing these steps your schematic should look roughly like this:

5. Finally, click the "Change Values" button and try clicking on the Input Pins in your schematic. Observe what happens. Does this match with what you think an And Gate should do?

Exercise 2: Sub-Circuits

Much like C and MIPS programs can contain sub-procedures, a schematic can contain subcircuits. In this part of the lab we will create several subcircuits to demonstrate their use.

1. Create a new schematic (File->New) for your work.

2. Create a new subcircuit (Project->Add Circuit ). You will be prompted for a name for the subcircuit; call it NAND.

3. In the new schematic window that you see create a simple NAND circuit with 2 Input Pins on the left side and an Output Pin on the right side.

4. Go back to your "main" schematic by double-clicking "main" in the circuit selector at the left of the screen. Your original (blank) schematic will now be displayed, but your NAND gate has been stored.

5. Now, single click the word "NAND" in the list. This will tell Logisim that you wish to add your "NAND" circuit into your "main" circuit.

6. Try placing your NAND gate into the "main" schematic. If you did it correctly, you should see a gate with 2 inputs on the left and one output on the right. Try hooking up Input Pins and Output Pins to these and test if it works as you expect.

7. Repeat these steps to create several more subcircuits. In addition to NAND, create the following: NOR, XOR, 2 to 1 MUX, and 4 to 1 MUX. Do not use any built in gates from Logisim other than AND, OR, and NOT. However, once you've built a subcircuit, you may use it to build others.

Hint: Look at the lecture slides for a refresher on how to build these. You may want to consider using some of your custom subcircuits when designing the others.

Exercise 3: From Truth Tables to Schematics

Between lecture, your reading, and this lab, you now have all the tools needed to take a truth table and implement it in a Logisim schematic. Given the following truth table, complete the tasks below.

in1 in0 | out1 out0
0
0
|
0
1
0
1
|
1
0
1
0
|
1
1
1
1
|
0
0

1. From the truth table above derive the Canonical SOP (sum of products) boolean equations for out1 and out0. Write these equations down on a piece of paper.

2. Using the laws of boolean algebra (see the lecture slides or Baidu/Google for a refresher) simplify your boolean equations. Once you arrive at the simplest boolean equation you may want to check to see if your equations fit the pattern of any of our well-known gates.

3. Implement your simplified boolean equations in your "main" schematic in Logisim. Feel free to use any of the subcircuits you designed earlier if they would help. Also, label your input and output pins appropriately using the "Text" button.

Exercise 4:

Invent a final exam question based on this lab assignment that would test a student's understanding. Be creative. Provide the question, the solution, and all group member names, and e-mail it to finalquestions@gmail.com. Remember: if your question is good, it has a chance to be used on the final exam. Take some time to be creative and thoughtful.