DOCUMENTATION CENTER SEARCH
Mathematica
>
Bitwise Operations
>
Built-in
Mathematica
Symbol
Integer and Number Theoretic Functions
Tutorials »
|
Log
IntegerLength
IntegerExponent
MantissaExponent
IntegerDigits
BitShiftRight
ByteCount
See Also »
|
Bitwise Operations
Integer Functions
Memory Measurement & Optimization
New in 6.0: Number Theory & Integer Functions
More About »
BitLength
BitLength
[
n
]
gives the number of binary bits necessary to represent the integer
n
.
MORE INFORMATION
For positive
n
,
BitLength
[
n
]
is effectively an efficient version of
Floor
[
Log
[2,
n
]]+1
.
For negative
n
it is equivalent to
BitLength
[
BitNot
[
n
]]
.
EXAMPLES
CLOSE ALL
Basic Examples
(1)
In[1]:=
Out[1]=
SEE ALSO
Log
IntegerLength
IntegerExponent
MantissaExponent
IntegerDigits
BitShiftRight
ByteCount
TUTORIALS
Integer and Number Theoretic Functions
MORE ABOUT
Bitwise Operations
Integer Functions
Memory Measurement & Optimization
New in 6.0: Number Theory & Integer Functions
New in 6
© 2008 Wolfram Research, Inc.