Index
 
  Reference for Wiring 1.0 (ALPHA) 0017+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.
Name  

^ (bitwise XOR)

   
Examples  
unsigned int a = 60;	// 60 = 0011 1100 
unsigned int b = 13;	// 13 = 0000 1101 
unsigned int c = 0;           
 
c = a ^ b;              // 49 = 0011 0001 

Description   Compares two expressions bit by bit and returns 1 for a position bit if one compared postitions is 1. Returns 0 for that position bit if both compared positions are 0 or 1. The following list shows all possible combinations:

두개의 표현식을 조사하여 둘 중 하나만 1 일 때 1 을 반환합니다. 둘 다 0 이거나 둘 다 1 이면 0 을 반환합니다.

1 ^ 0 // Evaluates 1 because the first is 1
0 ^ 1 // Evaluates 1 because the second is 1
1 ^ 1 // Evaluates 0 because both are 1
0 ^ 0 // Evaluates 0 because both are 0

   
Syntax  
expression1 ^ expression2
   
Parameters  
expression1   any valid expression
표현 가능한 모든 식 (상수 포함)
expression2   any valid expression

표현 가능한 모든 식 (상수 포함)
   
Returns  
   
Usage   Application
   
Related   & (bitwise AND)
&= (bitwise AND and assign)
| (bitwise OR)
|= (bitwise OR and assign)
˜ (bitwise ones complement)
<< (bitwise bit shift left)
>> (bitwise bit shift right)