Multiplexer (MUX) Tutorial for Logisim-evolution
A multiplexer picks one of several inputs and forwards it to the output. The select lines choose which one: a 2-to-1 MUX has one select line, a 4-to-1 MUX has two. The rule is simple — n select bits choose among 2n inputs.
Using the built-in Multiplexer
Open the Plexers library and place a Multiplexer. By default it is a 2-to-1 MUX: two data inputs, one select input, one output. Wire two input pins to the data inputs, one pin to the select input, and an LED to the output. With the Poke tool, flip the select pin: the LED now follows the other input.
Building a 4-to-1 MUX
Select the multiplexer and set Select Bit Width to 2 in the attribute panel — it now has four data inputs. (You can also raise Data Bit Width above 1 to switch whole buses instead of single bits.) Wire four inputs and a 2-bit select pin, then verify that each select code picks the right input.
Build a 2-to-1 MUX from gates
To see what is inside, build one from basic gates: out = (a AND NOT s) OR (b AND s). Place a NOT gate on the select line, two AND gates, and one OR gate. When s = 0, the top AND passes a; when s = 1, the bottom AND passes b. Test both select values with the Poke tool and compare the behavior against the built-in component.
Where multiplexers show up
- ALUs use a MUX to choose which operation’s result reaches the output — see How to Build an ALU.
- Register files use MUXes to select which register to read.
- Data routing in CPUs: one shared bus, many possible sources.
Common mistakes
- Wrong select width: 2 select bits give 4 inputs, not 2. Count: inputs = 2select bits.
- Floating select: an unconnected select line is undefined — always drive it from a pin.
Keep learning
- Decoder Tutorial — the MUX’s mirror image.
- How to Build an ALU in Logisim-evolution
- Getting Started: Your First Circuit
