4-to-1 Multiplexer
Build a 4-to-1 multiplexer from discrete gates—select one of four data inputs using two selector switches!
Overview
The 4-to-1 MUX extends the 2-to-1 concept with four data inputs and two select lines. The two select lines form a 2-bit address (00, 01, 10, 11) that determines which of the four inputs reaches the output. Built from NOT, AND, and OR gates, this circuit requires decoding the 2-bit select signal into four individual enable lines—one for each input. This is the same logic inside dedicated MUX ICs and is used in CPUs for register selection and data routing.
Components Needed
- 1x SN74LS04 IC (Hex Inverter)
- 2x SN74LS08 IC (Quad AND)
- 1x SN74LS32 IC (Quad OR)
- 6x Switch
- 1x LED
- severalx Wires
Instructions
Gather Your Materials
Collect the SN74LS04 (NOT), two SN74LS08 (AND), and SN74LS32 (OR) ICs, six switches (2 for select, 4 for data inputs), one LED, wires, breadboard, and 5V power supply. The 4-bit switch tool provides a convenient way to set the four data inputs.
Reference: 4-Bit Switch Tool
The 4-bit switch tool provides clean binary inputs for the four data lines. Half of the switch tool (4 switches) connects to the data inputs while separate switches control the selector.
Wire the 4-to-1 MUX
Place all ICs on the breadboard and connect power. Use the NOT gate to create S̄0 and S̄1. Wire four 3-input AND paths: each data input (I0-I3) is ANDed with the appropriate select combination. Connect all four AND outputs through OR gates to produce the final output Y driving the LED.
Connect the Switch Tool
Connect the 4-bit switch tool to provide the four data inputs. The selector switches are separate.
Test: Select 00, Input 1110 → Output 0
Selector: 00 (selects I0). Input pattern: 1110 (I3=1, I2=1, I1=1, I0=0). Since I0=0, the output is 0 despite other inputs being 1.
Test: Select 00, Input 1101 → Output 1
Selector: 00 (selects I0). Input: 1101 (I0=1). Output is 1—the MUX correctly routes I0 to the output.
Test: Select 11, Input 1000 → Output 1
Selector: 11 (selects I3). Input: 1000 (I3=1). Output is 1—the MUX now routes I3.
Test: Select 11, Input 0111 → Output 0
Selector: 11 (selects I3). Input: 0111 (I3=0). Output is 0. Even though I0-I2 are all 1, only I3 matters.
Test: Select 10, Input 1011 → Output 0
Selector: 10 (selects I2). Input: 1011 (I2=0). Output is 0.
Test: Select 10, Input 1100 → Output 1
Selector: 10 (selects I2). Input: 1100 (I2=1). Output is 1.
Test: Select 10, Input 0100 → Output 1
Selector: 10 (selects I2). Input: 0100 (I2=1). Output is 1. Same selector, different input pattern, same selected bit.
Test: Select 01, Input 0010 → Output 1
Selector: 01 (selects I1). Input: 0010 (I1=1). Output is 1.
Test: Select 01, Input 1101 → Output 0
Selector: 01 (selects I1). Input: 1101 (I1=0). Output is 0. All four select combinations have been tested with different data patterns!
Challenges
- Build an 8-to-1 MUX by adding a third select line and doubling the input count
- Use the 4:1 MUX to implement any 2-variable logic function
- Create a 4-bit-wide MUX that selects between four 4-bit values simultaneously
- Compare your gate-based design to a dedicated 74HC153 MUX IC