Lab 3
Lab 3
Lab 3
input A,B;
output out;
wire w1,w2,w3,w4;
and a1(w1,A,B);
nand a2(w2,A,B);
not a3(w3,A);
nor a4(w4,w1,w2);
xor a5(out, w3,w4);
endmodule
module test_cct;
reg a,b;
wire out;
cct c1(out,a,b);
initial
begin
a=1'b0; b=1'b0;
#50 a=1'b0; b=1'b1;
#50 a=1'b1; b=1'b0;
#50 a=1'b1; b=1'b1;
#50 a=1'b1; b=1'b1;
end
endmodule