The internet tells me there are 136 million items in the US
The internet tells me there are 136 million items in the US Library of Congress. How many bits do you need to name each item uniquely?
PS:The question means to say that there are 136 million books in the library. You need to name each one uniquely using bits.
Solution
Okay,I got your question.It\'s quite interesting.
So,as you said that you need to name each one uniquely using bits then number of bits required to name each item.
so, the formula is
xy = z
where
x= 2(base in binary)
y=no of bits required
z= the product number in this case 136 million ( 136000000 )
Applying log , we get
y log x = log z
y = ( log z ) / (log x)
= ( log (136000000) ) / log 2
= 27.3 (aprox)
Therefore,we need 28 bits to name each item in the US library of congress uniquely
Hope,I answered your question.Any further help .Please let us know.We will love to help you
