26.3k views
6 votes
What is the smallest number of bits that would be needed to store the number '50' in binary?​

User ShreyasG
by
3.7k points

1 Answer

0 votes

Answer:

6 bits

Step-by-step explanation:

5 bits gets you 2^5=32 possibilities (values 0-31), which is not enough for 50.

6 bits gets you 2^6=64 possibilities (values 0-63), which is enough.

To calculate for an arbitrary number, take the 2-log, and round up:


\log_2(50) \approx 5.64

rounded up is 6.

User Heracek
by
3.7k points