Skip to content
Official PYQ · 2018

GATE CS 2018 Q33 — Number Representations (Fixed and Floating Point)

Explain with AI

Consider the unsigned 8-bit fixed point binary number representation, below,

b7  b6  b5  b4  b3  ⋅b2  b1  b0b_7 \: \: b_6 \: \: b_5 \: \: b_4 \: \: b_3 \: \: \cdot b_2 \: \: b_1 \: \: b_0

where the position of the primary point is between b3b_3 and b2b_2 . Assume b7b_7 is the most significant bit. Some of the decimal numbers listed below cannot be represented exactly in the above representation:

  1. 31.50031.500
  2. 0.8750.875
  3. 12.10012.100
  4. 3.0013.001

Which one of the following statements is true?

Choose one option
View worked solution

Answer: C

The given unsigned 8-bit fixed-point binary representation is:

b7b6b5b4b3⏟5 integer bits⋅b2b1b0⏟3 fractional bits\underbrace{b_7 \quad b_6 \quad b_5 \quad b_4 \quad b_3}_{\text{5 integer bits}} \quad \cdot \quad \underbrace{b_2 \quad b_1 \quad b_0}_{\text{3 fractional bits}}

1. Range and Resolution Analysis

  • Integer Part: Represented by 5 bits (b7b_7 to b3b_3). Since it is unsigned, the range of the integer part is from 00 to 25−1=312^5 - 1 = 31.
  • Fractional Part: Represented by 3 bits (b2b_2 to b0b_0). The resolution (step size) is 2−3=0.1252^{-3} = 0.125. Thus, any representable fractional part must be an integer multiple of 0.1250.125.

The only exactly representable fractional parts are:

0.000,  0.125,  0.250,  0.375,  0.500,  0.625,  0.750,  0.8750.000, \; 0.125, \; 0.250, \; 0.375, \; 0.500, \; 0.625, \; 0.750, \; 0.875

2. Evaluating the Options

  1. 31.50031.500:
    • Integer part 31≤3131 \le 31 (representable as 11111211111_2).
    • Fractional part 0.5000.500 is a multiple of 0.1250.125 (representable as 1002100_2).
    • Can be represented exactly.
  2. 0.8750.875:
    • Integer part 0≤310 \le 31 (representable as 00000200000_2).
    • Fractional part 0.8750.875 is a multiple of 0.1250.125 (representable as 1112111_2).
    • Can be represented exactly.
  3. 12.10012.100:
    • Fractional part 0.1000.100 is not a multiple of 0.1250.125.
    • Cannot be represented exactly.
  4. 3.0013.001:
    • Fractional part 0.0010.001 is not a multiple of 0.1250.125.
    • Cannot be represented exactly.

Thus, only iii and iv cannot be represented exactly.

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

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