Behavioral Verilog
module and_gate (out, in1, in2); input in1, in2; output out;
assign out = in1 & in2;
endmodule
Note: AND is a Verilog primitive, so you can also write
and and_gate(out, in1, in2);
Previous slide
Next slide
Back to first slide
View graphic version