The n-bit fixed-point representation of an unsigned real number X uses f bits for the fraction part. Let i = n - f. The range of decimal values for X in this representation is. 

This question was previously asked in
GATE CS 2017 Official Paper: Shift 1
View all GATE CS Papers >
  1. 2-f to 2i
  2. 2-f to (2i - 2-f
  3. 0 to 2i
  4. 0 to (2i - 2-f

Answer (Detailed Solution Below)

Option 4 : 0 to (2i - 2-f
Free
GATE CS Full Mock Test
5.4 K Users
65 Questions 100 Marks 180 Mins

Detailed Solution

Download Solution PDF

Diagram:

F1 R.S Madhu 2.12.19 D5

i represents an integral part of the and f represents the fractional part of the number.

Since, the n number is in unsigned representation, it's decimal value starts with 0. So Minimum value will be zero.

Range of unsigned representation is 0 to 2i - 1.

So, the mum value with i bits goes to 2i - 1.

Fraction of value is in the form of 2(-i). So, when we take the value of i = 1, 2, 3 … n this range of fractional value goes like, 2-1, 2-2, 2-3, …

So, it makes a GP series, with f bit maximum number possible is sum of GP series.

Consider a = ½, r = ½

Maximum value with f bits possible

= \(\frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \frac{1}{{16}} + \frac{1}{{32}} + \ldots \)

= \(a \times \frac{{1 - {r^n}}}{{1 - r}}\)

\(= \frac{1}{2}\;\frac{{1 - {{\left( {\frac{1}{2}} \right)}^f}}}{{1 - \frac{1}{2}\;}} = 1 - {2^{ - f}}\;\)

So, maximum fractional value possible

= maximum value with i bits + maximum value with f bits

= 2i - 1 + 1 - 2-f

= 2i - 2-f

So, require range will be 0 to 2i - 2-f
Latest GATE CS Updates

Last updated on Jan 8, 2025

-> GATE CS 2025 Admit Card has been released on 7th January 2025.

-> The exam will be conducted on 1st February 2025 in 2 shifts.

-> Candidates applying for the GATE CE must satisfy the GATE Eligibility Criteria.

-> The candidates should have BTech (Computer Science). Candidates preparing for the exam can refer to the GATE CS Important Questions to improve their preparation.

-> Candidates must check their performance with the help of the GATE CS mock tests and GATE CS previous year papers for the GATE 2025 Exam.

Get Free Access Now
Hot Links: teen patti teen patti gold new version teen patti download teen patti master 2023 teen patti app