Web - Amazon

We provide Linux to the World


We support WINRAR [What is this] - [Download .exe file(s) for Windows]

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
SITEMAP
Audiobooks by Valerio Di Stefano: Single Download - Complete Download [TAR] [WIM] [ZIP] [RAR] - Alphabetical Download  [TAR] [WIM] [ZIP] [RAR] - Download Instructions

Make a donation: IBAN: IT36M0708677020000000008016 - BIC/SWIFT:  ICRAITRRU60 - VALERIO DI STEFANO or
Privacy Policy Cookie Policy Terms and Conditions
XOR gate - Wikipedia, the free encyclopedia

XOR gate

From Wikipedia, the free encyclopedia

This article is about XOR in the sense of an electronic logic gate (e.g. CMOS 4030). For XOR in the purely logical sense, see Exclusive disjunction, for other uses of similar terms, see XOR (disambiguation).
INPUT
A   B
OUTPUT
A XOR B
0 0 0
0 1 1
1 0 1
1 1 0

The XOR gate is a digital logic gate that implements exclusive disjunction - it behaves according to the truth table to the right. A HIGH output (1) results if one, and only one, of the inputs to the gate is HIGH (1). If both inputs are LOW (0) or both are HIGH (1), a LOW output (0) results.

This function is addition modulo 2. As a result, XOR gates are used to implement binary addition in computers. A half adder consists of an XOR gate and an AND gate.

Contents

[edit] Symbols

There are two symbols for XOR gates: the 'military' symbol and the 'rectangular' symbol. For more information see Logic Gate Symbols

'Military' XOR Symbol
Enlarge
'Military' XOR Symbol
'Rectangular' XOR Symbol
'Rectangular' XOR Symbol


[edit] Hardware description and pinout

XOR gates are basic logic gates, and as such they are recognised in TTL and CMOS ICs. The standard, 4000 series, CMOS IC is the 4070, which includes four independent, two-input, XOR gates. The 4070 replaces the less reliable 4030, but keeps the pinout. The pinout diagram is as follows:

Pinout Diagram of a 4070/4030 Quad XOR DIL-format IC
Enlarge
Pinout Diagram of a 4070/4030 Quad XOR DIL-format IC
 1  Input A1
 2  Input B1
 3  Output Q1
 4  Output Q2
 5  Input B2
 6  Input A2
 7  VSS
 8  Input A3
 9  Input B3
 10 Output Q3
 11 Output Q4
 12 Input B4
 13 Input A4
 14 VDD

This device is available from most semiconductor manufacturers such as Philips. It is usually available in both through-hole DIL and SOIC format. Datasheets are readily available in most Datasheet Databases.

[edit] Alternatives

If no specific XOR gates are available, one can be made from four NAND or six NOR gates in the configurations shown below. Interestingly, any logic gate can be made from a combination of NAND gates or a combination of NOR gates.

XOR Gate Constructed Using Only NAND Gates
XOR Gate Constructed Using Only NAND Gates
XOR Gate Constructed Using Only NOR Gates
XOR Gate Constructed Using Only NOR Gates

[edit] More than two inputs

The case of a three, or more, input XOR operation tends to be an ill-considered case. An XOR operation with three simultaneous inputs is not so easily expressed in most popular programming languages. When expressed as successive binary operations the result is a simple parity, giving a TRUE result for any odd number of TRUE inputs.

three ones XORed simultaneously

When taken as a multi-input black box whose operation follows the formal definition and yields the result TRUE when one, and only one, of its inputs is TRUE, the behaviour is inconsistent with the successive binary mode. For example; in the case where three inputs are all TRUE (as shown on the right, in the IEC symbology to emphasise the definition) the result would have to be FALSE because it does not meet the condition that "only one of its inputs is TRUE".

Our "Network":

Project Gutenberg
https://gutenberg.classicistranieri.com

Encyclopaedia Britannica 1911
https://encyclopaediabritannica.classicistranieri.com

Librivox Audiobooks
https://librivox.classicistranieri.com

Linux Distributions
https://old.classicistranieri.com

Magnatune (MP3 Music)
https://magnatune.classicistranieri.com

Static Wikipedia (June 2008)
https://wikipedia.classicistranieri.com

Static Wikipedia (March 2008)
https://wikipedia2007.classicistranieri.com/mar2008/

Static Wikipedia (2007)
https://wikipedia2007.classicistranieri.com

Static Wikipedia (2006)
https://wikipedia2006.classicistranieri.com

Liber Liber
https://liberliber.classicistranieri.com

ZIM Files for Kiwix
https://zim.classicistranieri.com


Other Websites:

Bach - Goldberg Variations
https://www.goldbergvariations.org

Lazarillo de Tormes
https://www.lazarillodetormes.org

Madame Bovary
https://www.madamebovary.org

Il Fu Mattia Pascal
https://www.mattiapascal.it

The Voice in the Desert
https://www.thevoiceinthedesert.org

Confessione d'un amore fascista
https://www.amorefascista.it

Malinverno
https://www.malinverno.org

Debito formativo
https://www.debitoformativo.it

Adina Spire
https://www.adinaspire.com