BinaryCon Binary Converter

Bit Length Calculator

Result

Bit Length Calculator

Calculate the minimum number of bits required to represent a value.

Example: 123

Definition: Returns the number of bits required to represent the provided integer or value in binary.

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