Design a 4-input multiplexer. It has four input signals
(in0-in3) and two selection signals
(sel[1:0]). The output must be assigned the input signal
corresponding to the selection.
module mux4(in0, in1, in2, in3, sel, out);
input in0, in1, in2, in3;
input [1:0] sel;
output out;Use 2-input multiplexers.
in0, in1, in2 and
in3 are the inputs of the multiplexer.
sel encodes the two selection signals.
out is the output of the multiplexer.