I'll provide a small example in Verilog:
module if_logic_example (
input wire [2:0] select,
input wire [7:0] a, b, c, d,
output wire [7:0] out
);
// Using if-else statement for simple 4-to-1 multiplexer
always @(*) begin
if (select == 3'b000) begin
out = a;
end else if (select == 3'b001) begin
out = b;
end else if (select == 3'b010) begin
out = c;
end else begin
out = d;
end
end
endmodule
In this example, we have a simple 4-to-1 multiplexer. The select signal chooses which of the 4 inputs (a, b, c, or d) will be assigned to the output out. The if-else statement checks the value of select and sets the output accordingly.