The Gateway to Computer Science Excellence

+8 votes

Best answer

+12 votes

Maximum No. possible using n-bit in Binary:- 2^{n} -1

Maximum no. possible using x bit in Ternary:- 3^{x} -1

Both will take different no. of bits to represent same number.

3^{x} -1 = 2^{n} -1

3^{x }= 2^{n}

taking log on both side:;-

X= log_{3} ( 2^{n } )

X=n*log_{3}2 .

+1

For example:-

10^{n} = 1000. For what value of n we get this

take log base 10 on both side.

log(10^{n} ) = log(1000)

n log(10) = 3* log(10)

n=3.

In same manner to find value of X i take log base 3 on both side

+1

the problem is simply trying to ask---> given an n-bit binary number howmany digits that that it would be required to represent that number in ternary number system....so here we try to find howmany number of digits in ternary number system that will be required to represent the maximum valued n-bit binary number......

so,let x digits required in ternary number system to represent the maximum valued n-bit binary number which is (2^n-1)(in decimal)....and maximum valued decimal number with x digit in ternary number system will be (3^x-1)...

so ,(2^n-1)<=(3^x-1)

=> 2^n<=3^x

=> x>=nlog2**base**3

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,312 answers

198,341 comments

105,031 users