473 views
0 votes
0 votes

Let X be the number of distinct 16-bit integers in 2′s complement representation. Let Y be the number of distinct 16-bit integers in sign magnitude representation Then XY is______.

Here if we take 2 as number then its 2's complement and sign mangitude both will same lead to 0 answer 

but here it is 1 ..how?

Note : : Before Closing thiz ques Give answer

3 Answers

0 votes
0 votes

Let us first see about 2's Complement Numbers

The range of n-bit 2's Complement Numbers is -($2^{n-1}$) to +($2^{n-1}-1$)

For example, if n = 2, then -2, -1, 0, 1 belong to the range(which are distinct)

So, we can generalize that $2^{n}$ distinct integers are possible with n-bit 2's Complement Number =====> X

Sign & Magnitude

The range of n-bit Sign & Magnitude Numbers is -($2^{n-1}-1$) to +($2^{n-1}-1$)

For example, if n = 2, then -1, -0, +0, +1 belong to the range in which -0 = +0 and these are not distinct

Now, we can generalinze $2^{n}-1$ distinct Integers are possibe with n-bit Sign & Magnitude number ======>Y

X-Y = $2^{n}$ - ($2^{n}-1$)

      = 1

0 votes
0 votes

 Number of distinct 16-bit integers in 2′s complement representation  : it means how many number you can get using 16 bit in 2's complement Representation.

X : The range of n-bit 2's Complement Numbers is -(2n-1) to +(2n-1-1) i.e total 2distinct integer.

Number of distinct 16-bit integers in sign magnitude representation : It means how many distict number you can form using 16 bit signed representation.

Y : The range of n-bit Sign & Magnitude Numbers is -(2n-1−1) to +(2n-1−1) i.e total 2n-1 distinct integer.

So X-Y = (2n)- (2n-1)

= 1 

Related questions

2 votes
2 votes
0 answers
1
hem chandra joshi asked Jan 29, 2018
203 views
I have queryHow we can expand this a[0] =*(a..something like) ??
3 votes
3 votes
1 answer
2
hem chandra joshi asked Nov 25, 2017
301 views
From CLRS the complexity of radix sort is theta(d(n+k)) where d is # of digits , k is range and n is numbers . So how option C is right . Plz solve it on the basis of min...