GATE / CS ARCHIVE

GATE CSE 2018 / QUESTION 33

Exact fixed-point representability

Digital Logic · Number Systems & Computer Arithmetic · Full GATE CSE 2018 paper

GATE 2018, Q33 2 marks · MCQ
Report issue

Number Systems & Computer Arithmetic

Question 33, GATE 2018: An unsigned 8-bit fixed-point format is b7b6b5b4b3.b2b1b0. Values are i 31.500, ii 0.875, iii 12.100, iv 3.001. Which cannot be exact? A all; B ii only; C iii,iv only; D i,ii only.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Method

The three fractional bit weights are 1/2,1/4,1/8. Thus every stored value is an integer multiple of 1/8 within [0,255/8]. Multiplying a proposed value by 8 must yield an integer between 0 and 255. As examples, 31.5=11111.100₂ and 0.875=00000.111₂. Values 12.1 and 3.001 satisfy the range constraint but fail the granularity constraint; being small enough does not make a decimal fraction exactly representable.

Solution

Three fractional bits give increments of 1/8 and maximum 31.875. Both31.500=252/8 and 0.875=7/8 are representable. But12.100·8=96.8 and 3.001·8=24.008 are not integers, so iii and iv are not exact, C.

Original paper, page 13 · Answer key