Mathematica 9 is now available

BitAnd

Usage

BitAnd[ ,  , ... ] 给出了整数  的位 AND 结果。


Notes

• 整数数学函数 (参见 A.3.10).
BitAnd[ ,  , ... ] 产生二进制表示在  的二进制表示的所有位置有一的位置为一的整数。
• 对负整数, BitOr 进行二的补表达。
• 参见 Mathematica 全书: 3.2.4.
• 同时参见: BitOr, BitXor, BitNot, And, IntegerDigits, DigitCount.
Further Examples

Here are two numbers in binary.

In[1]:=  

Out[1]//BaseForm=

In[2]:=  

Out[2]//BaseForm=

Here are the digits as lists.

In[3]:=  

Out[3]=

In[4]:=  

Out[4]=

The product of the two lists represents the BitAnd of the two numbers.

In[5]:=  

Out[5]=

In[6]:=  

Out[6]=

In[7]:=  

Out[7]=

Here BitAnd is used to construct a fractal.

Evaluate the cell to see the graphic.

In[8]:=  



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.