Bit Length Calculator
Result
—
Bit Length Calculator
Calculate the minimum number of bits required to represent a value.
Definition
Bit length: the minimum number of bits required to represent a non-negative integer n is floor(log2(n)) + 1. For n=0 length is 1. Example: n=13 → floor(log2(13))+1 = 3+1 = 4 bits