How many bits are needed to encode the following?

77 Views Asked by At

1) Students in this section (there are 57)

2) Students in this class (there are 117)

3) The range from 327 to 234,341 inclusive.

4) The range from 0 to 1,024 inclusive.

1,2,and 4 are trivial (at least I believe so, if they are 6, 7, and 11)

However, number 3 I am unsure of. Obviously you could see how many bits you need to encode up to 234,341, but I think there is a way to do this problem and reduce the number of bits needed, I just don't know how.

1

There are 1 best solutions below

2
On BEST ANSWER

HINT

You can encode $x-327$ instead of $x$, and add $327$ to the decoded value.