46.7k views
0 votes
You have a coord grid that is 96x96. what is the minimum number of bits that you will need to encode a coordinate in that space

User Guy Royse
by
8.4k points

1 Answer

2 votes
One bit can code 2 type of possibilities. That mean 1 bit code 2^1 possibilities, 2 bits code 2^2 possibilities and X amount of bits will code 2^X possibilities. In this case, you need to code 96x96 possibilities= 9216 possibilities. To answer this question, you need to find out how much it will be in 2^X form. The fast way to solve it by dividing it with 32(2^5) until the value <32 then divide it with 2(2^1) till it become <1

9216/32= 288
288/32= 9 -->take the 1 extra to made it 8
8/2= 4
4/2= 2
2/2=1
1/2= 0.5

The number is divided by 32 two times and divided by 2 four times. Then the number of bits would be
5*2 + 1*4= 14 bits
The answer will be 14 bits since 14 bits will code 16384 possibilities
User Marten Veldthuis
by
8.0k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.