4) Develop the verilog code for 2X4 decoder. Ans. Code:- module dec_2x4 (output reg [3:0]d, input wire [1:0]a ); always @ (a,d) begin if (a==2'b00) d=4'b0001; else if (a==2'b01) d=4'b0010; else if (a==2'b10) d=4'b0100; else if (a==2'b11) d=4'b1000; end endmodule Simulation:-