212k views
10 votes
g Let m be a positive integer with n -bit binary representation: What are the smallest and largest values that m could have?

User Sinan
by
4.2k points

1 Answer

5 votes

Answer:

The smallest value that m could have is 0, while the largest is
2^n - 1

Step-by-step explanation:

For numbers with n bits, we have that:

The minimum possible value is 0.

The maximum possible value is
2^n - 1

So, in this question, since the number m has n bits:

The smallest value that m could have is 0, while the largest is
2^n - 1

User Omar Wasow
by
4.3k points