Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Mathematica > Bitwise Operations >

BitLength

BitLength[n]
gives the number of binary bits necessary to represent the integer n.
  • For positive n, BitLength[n] is effectively an efficient version of Floor[Log[2, n]]+1.
New in 6
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team