The Gateway to Computer Science Excellence
+8 votes

The decimal number has 64 digits. The number of bits needed for its equivalent binary representation is?

  1. 200
  2. 213
  3. 246
  4. 277
in Digital Logic by (111 points) | 5.2k views
I think this question was missing some extra info like log5=xxx and log10 = xxx ? I lost 3 marks and bonus - one negative mark for wrong answer. I took log10 value as 3 and then finally got 192 bits and approximated it as 200 as i was not aware of log10 base 2 value:(I know it would be little more than 3 but not sure how much))


P.S.: My attitude in those days was like why should I memorize things, we are Engineers if needed we should derive it on the fly but I failed in rush of exam,  but if you ask me now I would definitely say memorizing few things will help saving your time in competitive exams like ISRO.  I learned my lesson :) I hope it helps some one :)
How do we calculate log10base2 in exam without calculator.

4 Answers

+28 votes
Best answer
The concept is "maximum value of 10 digit number represented by 64 digits should be equal to x digits number in base 2."

For maximum value with 64 digits, each digit must be 9. This is given by $10^{64} - 1$. Similarly, maximum value of $x$ digits in binary is $2^x - 1$.

So $10^{64}-1 = 2^x-1$

$10^{64} = 2^x$

$x = 64 . \log_2 10$

$x = 64 \times 3.32 \approx 213.$
by (189 points)
edited by
i think you are correct but there is a mistake in the last step. The $log_{2}10$ = 3.32 not 3.21 but final answer is correct.


why u have taken -1 on both the sides in step 1?

i did not get....
See now..
maximum value represented by n-digit number is given by ; (Base^n) -1 can check for example 3 bit binary which represent maximum number is 111 whose decimal value equivalent is (2^3)-1=7

@ponagraj How to solve this type of questions in which log is involved do we need to remember log values.

+4 votes

Suppose n bit binary number requires d digit in decimal representation.

Then relationship can be shown as

d>nlog1o 2

Here d=64


So n=64/.3010

     n=213 (apx)

Reference :Number of Digit in Binary

by Boss (38.7k points)
edited by

how do u create log1o 2?  Go detail

Suppose all are 9

means 64 number of 9 , then how do u represent by 213 bits?

Not getting your fact ?

Formula applicable for all decimal number with base 10.

I am editing ans see ?
@srestha .... decimal is not like hexa-decimal where each digit takes 4 bit ......
even if all 64 digits in decimal are 9 then also its binary representation will have maximum 213 bits.

yes @Manoj @vijay

I got it

but I think @Manoj u r applying wrong formula

max number of bits in d digit number is floor(log210) +1 =193

I also do this like that

1 bit decimal can be represent in (1 to 4) bit binary

2 bit decimal can be represent in (4 to 7) bit binary

3 bit decimal can be represent in (7 to 10) bit binary

So, n bit decimal can be represent 3⨉n +1 bit binary = 3⨉64+1 =193 bit binary


can u please answer this one

The decimal number has 64 digits. The number of bits needed for its equivalent Octal representation is?

+2 votes

The concept is the maximum number of 10 digit number by 10 digit should be equal to x digit number in base 2.

So 10^64-1=2^x-1

taking log both side . take log of base 2 so that RHS can become x

64 log10 base2=x

So, x=206.08 

approx 206

by Boss (13.8k points)
take log value correctly ans=213 bits
0 votes
Decimal number 8 and 9 can be represented 4 bits in binary numbers

So, maximum digit to represent a decimal number is 4

To represent 64 bit decimal to binary , number of bits required 64⨉4=256
by Veteran (119k points)
maximum number having n digit with base-x can be expressed as x^n-1

for 64 in base-10 , it will be 10^64-1

let in binary no. of digit is n then number will be 2^n-1

now, 10^64-1<=2^n-1

nlog2 = 64log10

n =64*1/0.3010

hence n=213 so it is (b)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,324 answers
105,169 users