The Gateway to Computer Science Excellence
0 votes
196 views

how to solve this

in Digital Logic by Junior (603 points) | 196 views
0
when E=255 and M=0 it denotes special value +infinity or - infinity.

when E=255 and M !=0 it denotes NAN.

so option b and c are eliminated.

don't know about a and d option.
0
Here while storing in 32 bit format E = 130+127 = 257.. which will overflow..  but what to do further?
0
Exponent overflow: A positive exponent exceeds the maximum possible exponent value. In some systems, this may be designated as + infinity or - infinity.

Source:William Stallings.
0
so answer should be option b?
0
No. (d) only.
0
why ?  please elaborate.
0
I dont know about special value + infinity.

1 Answer

0 votes

Infinities

The infinities of the extended real number line can be represented in IEEE floating-point datatypes, just like ordinary floating-point values like 1, 1.5, etc. They are not error values in any way, though they are often (but not always, as it depends on the rounding) used as replacement values when there is an overflow. Upon a divide-by-zero exception, a positive or negative infinity is returned as an exact result. An infinity can also be introduced as a numeral (like C's "INFINITY" macro, or "∞" if the programming language allows that syntax).

IEEE 754 requires infinities to be handled in a reasonable way, such as

  • (+∞) + (+7) = (+∞)
  • (+∞) × (−2) = (−∞)
  • (+∞) × 0 = NaN – there is no meaningful thing to do

So, it will round to +infinite . https://en.wikipedia.org/wiki/Floating-point_arithmetic

by Junior (653 points)

Related questions

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
50,645 questions
56,616 answers
195,897 comments
102,366 users