module timer1(clk,second);
input clk;
output reg second;
reg[24:0] cnt;
always @(posedge clk)
begin
cnt <= cnt + 1'b1;
if (cnt==25'd24999999)
begin
cnt <= 24'd0;
second <= ~second;
end
end
endmodule
module ex6(A,B,C,Y);
input A,B,C;
output Y;
wire out1,out2,out3;
and a1(out1,A,B);
and a2(out2,A,C);
and a3(out3,B,C);
or or1(Y,out1,out2,out3);
endmodule
module multiplexer4_to_1(out, i0, i1, i2, i3, s1, s0);
output out;
input i0, i1, i2, i3;
input s1, s0;
assign out = s1 ? (s0 ? i3 : i2) : (s0? i1 : i0);
endmodule