Q. The maximum positive number which can be represented in a computer system with word length of n bits is :
Solution:
Two complement can represent any number within the range -(2^(n-1)) to+(2^(n-1) -1) where the highest bit represents -2^(n-1) (e.g. for the 8bit 0b10000000 we get -128. Well if the highest bit produces the negative number, then the best thing to do to get the highest number in a N bit two’s complement would be to set all bits that aren’t negative like this 0b01111111.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.