Download Logisim if you haven’t already!
The Logisim Interface
When you run Logisim, it looks like this:
On the top is the toolbar. The folders hold all the parts you can put in your circuit. The circuit view is on the right. The bottom left is the properties panel where you can change properties of parts in the circuit.
These two tools are the ones you’ll be using more than anything else:
The hand is the poke tool. It’s used for looking at your circuit, changing inputs, and pushing buttons, but you can’t change the circuit with it.
The arrow is the edit tool. This is what you change your circuit with. You can select things, move them around, copy and paste them, all kinds of stuff.
There’s also the text tool, the A to the right of those. You can use it to make “comments” on your circuits. It’s a good idea!
Chances are, everything is really tiny. In the bottom left corner, you’ll find the zoom control.
Zoom in. You’re welcome.
Inputs and outputs
To the right of those 3 tools, you see:
These are shortcuts for the input and output components. The square is an input, and the circle is an output.
Note: Inputs and outputs are not interchangeable. To keep things straight, I like to put all my inputs on one side - like the left - and all my outputs on the other. Then if you have an output where you should have an input, it will visually stand out as being incorrect.
Click the button, then click in your circuit to place it. Put one input and one output, like this:
You’ll see they have dots on their sides. Those are the pins, where you can connect wires.
Click and drag from the pin on the input to the pin on the output to connect them with a wire.
Now switch to the poke tool and poke the input (square). This will toggle it between 0 and 1.
This is the most exciting circuit. 😴
Making a real circuit
Use the edit tool to drag a box around everything to select it, and hit delete on your keyboard to get rid of it.
Place 3 inputs and 1 output. You can give an input or output a name by clicking it, and then editing the “Label” in the properties. Name the three inputs
Op, and the output
Now select the
B inputs and the
Out output. You can select multiple things by holding shift and clicking on them, or by dragging a rectangle around them.
In the properties on the left, change the Data bits to 8. This makes them 8-bit.
Finally, select the
Op input and change its Data bits to 2.
Now you should have something like this:
You’re going to make a sort of “4 function calculator” circuit. It will be able to add, subtract, multiply, and divide two 8-bit numbers.
You will need:
- One adder, one subtractor, one multiplier, and one divider, all from the “Arithmetic” folder
- These do exactly what they say!
- A multiplexer from the “Plexers” folder
- Remember what this does?
- Three probes from the “Wiring” folder
- These are good for looking at values in something other than binary.
Just place them all in the circuit without hooking anything up yet.
- Select the adder, subtractor, multiplier, divider, and multiplexer, and set their Data bits to 8.
- Set the multiplexer’s Select bits to 2.
- Woah, it got bigger!
- With 2 select bits, we can choose one of 4 options.
- Set the three probes’ Radix property to “Signed Decimal.”
- Hook up the
Ainput to the first input of all four mathematical operations.
- They’re the top ones on the left sides:
- You can click and drag on an existing wire to draw another “branch” of the same wire.
- Hook up the
Binput to the second input of all four mathematical operations.
- Hook the outputs of the mathematical operations up to the inputs of the multiplexer.
- Put them in this order, top to bottom: add, subtract, multiply, divide.
- Hook the mux output to the
- Hook the
Opinput to the mux select pin.
- The pins are the little black or blue or green dots on the outside edges.
- Wires must be connected to the pins for the connection to be made.
- Connect the probes to the wires that carry the
Binputs and the
- This way you can see the values going into and coming out of the circuit in base-10.
When building and testing your circuit, the poke tool will be handy for changing the inputs and looking at what values are on the wires. Poke a wire to see what it’s carrying:
Play around with it
Use the Poke tool to change the inputs. You can choose which operation it does with the
- 00 will add
- 01 will subtract
- 10 will multiply
- 11 will divide
See what happens when you multiply or add large numbers! See what happens when you toggle the inputs’ sign bits (MSBs)!
Once you’re sure your circuit works, and you named the inputs and outputs exactly as I said, you can submit.
Name your circuit file
Drag your asm file into your browser to upload. If you can see your file, you uploaded it correctly!
You can also re-upload if you made a mistake and need to fix it.