Menu

Theme

Component reference · Reference · CHECKED ON 5.0.0

Multiplexers, decoders and encoders in Logisim (the Plexers library)

To use a Logisim multiplexer, place a Multiplexer from the Plexers library and set Select Bits: 1 gives a 2:1 mux, 2 gives 4:1, 3 gives 8:1. The select input is a single multi-bit port, so to drive it from separate 1-bit wires, join them with a splitter first (bit 0 is the least significant). Data Bits sets the width of each data input; the Decoder and Demultiplexer use the same Select Bits rule.
FOR
Students building datapaths and decoders
CHECKED
11 Nov 2026
Checked against Logisim-evolution 5.0.0 on 1 machines
On this page

Build a 4:1 multiplexer in one minute

  1. Place a Multiplexer

    Open the Plexers library and click the Multiplexer tool, then click the canvas.

    Check: A multiplexer with two data inputs is on the canvas.

  2. Set Select Bits to 2

    In the Properties panel, change Select Bits to 2. The inputs grow to four.

    Check: Four data inputs and one select port.

  3. Connect data and select

    Wire four 1-bit input pins to the data inputs. Wire a 2-bit input pin to the select port, which is one port and carries both select bits.

    Check: Four input pins on the data side and a 2-bit pin on the select port.

  4. Test it

    Poke the select pin: S = 0 chooses input 0, S = 3 chooses input 3.

    Check: Output follows the input the select names.

circ-mux-4-to-1 · mainscroll to see all
2D0d0D1d1D2d2D3d3d0d1d2d3yYy2bSss
A 4:1 multiplexer with a 2-bit select S. All 64 input combinations matched in 5.0.0. CC BY 4.0 · SHA-256 c053e6a65ea7
Describe this circuit

Components: Input pin D0; Input pin D1; Input pin D2; Input pin D3; Multiplexer 1; Output pin Y; Input pin S.

  • Input pin D0 connects to Multiplexer 1 (net D0, d0).
  • Input pin D1 connects to Multiplexer 1 (net D1, d1).
  • Input pin D2 connects to Multiplexer 1 (net D2, d2).
  • Input pin D3 connects to Multiplexer 1 (net D3, d3).
  • Multiplexer 1 connects to Input pin S (net S, s), 2 bits wide.
  • Multiplexer 1 connects to Output pin Y (net y, Y).
The 4:1 table from our run (first rows; the file has all 64). Y is the data input that S names.
#D0D1D2D3SY
0000000
0000010
0000100
0000110
0001000
0001010
0001100
0001111
0010000
0010010
0010101
0010110
0011000
0011010
0011101
0011111
0100000
0100011
0100100
0100110
0101000
0101011
0101100
0101111
0110000
0110011
0110101
0110110
0111000
0111011
0111101
0111111
1000001
1000010
1000100
1000110
1001001
1001010
1001100
1001111
1010001
1010010
1010101
1010110
1011001
1011010
1011101
1011111
1100001
1100011
1100100
1100110
1101001
1101011
1101100
1101111
1110001
1110011
1110101
1110110
1111001
1111011
1111101
1111111

Download circ-mux-4-to-1.circ.

Selecting with single wires

The select port is one multi-bit port. Two separate 1-bit wires cannot both feed it: the wire turns orange and the output reads U (F09).

circ-mux-select-broken · mainscroll to see all
2D0d0D1d1D2d2D3d3d0d1d2d3yYyS0S1
Broken: two 1-bit pins wired to the 2-bit select. The wire is orange (widths differ) and Y reads U on all 64 rows. CC BY 4.0 · SHA-256 116c3b98a52d
Describe this circuit

Components: Input pin D0; Input pin D1; Input pin D2; Input pin D3; Multiplexer 1; Output pin Y; Input pin S0; Input pin S1.

  • Input pin D0 connects to Multiplexer 1 (net D0, d0).
  • Input pin D1 connects to Multiplexer 1 (net D1, d1).
  • Input pin D2 connects to Multiplexer 1 (net D2, d2).
  • Input pin D3 connects to Multiplexer 1 (net D3, d3).
  • Multiplexer 1 connects to Input pin S0, Input pin S1 (net S0, S1), 2 bits wide.
  • Multiplexer 1 connects to Output pin Y (net y, Y).

Join the wires with a splitter set to Fan Out 2 and Bit Width In 2. End 0 carries bit 0, the least significant bit.

circ-mux-select-fixed · mainscroll to see all
D0d0D1d1D2d2D3d3d0d1d2d3yYyS0s0S1s1sels0s1sel
Fixed: S0 and S1 go through a splitter into the select port. All 64 rows matched. CC BY 4.0 · SHA-256 07f10927d900
Describe this circuit

Components: Input pin D0; Input pin D1; Input pin D2; Input pin D3; Multiplexer 1; Output pin Y; Input pin S0; Input pin S1; Splitter 1.

  • Input pin D0 connects to Multiplexer 1 (net D0, d0).
  • Input pin D1 connects to Multiplexer 1 (net D1, d1).
  • Input pin D2 connects to Multiplexer 1 (net D2, d2).
  • Input pin D3 connects to Multiplexer 1 (net D3, d3).
  • Multiplexer 1 connects to Splitter 1 (net sel), 2 bits wide.
  • Multiplexer 1 connects to Output pin Y (net y, Y).
  • Input pin S0 connects to Splitter 1 (net S0, s0).
  • Input pin S1 connects to Splitter 1 (net S1, s1).
Which data input each select value names. S0 is the least significant bit.
#S1S0Input chosen
00D0
01D1
10D2
11D3

See Splitter and wire colours.

Multiplexer attributes

Attribute What it does
Facing Which way the multiplexer points.
Select Location Which side the select port is on.
Select Bits How many select bits. Inputs = 2 to the power of this. We placed 1, 2 and 3.
Data Bits Width of every data input and the output.
Disabled Output Floating or Zero: the output when the enable is off.
Include Enable? Adds an enable input.
Gate Size Narrow or Wide.
Three-state? On the decoder: unselected outputs float.

Names are those in the 5.0.0 string table (F73). The explanations are ours.

Enable and disabled output

2:1 multiplexer with an enable input (lab table). The Floating setting was not tested.
#I0I1SENO
00000
00010
00100
00110
01000
01010
01100
01111
10000
10011
10100
10110
11000
11011
11100
11111

The default 5.0.0 multiplexer has no enable input. In 2.7.1 the default instance has one more port (5 against 4, F23), which is why handouts show an extra pin.

Demultiplexer

The reverse of a multiplexer: the input goes to the output the select names.

1:4 demultiplexer from our run. The unselected outputs are 0.
#DSY0Y1Y2Y3
0000000
0010000
0100000
0110000
1001000
1010100
1100010
1110001

circ-demux-1-to-4 · mainscroll to see all
2Dd2bSsdsy0Y0y0y1Y1y1y2Y2y2y3Y3y3
A 1:4 demultiplexer. All 8 rows matched in 5.0.0. CC BY 4.0 · SHA-256 61ba83c993da
Describe this circuit

Components: Input pin D; Input pin S; Demultiplexer 1; Output pin Y0; Output pin Y1; Output pin Y2; Output pin Y3.

  • Input pin D connects to Demultiplexer 1 (net D, d).
  • Input pin S connects to Demultiplexer 1 (net S, s), 2 bits wide.
  • Demultiplexer 1 connects to Output pin Y0 (net y0, Y0).
  • Demultiplexer 1 connects to Output pin Y1 (net y1, Y1).
  • Demultiplexer 1 connects to Output pin Y2 (net y2, Y2).
  • Demultiplexer 1 connects to Output pin Y3 (net y3, Y3).

Decoder

A decoder sets the output the select names to 1 and the rest to 0.

2-to-4 decoder.
#SY0Y1Y2Y3
001000
010100
100010
110001

3-to-8 decoder. All 8 rows matched in 5.0.0.
#SY0Y1Y2Y3Y4Y5Y6Y7
00010000000
00101000000
01000100000
01100010000
10000001000
10100000100
11000000010
11100000001

Decoder with its enable pin left unconnected (lab table).
#SO0O1O2O3
001000
010100
100010
110001

Three-state decoder (lab table).
#SENO0O1O2O3
0000000
0011UUU
0100000
011U1UU
1000000
101UU1U
1100000
111UUU1

A decoder picks a register in a register file and drives the digit select of a 7-segment display.

Priority Encoder

The Priority Encoder reports the highest-numbered input that is 1. A plain encoder is the special case with one active input.

4-input priority encoder (lab table). O is the address, EN2 the Enable Output, GS the Group Select.
#I0I1I2I3ENOEN2GS
000000000
00001UU10
000100000
000111101
001000000
001011001
001100000
001111101
010000000
010010101
010100000
010111101
011000000
011011001
011100000
011111101
100000000
100010001
100100000
100111101
101000000
101011001
101100000
101111101
110000000
110010101
110100000
110111101
111000000
111011001
111100000
111111101

Bit Selector

The Bit Selector picks a group of bits from a wider value by an index. Output Bits sets the group size. Use it when the choice changes while the circuit runs; use a splitter when it is fixed.

Bit Selector on 4-bit data with 1 output bit (lab table): S names which bit of D comes out.
#DSO
0000000
0000010
0000100
0000110
0001001
0001010
0001100
0001110
0010000
0010011
0010100
0010110
0011001
0011011
0011100
0011110
0100000
0100010
0100101
0100110
0101001
0101010
0101101
0101110
0110000
0110011
0110101
0110110
0111001
0111011
0111101
0111110
1000000
1000010
1000100
1000111
1001001
1001010
1001100
1001111
1010000
1010011
1010100
1010111
1011001
1011011
1011100
1011111
1100000
1100010
1100101
1100111
1101001
1101010
1101101
1101111
1110000
1110011
1110101
1110111
1111001
1111011
1111101
1111111

Building them from gates

For labs that forbid built-in parts. A 2:1 mux from a NOT, two ANDs and an OR, and a 2-to-4 decoder from two NOTs and four ANDs. Both matched the built-in tables in 5.0.0.

circ-mux-2-to-1-gates · mainscroll to see all
D0d0D1d1Sssnsd0nsp0d1sp1p0p1yYy
2:1 multiplexer from gates. All 8 rows matched. CC BY 4.0 · SHA-256 9d64f5be7405
Describe this circuit

Components: Input pin D0; Input pin D1; Input pin S; NOT Gate 1; AND Gate 1; AND Gate 2; OR Gate 1; Output pin Y.

  • Input pin D0 connects to AND Gate 1 (net D0, d0).
  • Input pin D1 connects to AND Gate 2 (net D1, d1).
  • Input pin S connects to NOT Gate 1, AND Gate 2 (net S, s).
  • NOT Gate 1 connects to AND Gate 1 (net ns).
  • AND Gate 1 connects to OR Gate 1 (net p0).
  • AND Gate 2 connects to OR Gate 1 (net p1).
  • OR Gate 1 connects to Output pin Y (net y, Y).
circ-decoder-2-to-4-gates · mainscroll to see all
S0s0S1s1s0ns0s1ns1ns0ns1y0Y0y0s0ns1y1Y1y1ns0s1y2Y2y2s0s1y3Y3y3
2-to-4 decoder from gates. All 4 rows matched. CC BY 4.0 · SHA-256 2b36ac84337f
Describe this circuit

Components: Input pin S0; Input pin S1; NOT Gate 1; NOT Gate 2; AND Gate 1; Output pin Y0; AND Gate 2; Output pin Y1; AND Gate 3; Output pin Y2; AND Gate 4; Output pin Y3.

  • Input pin S0 connects to NOT Gate 1, AND Gate 2, AND Gate 4 (net S0, s0).
  • Input pin S1 connects to NOT Gate 2, AND Gate 3, AND Gate 4 (net S1, s1).
  • NOT Gate 1 connects to AND Gate 1, AND Gate 3 (net ns0).
  • NOT Gate 2 connects to AND Gate 1, AND Gate 2 (net ns1).
  • AND Gate 1 connects to Output pin Y0 (net y0, Y0).
  • AND Gate 2 connects to Output pin Y1 (net y1, Y1).
  • AND Gate 3 connects to Output pin Y2 (net y2, Y2).
  • AND Gate 4 connects to Output pin Y3 (net y3, Y3).

Download mux from gates and decoder from gates. To turn a truth table into gates, see Combinational Analysis.

Common mistakes

  • Two 1-bit wires on a 2-bit select: orange wire, U output.
  • Select bits in the wrong order: S0 is the least significant bit.
  • Data inputs counted from the wrong end: input 0 is the top input with the default facing.
  • Trusting a priority encoder’s address when Group Select is 0.
  • Driving a bus from a multiplexer without tri-state: use a decoder and controlled buffers.

Version differences

Feature2.7.15.0.0
Default multiplexer ports2.7.1: yes5 ports (one more)5.0.0: yes4 ports (F23)
Select bits range2.7.1: untested5.0.0: partial1 to 3 tested
Include Enable? attribute2.7.1: untested5.0.0: yestested (F41)

Cells say untested where we did not run 2.7.1. See also all components.

Frequently asked questions

How do I make a 4-to-1 multiplexer in Logisim?

Place a Multiplexer and set Select Bits to 2. Four data inputs appear. Drive the single 2-bit select port, and connect your data. Our circuit passed all 64 rows in 5.0.0.

How do I connect separate select wires to a multiplexer?

Join them with a splitter set to Fan Out 2 and Bit Width In 2. Wiring two 1-bit wires straight to the select port turns the wire orange and the output reads U (we tested both).

How many inputs can a Logisim multiplexer have?

Two to the power of Select Bits. We placed Select Bits 1, 2 and 3 (2, 4 and 8 inputs). We did not test the upper limit.

What is the difference between a decoder and a demultiplexer?

A decoder sets one of its outputs to 1. A demultiplexer sends its data input to one chosen output. With the data input at 1 they give the same pattern.

What does the priority encoder output when no input is 1?

With it enabled, the address output is floating (U), Enable Output is 1 and Group Select is 0. Check Group Select first (F41).

How do I build a multiplexer from logic gates in Logisim?

Use a NOT gate, two AND gates and an OR gate. Our gate version matches the built-in table on all 8 rows.

Why does my multiplexer have an extra pin?

Your picture may come from classic 2.7.1, where the default multiplexer has one more port than in 5.0.0 (5 against 4). Or you turned on Include Enable?.

Sources

  1. Plexer tests on Logisim-evolution 5.0.0, logisim.dev lab data: src/content/circuits/circ-mux-*, circ-demux-*, circ-decoder-*; test-data/lab2-2026-11-09-components/tables/

Try: , , ,