Let \(X\) be the number of distinct 16-bit integers in 2’s complement…

2016

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 \(X −Y\) is ____________ .

Attempted by 260 students.

Show answer & explanation

Correct answer: 1

Answer: 1

Explanation:

  • Number of distinct 16-bit integers in two's complement (X): Every 16-bit bit pattern maps to a unique integer, so X = 2^16 = 65536.

  • Number of distinct 16-bit integers in sign-magnitude (Y): There are 2^16 bit patterns, but +0 and -0 represent the same integer, so Y = 2^16 − 1 = 65535.

  • Therefore X − Y = 65536 − 65535 = 1.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir