Programming
February 13, 2024Question 9 – ISRO-2018
February 13, 2024ISRO-2018
Question 7 |
A computer uses ternary system instead of the traditional binary system. An n bit string in the binary system will occupy
3+n ternary digits | |
2n/3 ternary digits | |
n(log23) ternary digits | |
n(log32 ) ternary digits |
Question 7 Explanation:
→ Binary numbers are maximum 2n-1.
→ But in question they are given ternary numbers, it means 3x-1.
→ Both will take different no. of bits to represent the same number.
3x -1 = 2n -1
3x = 2n
Apply log on both side
x= log3( 2n)
x=n*log32 .
→ But in question they are given ternary numbers, it means 3x-1.
→ Both will take different no. of bits to represent the same number.
3x -1 = 2n -1
3x = 2n
Apply log on both side
x= log3( 2n)
x=n*log32 .
Correct Answer: D
Question 7 Explanation:
→ Binary numbers are maximum 2n-1.
→ But in question they are given ternary numbers, it means 3x-1.
→ Both will take different no. of bits to represent the same number.
3x -1 = 2n -1
3x = 2n
Apply log on both side
x= log3( 2n)
x=n*log32 .
→ But in question they are given ternary numbers, it means 3x-1.
→ Both will take different no. of bits to represent the same number.
3x -1 = 2n -1
3x = 2n
Apply log on both side
x= log3( 2n)
x=n*log32 .