The GATE Grind

GATE 2018 CS – Question 43

Computer Organization and Architecture · Number Representation and Floating Point Arithmetic · 2 marks · Multiple choice

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

$b_7b_6b_5b_4b_3.b_2b_1b_0$

where the position of the binary point is between $b_3$ and $b_2$. Assume $b_7$ is the most significant bit. Some of the decimal numbers listed below cannot be represented exactly in the above representation:

(i) 31.500 (ii) 0.875 (iii) 12.100 (iv) 3.001

Which one of the following statements is true?

  1. None of (i), (ii), (iii), (iv) can be exactly represented
  2. Only (ii) cannot be exactly represented
  3. Only (iii) and (iv) cannot be exactly represented
  4. Only (i) and (ii) cannot be exactly represented

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (C) Only (iii) and (iv) cannot be exactly represented

Explanation

There are 5 integer bits (range up to 31.875) and 3 fractional bits (multiples of $\frac18$). $31.5=11111.100_2$ and $0.875=\frac78$ are representable, but $0.100$ and $0.001$ are not multiples of $\frac18$, so (iii) and (iv) cannot be represented exactly.