Logisim Guide

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

A Guide to Logisim

Logisim is an educational tool for designing and simulating digital logic circuits. With its simple
toolbar interface and simulation of circuits as they are built, it is simple enough to facilitate
learning the most basic concepts related to logic circuits. With the capacity to build larger
circuits from smaller subcircuits, and to draw bundles of wires with a single mouse drag,
Logisim can be used (and is used) to design and simulate entire CPUs for educational purposes.

To practice using Logisim, let's build a XOR circuit - that is, a circuit that takes two inputs
(which we'll call x and y) and outputs 0 if the inputs are the same and 1 if they are different. The
following truth table illustrates.

We might design such a circuit on paper.

Recall that we're trying to build the following circuit in Logisim.

I suggest building a circuit by inserting the gates first as a sort of skeleton and then connecting
them with wires later. The first thing we'll do is to add the two AND gates. Click on the AND
tool in the toolbar ( , the next-to-last tool listed). Then click in the editing area where you want
the first AND gate to go. Be sure to leave plenty of room for stuff on the left. Then click the
AND tool again and place the second AND gate below it.
Notice the five dots on the left side of the AND gate. These are spots where wires can be
attached. It happens that we'll just use two of them for our XOR circuit; but for other circuits,
you may find that having more than two wires going to an AND gate is useful.

Now add the other gates. First click on the OR tool ( ); then click where you want it. And place
the two NOT gates into the canvas using the NOT tool ( ).

I left a little space between the NOT gates and the AND gates; if you want to, though, you can
put them up against each other and save yourself the effort of connecting them with a wire later.
Now we want to add the two inputs x and y into the diagram. Select the Input tool ( ), and place
the pins down. You should also place an output pin next to the OR gate's output using the Output
tool ( ). (Again, I'm leaving a bit of space between the OR gate and the output pin, but you
might choose to place them right next to each other.)

If you decide you don't like where you placed something, then you can select it using the Edit
tool ( ) and drag it to the desired spot. Or you can delete it altogether by selecting Delete from
the Edit menu or pressing the Delete key.

As you place each component of the circuit, you'll notice that as soon as the component is
placed, Logisim reverts to the Edit tool so that you can move the recently-placed component or
(as we'll see soon) connect the component to others by creating wires. If you want to add a copy
of the recently placed component, a shortcut is to press Control-D to duplicate the selection.
(Some computers use another keys for menus, such as the Command key on Macintoshes. You
would press that key with the D key.)

After you have all the components blocked out on the canvas, you're ready to start adding wires.
Select the Edit Tool ( ). When the cursor is over a point that receives a wire, a small green
circle will be drawn around it. Press the mouse button there and drag as far as you want the wire
to go.

Logisim is rather intelligent when adding wires: Whenever a wire ends at another wire, Logisim
automatically connects them. You can also "extend" or "shorten" a wire by dragging one of its
endpoints using the edit tool.

Wires in Logisim must be horizontal or vertical. To connect the upper input to the NOT gate and
the AND gate, then, I added three different wires.
Logisim automatically connects wires to the gates and to each other. This includes automatically
drawing the circle at a T intersection as above, indicating that the wires are connected.

As you draw wires, you may see some blue or gray wires. Blue in Logisim indicates that the
value at that point is "unknown," and gray indicates that the wire is not connected to anything.
This is not a big deal as you're in the process of building a circuit. But by the time you finish it,
none of your wires should be blue or gray. (The unconnected legs of the OR gate will still be
blue: That's fine.)

If you do have a blue or a gray wire after you think everything ought to be connected, then
something is going wrong. It's important that you connect wires to the right places. Logisim
draws little dots on the components to indicate where wires ought to connect. As you proceed,
you'll see the dots turn from blue to light or dark green.

Once you have all the wires connected, all of the wires you inserted will themselves be light or
dark green.
Adding text to the circuit isn't necessary to make it work; but if you want to show your circuit to
somebody (like a teacher), then some labels help to communicate the purpose of the different
pieces of your circuit.

Select the text tool ( ). You can click on an input pin and start typing to give it a label. (It's
better to click directly on the input pin than to click where you want the text to go, because then
the label will move with the pin.) You can do the same for the output pin. Or you could just click
any old place and start typing to put a label anywhere else.

Our final step is to test our circuit to ensure that it really does what we intended. Logisim is
already simulating the circuit. Let's look again at where we were.
Note that the input pins both contain 0s; and so does the output pin. This already tells us that the
circuit already computes a 0 when both inputs are 0.

Now to try another combination of inputs. Select the poke tool ( ) and start poking the inputs
by clicking on them. Each time you poke an input, its value will toggle. For example, we might
first poke the bottom input.

When you change the input value, Logisim will show you what values travel down the wires by
drawing them light green to indicate a 1 value or dark green (almost black) to indicate a 0 value.
You can also see that the output value has changed to 1.

So far, we have tested the first two rows of our truth table, and the outputs (0 and 1) match the
desired outputs.
By poking the switches through different combinations, we can verify the other two rows. If they
all match, then we're done: The circuit works!

To archive your completed work, you might want to save or print your circuit. The File menu
allows this.

Reference:

http://www.cburch.com/logisim/docs/2.7/en/html/guide/index.html

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy