Why is MSB counted?

Here while calculating decimal quantity of the corresponding binary why is MSB also taken into account as it is just used for sign, so shouldnt the powers of 2 be limited to 6(2^6) , why is 2^7 also taken?

The MSB isn’t for denoting positive or negative. Only when you write the number in a certain bit length like say, if you agree to write all numbers in 4 bit length, then 4th bit from left represent the sign of number. Usually in computer integer is represented as 32 bit, so 32th bit represent sign of it.

yeah so we don’t take into account the 32th bit then , right?
am i on the right lane here or not?

Yes for a 32 bit system 32th bit is for sign and for 64 bit system 64th bit is for sign

That’s the reason we calculate till 2^31 only ,right?

Yes. (Filling the minimum character limit, ignore the bracket content)

1 Like