解题代码如下:
module top_module (input a, input b, input c, output out);//
wire out1;
andgate inst1 (
.a(a ),
.b(b ),
.c(c ),
.d(1'b1 ),
.e(1'b1 ),
.out(out1 )
);
assign out = ~out1;
endmodule
就是有个需要注意的点,运用与模块计算的时候,当其他输入不使用,应该给1,因为与运算遇0结果为0.