Why you are taking 1(22 x's) ? It should not be 2^23 as we have complete 23 zeros to select from?

The Gateway to Computer Science Excellence

+2 votes

In the IEEE 754 notation , the number is represented in 32 bits . The first bit is for the sign of the number , next 23 bits is normalise mantissa and next 8 bits is biased exponent.

10 is represented as = $1.01*2^{3} = 1.01*2^{130-127}$ , which in 32 bit format would be represented as ,

$001(19 \ 0's)10000010$.

And 16 is represented as $1.0*2^4 = 1.0*2^{131-127}=0(23 \ 0's)10000011$.

Thus we need to find the number of possible patterns of 0's and 1's in the following format.

Keeping the exponent same , the number of patterns of mantissa of the form $01(21 \ x's)$ and $1(22 \ x's)$.Where $x's$ are the positions to fill with 0's and 1's .

Thus total number of possible patterns = $2^{21}(of \ the \ 1^{st} \ kind)+2^{22}(of \ the \ 2^{nd} \ kind)$ = $3*2^{21}(Ans)$.

10 is represented as = $1.01*2^{3} = 1.01*2^{130-127}$ , which in 32 bit format would be represented as ,

$001(19 \ 0's)10000010$.

And 16 is represented as $1.0*2^4 = 1.0*2^{131-127}=0(23 \ 0's)10000011$.

Thus we need to find the number of possible patterns of 0's and 1's in the following format.

Keeping the exponent same , the number of patterns of mantissa of the form $01(21 \ x's)$ and $1(22 \ x's)$.Where $x's$ are the positions to fill with 0's and 1's .

Thus total number of possible patterns = $2^{21}(of \ the \ 1^{st} \ kind)+2^{22}(of \ the \ 2^{nd} \ kind)$ = $3*2^{21}(Ans)$.

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.1k
- Non GATE 1.5k
- Others 1.5k
- Admissions 595
- Exam Queries 576
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 17

50,644 questions

56,505 answers

195,555 comments

101,052 users