BitClear

BitClear[n,k]

sets to 0 the bit corresponding to the coefficient of in the integer n.

Details

  • BitClear[n,k] clears the bit k places from the right.

Examples

Basic Examples  (1)

Display coefficients at powers of 2 in the integer 63:

In[1]:=
Click for copyable input
Out[1]=

Clear the bit corresponding to the coefficient at 20:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Clear the bit corresponding to the coefficient at 23:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=

See Also

BitSet  BitGet  BitLength  BitAnd  ReplacePart

Tutorials

Introduced in 2007
(6.0)