Q. The maximum positive number which can be represented in a computer system with word length of n bits is :

A
(2^n)
B
(2^n-1)
C
(2^{n+1})
D
(2^n+1)
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.

Entri PDF Icon

Get Question Bank

Strengthen Your Practice with our comprehensive question bank.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!