XOR gate: Difference between revisions
Created page with "{| class="wikitable floatright" style="text-align:center" |- ! colspan="3" | XOR gate truth table |- bgcolor="#ddeeff" |colspan=2|'''Input''' || '''Output''' |- bgcolor="#ddeeff" | A || B || A XOR B |- |{{no2|0}} || {{no2|0}} || {{no2|0}} |- |{{no2|0}} || {{yes2|1}} || {{yes2|1}} |- |{{yes2|1}} || {{no2|0}} || {{yes2|1}} |- |{{yes2|1}} || {{yes2|1}} || {{no2|0}} |} thumb|152x152px|ANSI XOR gate symbol In digital electronics, an '''XOR gate''..." |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{| class="wikitable | {| class="wikitable" style="text-align:center; float: right; clear: right;" | ||
|- | |- | ||
! colspan="3" | XOR gate [[truth table]] | ! colspan="3" | XOR gate [[truth table]] | ||
| Line 20: | Line 20: | ||
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. | 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. | ||
{{Clear}} | |||
== Logic == | == Logic == | ||
A two-input OR gate can be expressed in [[Boolean logic]] as <math>A \cdot \overline B + \overline A \cdot B</math>, <math>(A + B) \cdot (\overline A + \overline B)</math> or <math>A \oplus B</math>. | A two-input OR gate can be expressed in [[Boolean logic]] as <math>A \cdot \overline B + \overline A \cdot B</math>, <math>(A + B) \cdot (\overline A + \overline B)</math> or <math>A \oplus B</math>. | ||
| Line 44: | Line 45: | ||
* [[NOR gate]] | * [[NOR gate]] | ||
* [[XNOR gate]] | * [[XNOR gate]] | ||
* [[Inverter|Inverter (NOT gate)]] | * [[Inverter (logic gate)|Inverter (NOT gate)]] | ||
* [[IMPLY gate]] | * [[IMPLY gate]] | ||
* [[NIMPLY gate]] | * [[NIMPLY gate]] | ||
Latest revision as of 16:09, 27 October 2024
| XOR gate truth table | ||
|---|---|---|
| Input | Output | |
| A | B | A XOR B |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
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: