BitLength
BitLength(x)gives the number of bits needed to represent the integer
x. The sign ofxis ignored.
Examples
>> BitLength(1023)10
>> BitLength(100)7
>> BitLength(-5)3
>> BitLength(0)0Implementation status
- ✅ - full supported
BitLength(x)gives the number of bits needed to represent the integer
x. The sign ofxis ignored.
>> BitLength(1023)10
>> BitLength(100)7
>> BitLength(-5)3
>> BitLength(0)0