← ProblemsCircuits / Combinational Logic / Multiplexers

2-to-1 bus multiplexer

64%muxvectors

Build a 100-bit wide 2-to-1 multiplexer. A single 1-bit sel chooses which entire bus drives the output:

  • sel = 0out = a
  • sel = 1out = b

Note that widening the data path does not change the logic — the same one-line conditional works for any width.