This is a very important (and interesting) topic for me and you have explained it exceedenly well. Now I need to go back to study for my upcoming exam :S - I thank you for this video; I owe you a lot!
Nice video! :) It's worth mentioning another reason why denormal numbers are useful. Not only is it a way to cram in a few more numbers around zero; it also induces a useful property on the set of floating-point numbers: If the difference between two numbers, say x and y, is 0, then the numbers are equal (x-y = 0 -> x = y). This property fails on normalized-only floating-point numbers because the difference between the least and second-least positive normalized number is precisely the smallest denormal number, which would underflow to zero. But with denormals, it will never underflow.
Hello and thank you very much for sharing! Yes, there are lots of cool properties like this that I didn't get a chance to go through in this series. Might be worth a revisit sometime where we look at the actual implementation of floating point numbers.
Cheers man - sometimes you hear about something in a paper and just need a quick explainer. Glad to have found your video when I needed it. Also, are you from Singapore/Malaysia?
I'm confused. Why does the value -126 make the exponent go all zero? If the exponent of 2 is -126 then the offset exponent in the representation should be -126 + 127 = 1, so the binary representation should be 00000001, shouldn't it? What's so special about -126? I love your video but the nature of this topic is itself pretty confusing I guess, so it would be great if you could suggest some reading material on this. 💖
Hello and thank you for your comment! Why this happens is simply because it was designed this way - The definition of a floating point number states that a bit string of all zeros in the exponent is to be interpreted as -126 and for the mantissa to be denormal. Take this as a "special case", where we no longer read off the bits and treat it as an offset. Good reading material is simply the Wikipedia page for IEEE 754 floating point numbers: en.wikipedia.org/wiki/IEEE_754
Hello and thank you for your comment! There's another episode? I don't remember promising that =P Though I _have_ done three videos related to floating point numbers so far. You may be looking for the bit on infinity and NaN: czcams.com/video/D7LRjJeRKJw/video.html
Hi, thanks for sharing this topic. Can you explain more detail why we have to make offset for the exponent part? As I read somewhere, there is some error when we convert to binary but I don't know what it is
Hello and thank you for your comment! You might want to start the first video in this series: czcams.com/video/gc1Nl3mmCuY/video.html Long story short, offsetting the exponent allows us to represent positive and negative exponent values.
Cool video! I was able to understand the binary to float but not the float to binary, At the extracting the mantissa you have your multiplication operations on both sides of the equal sign which to me from my knowledge of algebra says that both operations come to the same answer. to my understanding 2^-1 x 2 = 0.4 am i doing this wrong?
Thank you for the video. For those who may be wondering how does this matter in real life (as in the working world ouside of academia and other schooling) I have encountered a problem with commercial real time programs where RTUs are reading a very tiny value close to but not zero. When the real time program polls the RTU and sees this, it causes the program to flag that value and ignore it based on how the product was developed. :( These tiny tiny tiny close to but not quite zero RTU values are not encountered often so when it is encountered people have to remember what is going on and how the program functions. Typically this involves a trouble call to the vendor and research on their part and ta-da De-normalized IEEE values... Too bad the RTUs are not programmed to round those tiny tiney tiny not quite zero values to zero so these problems don't pop up in the program :D Thank you once again :D
Hello and thank you for your comment and for sharing, what an interesting example! There are just so many things in the world of computing that we don't see in our day to day lives, until these edge cases come up!
Thank you for your video but I am so confused. 1.0 x 2^2 is equals to 0.1x2^3. and these two numbers can be representable but differently, how can I know which representation will be used?.
Hello and thank you very much for your comment! That's a very lucid point! However, the IEEE standard says that, outside of denormal numbers, the mantissa is always taken to be 1.x (with the 1 being implicit), so there is only one possible exponent value. As for denormal numbers, it can start with 0.x, with as many zeroes as required, but now, the exponent is fixed at 2^-126. So again, there is only one possible representation for any number. Thus thankfully, there should never be any ambiguity in any case.
Wow awesome!! I just saw the first video of floating point and entered to your channel and I saw this one also ! Can you please make a video about the things you told at the end of the video ? Thanks!! :P
Hello and thank you for your comment! Perhaps you could clarify on what you mean when you say "deal with that"? The value can be read off in the same way as you would with any other floating point number.
Hi, i went to your website and realised that a Binary of 000000000.... actually is 0 in decimals. but since there is always a 1 imply before the mantissa, how can 0000000..... in Binary actually be 0 in decimal? Since 0(sign) * 2^[0-127] (Exponent) * [1+ .000000000....] ( mantissa), it will be 2^-127 * 1
Hello and thank you for your comment! A bit string of all zeroes is a special type of floating point number called a denormal number. More here: czcams.com/video/b2FgF2sUoS8/video.html
@@cmyk8964 But there could also be negative zero (if sign bit would be set), so you need to be careful when comparing float to be zero with integer type.
Finally a good explanation for denormal FP number online! :)
Hello and thank you very much for your comment! Glad you liked the video =)
This is a very important (and interesting) topic for me and you have explained it exceedenly well. Now I need to go back to study for my upcoming exam :S - I thank you for this video; I owe you a lot!
You're welcome! All the best for your exam!
Nice video! :) It's worth mentioning another reason why denormal numbers are useful. Not only is it a way to cram in a few more numbers around zero; it also induces a useful property on the set of floating-point numbers: If the difference between two numbers, say x and y, is 0, then the numbers are equal (x-y = 0 -> x = y). This property fails on normalized-only floating-point numbers because the difference between the least and second-least positive normalized number is precisely the smallest denormal number, which would underflow to zero. But with denormals, it will never underflow.
Hello and thank you very much for sharing! Yes, there are lots of cool properties like this that I didn't get a chance to go through in this series. Might be worth a revisit sometime where we look at the actual implementation of floating point numbers.
Amazing Video! I was working on a problem for an hour but then in literally 30 seconds you answered everything!
Hello and thank you for your comment! Very happy to be of help =)
Cheers man - sometimes you hear about something in a paper and just need a quick explainer. Glad to have found your video when I needed it. Also, are you from Singapore/Malaysia?
Hello and thank you very much for your comment! Glad to be of help =) Yes, I'm from Singapore!
So what if the number instead of 2^130 is 2^250 and it exceeds the bit limit for the mantissa?
Hello and thank you for your comment! Since the number is so far above the limit, I'd expect you'd get significant losses.
If the number is too small even for denormal number, the number will underflow to 0.
I'm confused. Why does the value -126 make the exponent go all zero? If the exponent of 2 is -126 then the offset exponent in the representation should be -126 + 127 = 1, so the binary representation should be 00000001, shouldn't it? What's so special about -126? I love your video but the nature of this topic is itself pretty confusing I guess, so it would be great if you could suggest some reading material on this. 💖
Hello and thank you for your comment! Why this happens is simply because it was designed this way - The definition of a floating point number states that a bit string of all zeros in the exponent is to be interpreted as -126 and for the mantissa to be denormal. Take this as a "special case", where we no longer read off the bits and treat it as an offset.
Good reading material is simply the Wikipedia page for IEEE 754 floating point numbers: en.wikipedia.org/wiki/IEEE_754
Great explanation, thanks!
You're welcome! Very happy to be of help =)
Still waiting for the third episode.. XD
Hello and thank you for your comment! There's another episode? I don't remember promising that =P
Though I _have_ done three videos related to floating point numbers so far. You may be looking for the bit on infinity and NaN: czcams.com/video/D7LRjJeRKJw/video.html
Though topic.. but explained clearly. thank you
You're welcome! Very happy to be of help :)
Hi, thanks for sharing this topic.
Can you explain more detail why we have to make offset for the exponent part?
As I read somewhere, there is some error when we convert to binary but I don't know what it is
Hello and thank you for your comment! You might want to start the first video in this series: czcams.com/video/gc1Nl3mmCuY/video.html
Long story short, offsetting the exponent allows us to represent positive and negative exponent values.
Cool video! I was able to understand the binary to float but not the float to binary, At the extracting the mantissa you have your multiplication operations on both sides of the equal sign which to me from my knowledge of algebra says that both operations come to the same answer. to my understanding 2^-1 x 2 = 0.4 am i doing this wrong?
Hello and thank you for your comment! You might want to check your math!
2^-1 = 1/2 = 0.5
If we multiply that by two, 2 x 0.5 = 2 x (1/2) = 1 = 2^0
Thank you for the video. For those who may be wondering how does this matter in real life (as in the working world ouside of academia and other schooling) I have encountered a problem with commercial real time programs where RTUs are reading a very tiny value close to but not zero. When the real time program polls the RTU and sees this, it causes the program to flag that value and ignore it based on how the product was developed. :( These tiny tiny tiny close to but not quite zero RTU values are not encountered often so when it is encountered people have to remember what is going on and how the program functions. Typically this involves a trouble call to the vendor and research on their part and ta-da De-normalized IEEE values... Too bad the RTUs are not programmed to round those tiny tiney tiny not quite zero values to zero so these problems don't pop up in the program :D Thank you once again :D
Hello and thank you for your comment and for sharing, what an interesting example! There are just so many things in the world of computing that we don't see in our day to day lives, until these edge cases come up!
Thank you for your video but I am so confused. 1.0 x 2^2 is equals to 0.1x2^3. and these two numbers can be representable but differently, how can I know which representation will be used?.
Hello and thank you very much for your comment! That's a very lucid point!
However, the IEEE standard says that, outside of denormal numbers, the mantissa is always taken to be 1.x (with the 1 being implicit), so there is only one possible exponent value.
As for denormal numbers, it can start with 0.x, with as many zeroes as required, but now, the exponent is fixed at 2^-126. So again, there is only one possible representation for any number.
Thus thankfully, there should never be any ambiguity in any case.
@@NERDfirst thank you so much
Wow awesome!!
I just saw the first video of floating point and entered to your channel and I saw this one also !
Can you please make a video about the things you told at the end of the video ?
Thanks!! :P
Hello and thank you very much for your comment! Sure, that'll be on its way in a few weeks =)
Europa League ahah
What if you have a denormalized number with a fraction : 000101100011..1
How you deal with that ?
Hello and thank you for your comment! Perhaps you could clarify on what you mean when you say "deal with that"? The value can be read off in the same way as you would with any other floating point number.
Hi, i went to your website and realised that a Binary of 000000000.... actually is 0 in decimals. but since there is always a 1 imply before the mantissa, how can 0000000..... in Binary actually be 0 in decimal? Since 0(sign) * 2^[0-127] (Exponent) * [1+ .000000000....] ( mantissa), it will be 2^-127 * 1
Hello and thank you for your comment! A bit string of all zeroes is a special type of floating point number called a denormal number. More here: czcams.com/video/b2FgF2sUoS8/video.html
If the biased exponent is 0, the exponent is -126 instead of -127, and the leading digit of the mantissa is 0 instead of 1. (Paraphrasing the video)
@@cmyk8964 But there could also be negative zero (if sign bit would be set), so you need to be careful when comparing float to be zero with integer type.
Great video
Hello and thank you for your comment! Glad you liked the video =)
Is 0 considered a denormal number?
Hello and thank you for your comment! Since zero is represented with all bits set to zero, yes, it is a denormal number.