GATE CSE
First time here? Checkout the FAQ!
x
+10 votes
445 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)

 

 

asked in CO & Architecture by Veteran (22.8k points) 45 215 355
edited by | 445 views

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

@rahul_jain25

Suppose If 4 digits are allowed for Mantissa,

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

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?

Thanks @pc

@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

$2^{K-1}-1 \;\;\; ??$
pC that formula is for IEEE standards only
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

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 :)

1 Answer

+3 votes

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*}$.

answered by Veteran (22.8k points) 45 215 355
edited by
Where can i read these rounding off techniques?
In Dmax:-

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

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


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23210 Points

  2. Bikram

    17018 Points

  3. Habibkhan

    6652 Points

  4. srestha

    5864 Points

  5. Debashish Deka

    5430 Points

  6. jothee

    4908 Points

  7. Sachin Mittal 1

    4762 Points

  8. joshi_nitish

    4274 Points

  9. sushmita

    3954 Points

  10. Silpa

    3698 Points


Recent Badges

Regular Juhi Sehgal
Popular Question vineet.ildm
Nice Comment Arjun
100 Club vipul verma
Notable Question jothee
Popular Question jothee
Nice Question shivangi5
Regular rinks5
Notable Question shipra tressa
Regular sasi
27,247 questions
35,056 answers
83,703 comments
33,183 users