Bit length & MSB explainedHow floor(log₂ n) + 1 gives you the number of bits you need to encode n.Read