Diferencia entre revisiones de «xor»

De ArduWiki
Saltar a: navegación, buscar
(Vea también)
(Referencias)
 
(No se muestran 6 ediciones intermedias del mismo usuario)
Línea 17: Línea 17:
 
<pre>
 
<pre>
 
espresion 1 ^ expresion 2
 
espresion 1 ^ expresion 2
 +
espresion 1 xor expresion 2
 
</pre>
 
</pre>
  
Línea 30: Línea 31:
  
 
== Vea también ==
 
== Vea también ==
* [[not]] <nowiki>(!)</nowiki>
+
<categorytree mode=all>Operador logico</categorytree>
* [[and]] <nowiki>(&&)</nowiki>
+
<categorytree mode=all>Operador bit a bit</categorytree>
* [[or]]  <nowiki>(||)</nowiki>
+
<categorytree mode=all>Funciones bit y byte</categorytree>
* [[not bit a bit]] <nowiki>(~)</nowiki>
 
* [[and bit a bit]] <nowiki>(&)</nowiki>
 
* [[or bit a bit]] <nowiki>(|)</nowiki>
 
* [[xor bit a bit]] <nowiki>(^)</nowiki>
 
* [[bitshift right]] <nowiki>(>>)</nowiki>
 
* [[bitshift left]] <nowiki>(<<)</nowiki>
 
  
 
== Referencias ==
 
== Referencias ==
 
* [https://www.arduino.cc/reference/es/language/functions/time/millis/ Guia de referencia de Arduino]
 
* [https://www.arduino.cc/reference/es/language/functions/time/millis/ Guia de referencia de Arduino]
 +
* [https://programarfacil.com/blog/programacion/la-logica-en-la-programacion/ La lógica en la programacion] - Luis Del Valle
 +
* [https://aprendiendoarduino.wordpress.com/category/operadores/ Operadores] - Aprendiendo Arduino
  
[[Category:Estructura]]
+
[[Category:Operador logico]]

Revisión actual del 17:40 6 jun 2020

Descripción

Es un operador boleano xor ^ que permite unir dos expresiones lógicamente.

a b a ^ b
0 0 0
1 0 1
0 1 1
1 1 0

Sintaxis

espresion 1 ^ expresion 2
espresion 1 xor expresion 2

Retorna

Verdadero o falso.

Advertencias

  • No confundir el operador boleano xor ^, con el operador xor bit a bit |.

Ejemplo


Vea también

  and
  not
  or
  xor


Referencias