Number of Bits for Decimal Integer/Examples/14 Digits

From ProofWiki
Jump to navigation Jump to search

Example of Number of Bits for Decimal Integer

A positive integer $n \in \Z_{>0}$ which has $14$ digits when expressed in decimal notation may require $47$ bits to represent in binary.


Proof

Let $n$ have $m$ digits.

Let $d$ be the number of bits that may be needed to represent $n$.

From Number of Bits for Decimal Integer:

\(\ds d\) \(=\) \(\ds \ceiling {\dfrac {14} {\log_{10} 2} }\)
\(\ds \) \(=\) \(\ds \ceiling {\dfrac {14} {0 \cdotp 301 \ldots} }\)
\(\ds \) \(=\) \(\ds \ceiling {46 \cdotp 51 \ldots}\)
\(\ds \) \(=\) \(\ds 47\)

$\blacksquare$


Sources