I watched a lot of videos to figure out how to convert decimal to floating point. This is the best video. I think I can solve any question of that kind. Thank you so much Nicholas.
You did a way better job explaining this than a certain online credit earning learning website did. Their CS 306 computer architecture lesson just was like blah blah, I'm saying stuff but not actually saying where anything comes from.
+Paul Jackson The exponent represents how many places the dot was moving so we need to start at a middle value (127 is roughly the middle of 8 bits which has a range of 0-255). Since we start at 127 we can move the dot 128 spaces to the left, or 128 spaces to the right.
@@wolfcompany2 correct 127 + (-4) or -4 + 127which would be 123 also we get 127 because its a 32bit standard if its a 64bit standard it will be a different value
What if I have a number in decimal base that can't be represented in binary base by floating point binary? Does this method still reach to a binary floating point number or do you end up having a problem like an endless loop of calculation?
I don't think it would be hard to do, after watching this. Just do the exact reverse steps he did and I think it should work. Like, Mantissa is what it's after the dot. Cool. Exponent, you just do 131 - 127 = 4, then that's the Exponent. As the dot is always after the first 1 in the binary number, then it's "1.Matissa", in this case, 1.011111. As the Exponent is 4, you just move the dot in the opposite sign of 4 (-4 --> right): 10111.11. And there it is. Then it's just convert from binary to decimal. 11 (binary) = 3. Then, 3 / 2 = 1.5 [reminder: 1]; 1.5 / 2 = 0.75 [reminder: 1] - you divide 2 times because that's how many numbers are in the decimal part of the binary. The whole part of the number (101111), 1 + 2 + 4 + 0 + 16 = 23. 23 + 0.75 = 23.75. Now, the binary to decimal part, I made it up a bit hahaha (didn't think on it when I said it wouldn't be hard hahaha). No idea if it's right or not though. Cool though, made me think hahaha. But worked, at least. Just don't know if that's the right way or not. Later I'll look for some video that does the opposite of this one to be sure of the right way.
Finally, a worthy competitor to the indian youtube tech tutorial channels
😂
This is, by far the most simplistic and straight forward decimal to floating point conversion video I've seen yet. Thanks!
Happy to help!
This is much easier to understand than my instructor's explanation. Can't believe a video of 7 years ago does better than a today instructor
I spent 2 hours confused in my book, then had it click immediately in your 6 minute video. Cheers!
I watched a lot of videos to figure out how to convert decimal to floating point. This is the best video. I think I can solve any question of that kind. Thank you so much Nicholas.
You did a way better job explaining this than a certain online credit earning learning website did. Their CS 306 computer architecture lesson just was like blah blah, I'm saying stuff but not actually saying where anything comes from.
Sorry, I don't think you explained where did the *127* come from and why do we have to add it to the exponent(4). At 4:31 time stamp
+Paul Jackson The exponent represents how many places the dot was moving so we need to start at a middle value (127 is roughly the middle of 8 bits which has a range of 0-255). Since we start at 127 we can move the dot 128 spaces to the left, or 128 spaces to the right.
Ah yeah, now it makes sense, thank you for the quick reply ^^
@@NicholasDingle do you +127 because it was a positive 4? Would it be -127 if it is -4?
@@wolfcompany2 correct 127 + (-4) or -4 + 127which would be 123 also we get 127 because its a 32bit standard if its a 64bit standard it will be a different value
Clear and straight to the point. Thank you so much
thank you Nicholas a lot this was awesome explanation and video
this is so simple, amazing explanation thank you
Absolute legend
Thank you, now I can solve my homework in detail as asked ❤️
thank you for this clear explanation.
Simple and concise. Thank you.
Concise wasn''t necessary lmao
legendary, thanks
Thank you so much, keep up the good work. Helped me out a lot.
Excellent video!
you are a life saver bro
thank you, very good
stay bless
Nicely explained.
thank you so much I love you
easy explanation thankyou..
Thanks, you really helped!
Thank you :D
Very useful one,Thank you
Thank you soo much!
great video!
What if I have a number in decimal base that can't be represented in binary base by floating point binary? Does this method still reach to a binary floating point number or do you end up having a problem like an endless loop of calculation?
so we multiply to convert the other way?
I know computers sometimes hide the first mantissa bit, with this calculation, is it hidden by default or do you still have to hide it afterwards?
What if the number was like 2E-40! What shall we do then?
THANK YOU SO MUCH *_______*
Is there a reverse video tutorial where you go from the long binary back into 23.75 ?
check this one he explains it properly
ua-cam.com/video/AU4DtxM9gb0/v-deo.html
I don't think it would be hard to do, after watching this. Just do the exact reverse steps he did and I think it should work. Like, Mantissa is what it's after the dot. Cool. Exponent, you just do 131 - 127 = 4, then that's the Exponent. As the dot is always after the first 1 in the binary number, then it's "1.Matissa", in this case, 1.011111. As the Exponent is 4, you just move the dot in the opposite sign of 4 (-4 --> right): 10111.11. And there it is. Then it's just convert from binary to decimal. 11 (binary) = 3. Then, 3 / 2 = 1.5 [reminder: 1]; 1.5 / 2 = 0.75 [reminder: 1] - you divide 2 times because that's how many numbers are in the decimal part of the binary. The whole part of the number (101111), 1 + 2 + 4 + 0 + 16 = 23. 23 + 0.75 = 23.75. Now, the binary to decimal part, I made it up a bit hahaha (didn't think on it when I said it wouldn't be hard hahaha). No idea if it's right or not though. Cool though, made me think hahaha. But worked, at least. Just don't know if that's the right way or not. Later I'll look for some video that does the opposite of this one to be sure of the right way.
what would be the "127" value for double
1023
For a single-precision number, (127).
For a double-precision number, (1023).
Anyone tell me why is 23.75(10) in the end? Thanks
the (10) shows it is base 10 denary rather than base 2 binary
Easily explained bro
Sir, i did not get exponent work....kindly derive
on photoshop ^^^
Why is it Sign, Exponent then Mantissa. I thought it was Sign, Mantissa then Exponent
You poorly explained how to move the dot
I hate this type of video, where you don't explain anything you just 'do the steps'. This just looks like a bunch of magic.
THANK YOU SO MUCH *_______*