Skip to Content
0
Former Member
Apr 09, 2009 at 03:15 PM

Type I - bits consumed to represent the max. and min. possible integers!!

20 Views

Hallo all,

I have two very basic doubts.

Could you please clarify?

The value range for type I number is -2*31 to 2*31 - 1.

In binary form, the minimum value takes 31 bits: 1 followed by 30 zeroes.

And the maximum value takes 30 bits: 30 ones.

As the minimum value consumes 31 bits, we can infer that the 32nd bit (the most significant one) is for the sign.

Doubt 1: Why does the max value consume only 30 bits? Why not 31 bits?

Doubt 2: If the min. value can have all ones, the range can be wider (sum of 2*31 and 2*31 - 1). Why is that not possible?

Thanks for your time 😊

Santhosh.