570 views

Question 1 Explain What is  Denormalized Number

• Give Example
• Give Representation in IEEE 754 and excess 64 (if any)

Question 2 How to Convert $(12.625)_10$

$(12.625)_10 \Leftrightarrow (1100.101)_2$   to

• IEEE 754 Single Precision (With Normalization)
• IEEE 754 Single Precision (Without Normalization)
• Excess-64 (With Normalization)
• Excess-64 (Without Normalization)

retagged | 570 views
0

So,@ sudsho iin that case , you will store expo in signed format ? right ?

+1
@rahul_jain25

Suppose If 4 digits are allowed for Mantissa,

$1.0037 \times 10^{2} \Rightarrow 1.004 \times {2}$
0

actually my question is without normalsiation has only affect on mantessia or exponent also...seeing all the questions i think they already mentioned the format in the question how long is what field and what is the bias etc...if suppose nothing would have been given then without normalisation simply means a binary representation where we are dont have a single representation for the no....

doubt:if bias is not explicitly given in the question will i find it and do or just wite the no in signed format only as it is in the exponent field?

0
Thanks @pc
0

@sudsho if not IEEE-754  then representation should be given. I think so

To calculate the bias for an arbitrarily sized floating point number apply the formula 2k−1 − 1 where k is the number of bits in the exponent.

https://en.wikipedia.org/wiki/Exponent_bias

0
$2^{K-1}-1 \;\;\; ??$
+2
pC that formula is for IEEE standards only
0
if its nt given that we are using IEEE standards then take the maximum negative no in those many bits(exponent field) and use the positive of that as bias
0

Yeah, but for Excess-K  bias is $2^{K}$ .

But Unusually however, instead of using "excess 2n−1" it uses "excess 2n−1 − 1" (i.e. excess-15, excess-127, excess-1023, excess-16383)

Dont know why such custom ! But I think this is beyond the GATE scope :)

0

Question 1
For IEEE754  the value (N) is calculated as follows:

• For 1 ≤ E ≤ 254, N = (-1)^S × 1.F × 2^(E-127). These numbers are in the so-called normalized form. The sign-bit represents the sign of the number. Fractional part (1.F) are normalized with an implicit leading 1. The exponent is bias (or in excess) of 127, so as to represent both positive and negative exponent. The range of exponent is -126 to +127.
• For E = 0, N = (-1)^S × 0.F × 2^(-126). These numbers are in the so-called denormalized form. The exponent of 2^-126 evaluates to a very small number. Denormalized form is needed to represent zero (with F=0 and E=0). It can also represents very small positive and negative number close to zero.
• For E = 255, it represents special values, such as ±INF (positive and negative infinity) and NaN (not a number). This is beyond the scope of this article.

https://www3.ntu.edu.sg/home/ehchua/programming/java/datarepresentation.html

Question 2

IEEE 754 Single Precision (With Normalization)

With Normalization $\Rightarrow (-1)^{S} (1.M)_2 \times 2^{E-\text{bias}}$

$(1.100101)_2 \times 2^{3}$

$E-\text{bias}=\text{True Exponent}$

$E-127=3 \Rightarrow E=130$

$\underbrace{{\color{Red} {\textbf{0}} }}_{\text{sign}} |\underbrace{{\color{Blue} {\textbf{1000 0010}} }}_{\text{Exponent}} |\underbrace{{\color{Green} {\textbf{1001 0100 0000 0000 0000 000}} }}_{\text{Mantissa}}$

IEEE 754 Single Precision (Without Normalization)

Without Normalization $\Rightarrow (-1)^{S} (0.M)_2 \times 2^{E-\text{bias}}$

$(0.1100101)_2 \times 2^{4}$

$E-\text{bias}=\text{True Exponent}$

$E-127=4 \Rightarrow E=131$

$\underbrace{{\color{Red} {\textbf{0}} }}_{\text{sign}} |\underbrace{{\color{Blue} {\textbf{1000 0011}} }}_{\text{Exponent}} |\underbrace{{\color{Green} {\textbf{1100 1010 0000 0000 0000 000}} }}_{\text{Mantissa}}$

• from hamacher computer organization

Normalized Minimum $\pm N_{min}$

When S= $\pm \Rightarrow 0 or 1$ , E=1 ,M=0

$0 | 0000 0001 | 0000 0000 0000 0000 0000 000|$

$(-1)^{S} \times (1.0)_2 \times 2^{1-127}$

$\pm N_{min}= (-1)^{S} \times (1.0)_2 \times 2^{-126}$

Normalized Maximum $\pm N_{max}$

When S= $\pm \Rightarrow 0 or 1$ , E=254 ,M=$2^{23}-1$

$0 | 1111 1110 | 1111 1111 1111 1111 1111 111$

$(-1)^{S} \times (1.1111 1111 1111 1111 1111 111)_2 \times 2^{254-127}$

$\pm N_{max}= (-1)^{S} \times (1.1.1111 1111 1111 1111 1111 111)_2 \times 2^{127}$

Denormalized Minimum $\pm D_{min}$

When S= $\pm \Rightarrow 0 or 1$ , E=0 ,M=1

$0 | 0000 0000 | 0000 0000 0000 0000 0000 001|$

$\pm D_{min}= (-1)^{S} \times (0.0000 0000 0000 0000 0000 001)_2 \times 2^{-126}$

Denormalized Maximum $\pm D_{max}$

When S= $\pm \Rightarrow 0 or 1$ , E=0 ,M=$2^{23}-1$

$0 | 0000 0000 | 1111 1111 1111 1111 1111 111$

$\pm D_{max}= (-1)^{S} \times (0.1.1111 1111 1111 1111 1111 111)_2 \times 2^{-126}$

https://www3.ntu.edu.sg/home/ehchua/programming/java/datarepresentation.html

Similarly

Excess 64 (With Normalization)

With Normalization $\Rightarrow (-1)^{S} (1.M)_2 \times 2^{E-\text{bias}}$

$(1.100101)_2 \times 2^{3}$

$E-\text{bias}=\text{True Exponent}$

$E-64=3 \Rightarrow E=67$

$\underbrace{{\color{Red} {\textbf{0}} }}_{\text{sign}} |\underbrace{{\color{Blue} {\textbf{1000 011}} }}_{\text{Exponent}} |\underbrace{{\color{Green} {\textbf{1001 0100}} }}_{\text{Mantissa}}$

Excess 64 (Without Normalization)

Without Normalization $\Rightarrow (-1)^{S} (0.M)_2 \times 2^{E-\text{bias}}$

$(0.1100101)_2 \times 2^{4}$

$E-\text{bias}=\text{True Exponent}$

$E-64=4 \Rightarrow E=68$

$\underbrace{{\color{Red} {\textbf{0}} }}_{\text{sign}} |\underbrace{{\color{Blue} {\textbf{1000 100}} }}_{\text{Exponent}} |\underbrace{{\color{Green} {\textbf{1100 1010 }} }}_{\text{Mantissa}}$

Rounding Off

Suppose 3 digits are allowed in mantissa then :-

\begin{align*} [113. +(-111.)]+7.51 \\ =&[002.]+7.51\\ =&[2.00]+7.51\\ =&9.51\\ \end{align*}

\begin{align*} 113. +[(-111.)+7.51] \\ =&113.+[-111.+008.] \\ =&113.+(-103.)\\ =&010.\\ \end{align*}.

edited
0
Where can i read these rounding off techniques?
0
In Dmax:-

0.1.11111111111111111111111  ,why two decimal ? It should be 0.F form?
0
m is mantissa so its maximum value 1-2^-n ??
0
@pC

do u mean excess 64 is not a IEEE 754 representation?
0
@pc

what is the format you have used for excess 64 bit?

+1 vote