XOR gate

From Fox Labs Wiki
Revision as of 06:18, 9 November 2023 by Inari (talk | contribs)
Jump to navigation Jump to search
XOR gate truth table
Input Output
A B A XOR B
0 0 0
0 1 1
1 0 1
1 1 0
ANSI XOR gate symbol

In digital electronics, an XOR gate or Exclusive OR is a logic gate which produces an output of true when any one of its inputs are true, but not both. A LOW (0) output results when all of the inputs to the gate are LOW or all of the inputs are HIGH (1); if any one of the inputs are HIGH, a HIGH output results.

The XOR gate (along with the XNOR gate) is one of the only two logic gates that does not have an integrated circuit containing more than two inputs.

Logic

A two-input OR gate can be expressed in Boolean logic as or .

Alternatives

If a specific type of gate is not available, a circuit that implements the same function can be constructed from other available gates. Through the use of the "universal" NAND gates and NOR gates, almost any other Boolean logic gate can be constructed.

A XOR gate can be constructed using four NAND gates or five NOR gates in the following topologies:

Additionally, using a different topology, the same can be achieved as follows:

See also