[decimal] Calculating bits required to store decimal number