83 views

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

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

i think i m taking it in wrong way .. tie

can u tell simple meaning of

Let X be the number of distinct 16-bit integers in 2′s complement representation.  ?

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

dude i ask many ones but mostly did not reply i don't why

in following figure

https://gateoverflow.in/29098/gate2003-47?show=61566#c61566

why Z goes down ?