2-input multiplexer

Design a 2-input multiplexer with basic gates. The selection signal is called sel, whereas the two inputs are called in0 and in1. The output will be in0 when sel=0 and in1 when sel=1.

Specification

module mux(in0, in1, sel, out);
    input in0, in1, sel;
    output out;

Input

Output

Problem information

Author: Jordi Cortadella

Generation: 2026-02-03T12:17:37.045Z

© Jutge.org, 2006–2026.
https://jutge.org