Give the formulas for the minimum and maximum values representable in n bits for:
(a) unsigned
(b) signed magnitude
(c) two’s complement
(d) one’s complement
A. For unsigned numbers,
minimum value = 0
maximum value = 2n-1
For example for 5 bits range will be 0 to 31. 31 in binary 11111 that is max number possible using 5 bits.
B. For signed numbers,
minimum value = -(2(n-1)-1)
maximum value = (2(n-1)-1)
For example, for 6 bits -(25-1) to (25-1) means -31 to +31.
C. For two's complement,
minimum value = -(2(n-1))
maximum value = (2(n-1)-1)
For example, for 6 bits, range will be -(25) to (25-1) means -32 to +31.
C. For one's complement,
minimum value = -(2(n-1)-1)
maximum value = (2(n-1)-1)
For example, for 6 bits -(25-1) to (25-1) means -31 to +31.
Get Answers For Free
Most questions answered within 1 hours.