Skip to content

Nor gate

What is nor gate?

A NOR gate is an OR gate with its output inverted. A NOR function needs two operators when written in Verilog.

Problem statement

Verilog
1
2
3
4
5
6
module top_module( 
    input a, 
    input b, 
    output out );

endmodule

Solution

Verilog
1
2
3
4
5
6
module top_module( 
    input a, 
    input b, 
    output out );
    assign out=~(a|b);
endmodule