Mux2to1

From HDLBits

gatesv100Previous

Create a one-bit wide, 2-to-1 multiplexer. When sel=0, choose a. When sel=1, choose b.

Expected solution length: Around 1 line.

Module Declaration

module top_module( 
    input a, b, sel,
    output out ); 

The ternary operator (cond ? iftrue : iffalse) is easier to read.

Write your solution here

Upload a source file...