English 中文(简体)
floating points: IEEE based, but non-standard conversion of bit values to binary
原标题:

So here is what we have, a custom IEEE based setup:

Consider a five-bit floating representation based on the IEEE floating point format with 1 sign bit, two exponent bits and 2 significand bits.

And a selection of bits that needed to be converted to binary (answers included):

0 00 00 = 0

0 00 01 = 0.01

0 00 10 = 0.10

0 00 11 = 0.11

0 01 00 = 1.00

0 01 01 = 1.01

0 01 10 = 1.10

The way I was attempting to calculate the above was as:

2^(2-1) -1 = 1 (the bias)

for the second one, this would mean 0 -1 (since the exponent field is zero), so 0.1 * 10-1 = .01. only prob is that we dont seem to be adding the implicit leading 1. why not? and yet it seems for the values with a positive exponent (see 5 and below) we do indeed add the leading one. bit stumped as to what im missing.

many thanks!

最佳回答

What you re missing is that in the IEEE-754 formats, values that have a zero exponent but non-zero significand field, called denormals, do not have an implicit leading bit.

For example, in IEEE single precision, the smallest positive normal number is:

0x00800000 = 0x1.0 * 2**-126

the next smaller number is the largest denormal:

0x007fffff = 0x0.fffffe * 2**-126

the smallest positive number is the smallest denormal:

0x00000001 = 0x0.000002 * 2**-126

Note that not only do denormals have no implicit bit, but they also have the same exponent as elements in the next larger binade, even though their encoded exponent is one smaller (zero vs. one).

问题回答

You probably exchanged the exponent and the mantissa column. Maybe because it looked so fitting.





相关问题
What are the differences between NP, NP-Complete and NP-Hard?

What are the differences between NP, NP-Complete and NP-Hard? I am aware of many resources all over the web. I d like to read your explanations, and the reason is they might be different from what s ...

Implementation Detail for Graph Analysis Algorithms

Let s say I have a graph with "heavy" nodes, that is each node is an object that is already carrying a lot of data. I want to do a graph transformation that requires me to calculate a special ...

Worst case running time (Big O)

I have this question, and I don t know how to solve it, because I don t understand it. :( The question is: Programs A and B are analyzed and are found to have worst case running times no ...

RSA cryptosystem

Hi i am trying to set up an RSA cryptosystem i have all the values except d selected prime numbers: p=1889, q=2003, n=3783667, phi=3779776, e= 61 i got stuck finding d could anyone help me to figure ...

BNF Grammar Derivation

I want to apply rules of BNF Grammar to produce derivation for : a_Num

热门标签