Skip to content

Not gate

Problem statement

Verilog
1
2
3
module top_module( input in, output out );

endmodule

Solution

Verilog
1
2
3
module top_module( input in, output out );
    assign out=~in;
endmodule
  • "~"意味着按照位来取反
  • "!"意味着逻辑取反