BitXor
Usage
• BitXor[ , , ... ] gives the bitwise XOR of the integers  .
Notes
• BitXor[ , , ... ] • 对负整数, BitOr 进行二的补表达。 • 参见 Mathematica 全书: 节 3.2.4.
Further Examples
Here are three numbers in binary.
In[1]:=
|
Out[1]//BaseForm=
|
In[2]:=
|
Out[2]//BaseForm=
|
In[3]:=
|
Out[3]//BaseForm=
|
Here are the digits as lists.
In[4]:=
|
Out[4]=
|
In[5]:=
|
Out[5]=
|
In[6]:=
|
Out[6]=
|
Add the lists together and reduce modulo . The result represents the BitXor of the three numbers.
In[7]:=
|
Out[7]=
|
In[8]:=
|
Out[8]=
|
In[9]:=
|
Out[9]//BaseForm=
|
In[10]:=
|
|