Coïncidence (informatique)
Fichier:Venn1001.svg |
Diagramme de Venn de <math>A \odot B</math> |
Fichier:Venn 1000 0001.svg |
Diagramme de Venn de la coïncidence à trois entrées, |
Fichier:Venn 0110 1001.svg |
Diagramme de Venn de <math>A \odot B \odot C = ( A \odot B ) \odot C</math> |
En informatique, l'opérateur logique coïncidence, également NON-OU exclusif (XNOR) et équivalence logique, peut se définir par la phrase suivante :
On peut noter qu'il s'agit de la négation du OU exclusif, souvent noté XOR. On le nomme parfois (bien qu'abusivement) « identité » ou encore ET exclusif (XAND).
Son symbole est traditionnellement un point ("DOT" en anglais) dans un cercle : « ⊙ ».
Définition
Appelons A et B les deux opérandes considérés. Convenons de représenter leur valeur ainsi :
- 1 = VRAI
- 0 = FAUX
L'opérateur XNOR est défini par sa table de vérité, qui indique pour toutes les valeurs
possibles de A et B la valeur du résultat S :
Entrée | Sortie | |
A | B | A XNOR B |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
Quelques propriétés mathématiques
- <math>a \odot a = 1</math>
- <math>a \odot 0 = \bar{a}</math>
- <math>a \odot 1 = a</math>
- <math>a \odot \bar{a} = 0</math>
- Commutativité <math>a \odot b = b \odot a</math>
- Associativité <math>a \odot (b \odot c) = (a \odot b) \odot c = a \odot b \odot c</math> mais <math>\bigodot (a,b,c) \neq a \odot b \odot c</math>
- <math> a \odot b = \overline{a \oplus b}</math> et <math> a \odot b \odot c = a \oplus b \oplus c</math> où <math>\oplus </math> est le OU exclusif.
- <math>a \odot b = ab + \overline{a} \cdot \overline{b}</math>
- <math>a \odot b = 0</math> si et seulement si <math>a \neq b</math>
Application en électronique
Exemple d'utilisation : Le Circuit intégré 747266 TTL ou le circuit intégré CMOS 747266 intègre quatre portes logiques du type NON-OU exclusif. Illustration : Exemple : La lampe s'allume si l'on appuie sur rien, ou si l'on appuie sur « a » et « b » simultanément.
- Équations
- <math>S = a \odot b</math>
- <math>S = \overline{a \oplus b}</math>
- <math>S = ab + \overline{a} \overline{b}</math>
- Symbole IEC
- Fichier:IEC XNOR.svg
Symbole Informatique
- En HTML, on le note
⊙
. - En ASCII étendu, le code hexadécimal est
0x2299
.