Bugs mux2

From HDLBits

This 8-bit wide 2-to-1 multiplexer doesn't work. Fix the bug(s).


Module Declaration

module top_module (
    input sel,
    input [7:0] a,
    input [7:0] b,
    output [7:0] out  ); 
module top_module (
    input sel,
    input [7:0] a,
    input [7:0] b,
    output out  );

    assign out = (~sel & a) | (sel & b);

Write your solution here

Upload a source file...