retagged by
350 views

2 Answers

Best answer
1 votes
1 votes

1) Range of 1's complement is -2n-1 -1 to +2n-1 -1

No of bits require for -128 in 1s complement

-2n-1 -1 = -128
2n-1  = 129
2n = 258
or n = 9, so minimum 9 bits are require

2) Range of 2's complement number is -2n-1 to +2n-1 - 1

No of bits require for -128 in 2's complement

-2n-1 = -128
2n = 256
or n = 8, so minimum 8 bits are require

Statement 1 is false but Statement 2 is true.

selected by
1 votes
1 votes

1st is False.

1's complement representation, Range is ($-(2^{n - 1} - 1)$ to $(2^{n - 1} - 1)$.

Put n = 8, you will get - 127 to 127.

Note: In 1's complement representation, we have two representation for zero.
one is all zero which is 00000000 $\Rightarrow$ +0.
Other is all 1 which is 1111111  $\Rightarrow$ -0.

But zero is zero which has value zero.

2nd is true.

In 2's complement representation, Range is $-2^{n - 1}$ to $(2^{n - 1} - 1)$

Put n = 8, we have -128 to 127.

In 2's complement here we have only one representation for zero.

Related questions

1 votes
1 votes
0 answers
2
3 votes
3 votes
1 answer
3
Hardik Vagadia asked Dec 30, 2016
1,957 views
Is 2's complement code weighted or unweighted? Why?
3 votes
3 votes
2 answers
4
pC asked Aug 14, 2016
2,614 views
2s complement of - 539 is 539 so in her it is 21B should be the answer