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.
module mux(in0, in1, sel, out);
input in0, in1, sel;
output out;in0 and in1 are the signals to be
selected.
sel is the selection signal.
out is the output of the multiplexer.