edited by
875 views
1 votes
1 votes
A decimal number has $25$ digits. The number of bits required for its equivalent binary representation is approximately??

according to me I got $83$  but answer given Virtual gate is $75 $please check??? I am right or wrong
edited by

1 Answer

2 votes
2 votes
Maximum number that can be represented with $n-bits$ in base $x$ $= x^n - 1$

Maximum no. with $25$ bits in $base-10$ $=$ $10^{25}-1$ and maximum number with $k$ bits in $base-2$ $= 2^x-1$

In order to be able to be represent every $25-bit$ decimal number with $k$ bits in binary $10^{25}-1 \leq 2^k -1$

$log_{2}(10^{25} ) \leq k$

$25*log_2{10} \leq k$

$k \geq 83.048$   $\rightarrow$ $k = 84$

Related questions

1 votes
1 votes
2 answers
1
0 votes
0 votes
1 answer
2
99Monish asked Dec 18, 2021
3,864 views
What is the difference between 2’s complement and 2’s complement representation of a number? Please can you do 2’s complement of (43) and (-43) and also represent 4...
3 votes
3 votes
1 answer
3