module ch4ex1(A,B,C,Y);input A,B,C;output Y;reg Y;always @(A or B or C) if(A == 0) if (B||C == 1) Y = 1; else Y = 0; else if(B^C == 1) Y = 1; else Y = 0; endmodule