Skip to content

GATE CS 2019 Q22 — Number Representations (Fixed and Floating Point)

Explain with AI
Two numbers are chosen independently and uniformly at random from the set {1,2,…,13}.\{1,2,\ldots,13\}.
The probability (rounded off to 33 decimal places) that their 4-bit4\text{-bit} (unsigned) binary representations have the same most significant bit is ___________.
View worked solution

Answer: 0.502 : 0.504

To find the probability that two independently and uniformly chosen numbers from the set {1,2,…,13}\{1, 2, \ldots, 13\} have the same most significant bit (MSB) in their 4-bit unsigned binary representation, we first determine the MSB of each number.

The 4-bit binary representations of the numbers from 11 to 1313 are:

  • MSB = 0:
    • 1=000121 = 0001_2
    • 2=001022 = 0010_2
    • 3=001123 = 0011_2
    • 4=010024 = 0100_2
    • 5=010125 = 0101_2
    • 6=011026 = 0110_2
    • 7=011127 = 0111_2
    There are n0=7n_0 = 7 numbers with MSB=0\text{MSB} = 0.
  • MSB = 1:
    • 8=100028 = 1000_2
    • 9=100129 = 1001_2
    • 10=1010210 = 1010_2
    • 11=1011211 = 1011_2
    • 12=1100212 = 1100_2
    • 13=1101213 = 1101_2
    There are n1=6n_1 = 6 numbers with MSB=1\text{MSB} = 1.

Since the two numbers are chosen independently and with replacement, the total number of possible outcomes is:

Total outcomes=13×13=169\text{Total outcomes} = 13 \times 13 = 169

The favorable outcomes are those where both numbers have the same MSB:

  1. Both numbers have MSB=0\text{MSB} = 0: 7×7=497 \times 7 = 49 ways
  2. Both numbers have MSB=1\text{MSB} = 1: 6×6=366 \times 6 = 36 ways

Thus, the total number of favorable outcomes is:

Favorable outcomes=49+36=85\text{Favorable outcomes} = 49 + 36 = 85

The required probability is:

P=85169≈0.502958P = \frac{85}{169} \approx 0.502958

Rounding off to 33 decimal places, we get 0.5030.503.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Number Representations (Fixed and Floating Point) questions