The original question can be found at the following source: Berkeley PDF, Page 2, Q2.
Considering \(2^{-146} < 2^{-126},\) we are dealing with a denormalized number.
Important Note:There are two formulas applicable for IEEE 754 Single Precision –
\[
\begin{array}{c}
\text{1. Formula for Normalized Numbers:}
\end{array}
\]
\[
\color{red}
\begin{equation}
(-1)^{\text{sign}} \times 1.\text{significand} \times 2^{\text{Stored Exponent} - 127}
\end{equation}
\]
\[
\begin{array}{c}
\text{2. Formula for Denormalized Numbers:}
\end{array}
\]
\[
\color{red}
\begin{equation}
(-1)^{\text{sign}} \times 0.\text{significand} \times 2^{-126}
\end{equation}
\]
Given the magnitude of the number \(-2^{-146},\) it falls within the denormalized category. In mathematical terms, if the magnitude of a number is strictly less than \(2^{-126},\) it is classified as a denormalized number.
Now, let's explore the significance of \(2^{-126}.\)
Why we are fixing \(2^{-126} \) for denorms ?
To answer this, consider the least positive number storable in normalized form.
Formula for Normalized Numbers: \[(-1)^{\text{sign}} \times 1.\text{significand} \times 2^{\text{Stored Exponent} - 127}.\]
For the least positive normalized number:
- Sign = 0 (positive)
- Significand (or mantissa or fraction) = all zeros
- Stored Exponent should be the least but cannot be all zeros (normalized numbers cannot have all zeros or all ones); hence, it should be 0000 0001.
Therefore, the least positive normalized number is EXACTLY equal to \(2^{-126}.\) It is the boundary where normalized numbers ends, and denormalized numbers starts. (jaha normalized ki range khatam hoti h waha se denomalralised ki boundary shuru hoti h.)
Hence, "-126" is a clever choice for denormalized numbers.
Formula for Denormalized Numbers: \[(-1)^{\text{sign}} \times 0.\text{significand} \times 2^{-126}.\]
The number we aim to store is: $ -2^{-146} $.
\[ -2^{-146} = - 2^{-20} \times 2^{-126} \] \[ -2^{-146} = - 2^{-20} \times 2^{-126} = (-1)^{1} \times2^{-20} \times 2^{-126}\]
\[= (-1)^{1} \times 0.000...01000 \times 2^{-126}.\]
\[
\begin{array}{|l|l|l|}
\hline \text{sign} & \text{exponent} & \text{mantissa} \\
\hline
\end{array}
\]
\[ \text{sign} = 1 \text{ (negative number)},\]
\[ \text{exponent} = 0 \text{ (for denormalized numbers)},\]
\[ \text{mantissa} = 000...01000 \text{ (for } 2^{-20} ).\]
\[ \text{Putting it all together:} \quad \begin{array}{|l|l|l|} \hline \text{1} & \text{00..000} & \text{000...01000} \\ \hline \end{array} \]
\[0\text{x}80000008.\]
---