2-to-1 Multiplexer

Build a 2-to-1 multiplexer from basic gates—the fundamental data selector that chooses between two inputs based on a control signal.

Overview

A multiplexer (MUX) is like a digital switch that selects one of several inputs and routes it to the output. The 2-to-1 MUX is the simplest form—it has two data inputs (I0 and I1), one select line (S), and one output (Y). When S=0, input I0 passes through; when S=1, input I1 passes through. Built from just three gate types (NOT, AND, OR), this circuit demonstrates the core data-routing principle used in every CPU.

Components Needed

  • 1x SN74HC04 IC (Hex Inverter)
  • 1x SN74LS08 IC (Quad AND)
  • 1x SN74LS32 IC (Quad OR)
  • 3x Switch
  • 1x LED
  • severalx Wires

Instructions

  1. Gather Your Components

    Collect the SN74HC04 (NOT), SN74LS08 (AND), and SN74LS32 (OR) ICs, three switches, one LED, wires, breadboard, and 5V power supply. One switch is the selector (S), and the other two are data inputs (I0 and I1).

  2. Wire the MUX Circuit

    Place all three ICs on the breadboard and connect power. Wire the selector switch (S) to a NOT gate to create S̄. Feed I0 and S̄ into one AND gate. Feed I1 and S into another AND gate. Connect both AND outputs to an OR gate. The OR output drives the LED.

  3. Test: S=0, Input 00 → Output 0

    Selector is 0, so I0 is selected. I0=0, I1=0. Output is 0. The MUX passes I0 (which is 0) to the output.

  4. Test: S=0, Input 10 → Output 1

    Selector is 0, so I0 is still selected. I0=1, I1=0. Output is 1. The MUX passes I0 (which is now 1) to the output, ignoring I1.

  5. Test: S=0, Input 11 → Output 1

    Selector is 0, I0=1, I1=1. Output is 1. Even though I1 is also 1, the output follows I0 because S=0.

  6. Test: S=0, Input 01 → Output 0

    Selector is 0, I0=0, I1=1. Output is 0. Even though I1 is 1, the MUX ignores it because S selects I0.

  7. Test: S=1, Input 00 → Output 0

    Switch to selector=1. Now I1 is selected. I0=0, I1=0. Output is 0.

  8. Test: S=1, Input 10 → Output 0

    Selector=1, I0=1, I1=0. Output is 0. Even though I0 is 1, the MUX ignores it and passes I1 (which is 0).

  9. Test: S=1, Input 01 → Output 1

    Selector=1, I0=0, I1=1. Output is 1. The MUX correctly passes I1 to the output.

  10. Test: S=1, Input 11 → Output 1

    Selector=1, I0=1, I1=1. Output is 1. The MUX passes I1, which is 1. You've verified all 8 possible input combinations!

Challenges

  • Build a 4-to-1 MUX by cascading three 2-to-1 MUXes
  • Use the MUX to implement any 2-input logic function by tying I0 and I1 to constants
  • Create a 2-bit-wide MUX that selects between two 2-bit values
  • Replace the discrete gates with a dedicated 74HC157 quad 2:1 MUX IC