BitLength

BitLength[n]

gives the number of binary bits necessary to represent the integer n.

Details

Examples

Basic Examples  (2)

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

Plot it:

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

See Also

Log2  IntegerLength  IntegerExponent  MantissaExponent  IntegerDigits  BitShiftRight  ByteCount

Tutorials

Introduced in 2007
(6.0)