This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

BitGet

BitGet
gets the bit corresponding to the coefficient of in the integer n.
  • BitGet gets the bit k places from the right.
  • BitGet represents the bits it retrieves as 0 or 1.
Display coefficients at powers of 2 in the integer 42:
Get the bit corresponding to the coefficient at :
Get the bit corresponding to the coefficient at :
Display coefficients at powers of 2 in the integer 42:
In[1]:=
Click for copyable input
Out[1]=
Get the bit corresponding to the coefficient at :
In[2]:=
Click for copyable input
Out[2]=
Get the bit corresponding to the coefficient at :
In[3]:=
Click for copyable input
Out[3]=
New in 6