+1 vote
69 views
A decimal number has 25 digits. The number of bits required for its equivalent binary representation is approximately?

To understand this question, let's take a simple example.

Three digits smallest decimal number is 100 and the greatest number 999. To represent 100  in binary we need 7 bits, and 10 bits to represent largest number 999.

To represent 1024($2^{10})$, we need $log_{2}^{2^{10}}$ = 10 bits.

To represent 100 in binary, we need $log_{2}^{10^{2}}$ = 2*$log_{2}^{10}$

To represent smallest possible decimal number with d digits in binary : (d-1)*$log_{2}^{10}$ bits
To represent largest possible decimal number with d digits in binary : (d)*$log_{2}^{10}$ bits

Smallest decimal number with 25 digits will require 24*$log_{2}^{10}$ = 80 bits
Largest decimal number with 25 digits will require 25*$log_{2}^{10}$ = 84 bits

PS: consider ciel value.

answered by Veteran (14.9k points) 6 19 58
selected
Let x bits are needed to represent max no having 25 digi. ....

Now

Formula....

maximum no.(25-dig)=maximum no having x-bits

9999...9(25-times)=2^x-1

U will get....(83.something)...consider ceil value .....ans.84
answered by Active (1.4k points) 3 8