GATE | GATE-CS-2005 | Question 16



The range of integers that can be represented by an n bit 2’s complement number system is
(A) – 2n – 1 to (2n – 1 – 1)
(B) – (2n – 1 – 1) to (2n – 1 – 1)
(C) – 2n – 1 to 2n – 1
(D) – (2n – 1 + 1) to (2n – 1 + 1)


Answer: (A)

Explanation: For example, signed char is 8 bits, we can store from -128 to 127 using sign char. Refer http://en.wikipedia.org/wiki/Two%27s_complement
for more details.


Quiz of this Question



My Personal Notes arrow_drop_up

Article Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.