Menu

Theme

Learn and fix · How-to · CHECKED ON 5.0.0

Make and reuse subcircuits in Logisim

To make a Logisim subcircuit, choose Project, Add Circuit, give it a name that starts with a letter, and build the circuit with labelled input and output pins. Go back to your main circuit and click the new circuit's name in the circuit tree to place it like a gate; each pin becomes a port on its box. To change how the box looks, use Project, Edit Circuit Appearance. Tunnels do not cross into a subcircuit: pass every signal through a pin.
FOR
Students reusing a block several times
CHECKED
11 Nov 2026
FIX TIME
about 10 min
Checked against Logisim-evolution 5.0.0 on 1 machines
On this page

Create a subcircuit in five steps

  1. Add the circuit

    Choose Project, Add Circuit. Type a name that starts with a letter, for example fa.

    Check: A new circuit appears in the circuit tree.

  2. Build it with labelled pins

    Draw the circuit with input pins for what goes in and output pins for what comes out. Label every pin: the labels become the port names.

    Check: Inputs and outputs have labels.

  3. Go back to main

    Double-click main in the circuit tree. Double-clicking a circuit’s name opens its layout (F90).

    Check: The main circuit is on the canvas.

  4. Place the subcircuit

    Click the new circuit’s name in the tree, then click the canvas. The box shows the pins’ labels as ports.

    Check: A box with ports is on the canvas.

  5. Wire and test

    Wire the ports and poke the inputs, as in the tutorial.

    Check: The outputs follow the inputs.

LAB lab-lnx · Linux lab5.0.02026-11-11

The layout of the fa subcircuit: input pins A, B and Cin on the left, two XOR gates, two AND gates and an OR gate, and output pins S and Cout on the right.

Double-clicking fa in the circuit tree opens its layout (F90).lab-lnx-le500-subcircuit-layout-01
Layout of the fa subcircuit: inputs A, B and Cin on the left, five gates, outputs S and Cout on the right.
LAB lab-lnx · Linux lab5.0.02026-11-11

Logisim-evolution 5.0.0 with a 4-bit adder open. The circuit tree lists two circuits, fa and main. In the main circuit four small boxes labelled fa0 to fa3 show the ports of the fa subcircuit.

Four placed copies of the fa subcircuit. Each box shows the labels of fa's pins as ports (F90).lab-lnx-le500-subcircuit-instances-01
A 4-bit adder: the tree lists fa and main, and four boxes fa0 to fa3 show the subcircuit ports.
The name is invalid (it must follow the rule ([a-zA-Z]+\w*)).

All the naming messages are on the error list.

circ-full-adder-ripple-4bit · mainscroll to see all
4444bAA0A1A2A34bBB0B1B2B3Cinc0ABCinSCoutfafa0A0B0c0s0c1ABCinSCoutfafa1A1B1c1s1c2ABCinSCoutfafa2A2B2c2s2c3ABCinSCoutfafa3A3B3c3s3c4s0s1s2s34bSCoutc4
A 4-bit adder made of four copies of one full-adder subcircuit, fa0 to fa3. All 512 combinations matched in 5.0.0. CC BY 4.0 · SHA-256 c649fcc8ec1d
Describe this circuit

Components: Input pin A; Splitter 1; Input pin B; Splitter 2; Input pin Cin; fa fa0; fa fa1; fa fa2; fa fa3; Splitter 3; Output pin S; Output pin Cout.

  • Input pin A connects to Splitter 1 (net A), 4 bits wide.
  • Splitter 1 connects to fa fa0 (net A0).
  • Splitter 1 connects to fa fa1 (net A1).
  • Splitter 1 connects to fa fa2 (net A2).
  • Splitter 1 connects to fa fa3 (net A3).
  • Input pin B connects to Splitter 2 (net B), 4 bits wide.
  • Splitter 2 connects to fa fa0 (net B0).
  • Splitter 2 connects to fa fa1 (net B1).
  • Splitter 2 connects to fa fa2 (net B2).
  • Splitter 2 connects to fa fa3 (net B3).
  • Input pin Cin connects to fa fa0 (net Cin, c0).
  • fa fa0 connects to Splitter 3 (net s0).
  • fa fa0 connects to fa fa1 (net c1).
  • fa fa1 connects to Splitter 3 (net s1).
  • fa fa1 connects to fa fa2 (net c2).
  • fa fa2 connects to Splitter 3 (net s2).
  • fa fa2 connects to fa fa3 (net c3).
  • fa fa3 connects to Splitter 3 (net s3).
  • fa fa3 connects to Output pin Cout (net c4, Cout).
  • Splitter 3 connects to Output pin S (net S), 4 bits wide.

Download circ-full-adder-ripple-4bit.circ.

How pins map to ports

Each input and output pin of the subcircuit becomes one port on its box, with the pin’s label as the port name. In our adder the box for fa has three ports on the left and two on the right, one per pin (F90). We did not test how Logisim chooses the sides when you add a pin, so check the box after you add or remove a pin: ports can move.

Edit the appearance

Select the subcircuit in the circuit tree and choose Project, Edit Circuit Appearance. An editor opens with a drawing toolbar and a box with one port marker per pin. Drag the markers to change where each port sits. Project, Edit Circuit Layout takes you back to the wiring.

LAB lab-lnx · Linux lab5.0.02026-11-11

The appearance editor for the fa subcircuit: a toolbar of drawing tools, a rectangular box with three blue port markers on its left edge and two on its right edge.

Project, Edit Circuit Appearance: the box with one port marker per pin (F90).lab-lnx-le500-appearance-editor-01
Appearance editor for the fa subcircuit: a drawing toolbar and a box with port markers on both edges.

Custom appearance did not save

The project’s issue tracker has reports of a custom appearance resetting. We did not save a custom appearance and reopen it, so we cannot say whether it still happens in 5.0.0.

Set the main circuit

With a circuit selected in the tree, choose Project, Set As Main Circuit. The main circuit is the one autograders and the command line start from. See the command line.

Labels that autograders check

Before you submit0 / 4 done

Signals between levels

A tunnel connects points inside one circuit, so it does not carry a signal into or out of a subcircuit (Tunnel). Use a pin. To look inside a running copy, use Simulate, Go In To State; each placed copy has its own state, so registers inside separate copies are separate (Simulate menu items, F46).

Reorder, rename, remove

Project, Move Circuit Up and Move Circuit Down (CtrlShiftU (⌘⇧U on macOS) and CtrlShiftD (⌘⇧D on macOS)) reorder the tree. A circuit that is used inside other circuits cannot be removed, and 5.0.0 says so. A subcircuit that would contain itself cannot be placed or pasted. See the error list.

Reuse a subcircuit in another file

Load the file as a library, or merge it. See Libraries.

Classic 2.7.1 differences

Feature2.7.15.0.0
Appearance editor2.7.1: untested5.0.0: yesopened in our test (F90)
Name rules2.7.1: untested5.0.0: yesmust follow the identifier rule in the message
Labels on opening an old file2.7.1: untested5.0.0: partialconverted to VHDL-safe names (F02)

Cells say untested where we did not run 2.7.1.

To see which version made a file and what opens where, read the .circ file page.

Frequently asked questions

How do I create a subcircuit in Logisim?

Choose Project, Add Circuit, name it, and build it with labelled pins. Then click its name in the circuit tree and place it in your main circuit like a gate.

Why is my circuit name invalid?

Names must start with a letter and use letters, digits and underscores, and must not be a keyword such as NAND. 5.0.0 explains the rule in its message.

How do I change the order of the pins on my subcircuit?

Choose Project, Edit Circuit Appearance and drag the port markers on the box. We opened the editor in 5.0.0; we did not test every placement rule.

Can tunnels connect into a subcircuit?

No. A tunnel connects points inside one circuit. Pass each signal through a pin of the subcircuit.

How do I set the main circuit?

Choose Project, Set As Main Circuit with the circuit selected. Autograders and the command line use the main circuit.

Why did my custom appearance reset?

Users report this on the project's issue tracker. We did not reproduce it, because we did not save and reopen a custom appearance.

Sources

  1. Subcircuit walkthrough in Logisim-evolution 5.0.0, logisim.dev lab data: test-data/lab10-2026-11-11-subcircuits/ (screenshots), src/content/circuits/circ-full-adder-ripple-4bit

Try: , , ,