Index

XNOR Gate

An XNOR (exclusive NOR) gate is a fundamental binary logic gate with two inputs and one output. The output is 1 only if both inputs are equal. The equivalent logical connective is equivalence. An XNOR gate with more than two inputs gives an output of 1 if an even number of inputs is 1. Some authors call the XNOR gate with N inputs the even function.

The following truth table gives the specification for a two input XNOR gate with output X:

 A  B  X 
001
010
100
111

The schematic form of the XNOR gate is:

Below is a Verilog structural model for the XNOR gate. In the code, the first argument to xnor is the gate output, the other arguments are inputs.

	    
module xnor_gate(X, A, B);
   output X;
   input  A;
   input  B;

   xnor(X, A, B);
endmodule
	    
	  

References

Mano, M. Morris, and Kime, Charles R. Logic and Computer Design Fundamentals. 2nd Edition. Prentice Hall, 2000.
Kleitz, W. Digital Microprocessor Fundamentals. 3rd Edition. Prentice Hall, 2000.

Index