HOW TO: Convert Decimal to IEEE-754 Single-Precision Binary
Вставка
- Опубліковано 20 сер 2024
- Quick links:
0:35 - Convert 45 to binary
1:59 - Convert 0.45 to binary
4:46 - Normalization
6:24 - IEEE-754 format
7:28 - Exponent bias
10:25 - Writing out the result
"If you were going to get a hundred on the exam, you wouldn't be watching this video"
OUCH, LOL.
I know its the truth, but still... ouch.
can confirm, can't get a hundred. will report back once the test is done.
It made the video more interesting...your humor was greatly appreciated during this stressful time :-)
@@richardma3187 Jeez, chill bruh. It's just a joke
Teu ngarti aing bngst:(
@@giorgibujiashvili3942 still waiting for that report
woah woah I didn't ask to be personally attacked watching a youtube tutorial video lmao
In case someone is wondering why there is a need to use bias. It is to make fast magnitude comparison of floating point numbers possible in hardware.
By using a bias we are effectively avoiding the need to store the exponent as negative numbers. If we had allowed the exponent to be stored as negative number (probably as a 2's complement), then during the occasion when there is a need to compare two exponents of two FP numbers, we need to obtain the magnitude of the 2's complement representation of the exponent by performing the 2's complement (need CPU cycles) operation (this is how you obtain the magnitude of a negative number represented in 2's complement form. If the number was represented in sign magnitude form, bits other than the sign bit would have directly given the magnitude) So if there is a bias, we can just forget about the negatives and just compare the bits of two exponents and say which one is larger.
Good to know! Thank you for sharing this.
The best video i've seen discussing this topic so far!
agree!
I'm subscribing cause he nailed it
Thank you so much! This was an immense help and I wasn't able to find such a straightforward explanation anywhere else.
love your way of explaning mate, i think you meant the only way to score 100 is to watch your video ;)
Yeah who does that lol😂😂😂
Thank you so much. I definitely wouldn't be able to graduate without youtube. I'm glad I'm studying university at this decade :D
That video will help me to get 100/100 on exam. Thanks from Poland
This was the best explanation ever. Why couldn't my professor break it down this simply. Thanks for this video.
Watching this from India- there's like hundreds of tutorial vids on this topic from Indian channels and none is half as good as this one.
Thanks a lot sir :D
Ma boi steven roasting these kids expecting him to be perfect, love it
You're a legend. Best video about IEEE-754 on youtube.
this saved my ass before an exam, great video
WHOA... when some guy out of a billion in the internet you've searched is using the same pencil as you.... pffssshhh MIND BLOWN!
Definitely the best 'pencil-pen' i've seen.
Saving me for my final exams mate, thank you.
Watched this for my exam today, no way you had the right to drag me like that😭 1:17
Thank you, Steven, it help me to understand IEEE 754 much more better than others!
Thanks a bunch! Very helpful, straight forward and clear. Other videos try to explain the concepts behind them too but that just confuses people.
ditching my professor's video in favor of some random guy on youtube
-seriously though, thank you for making this easier to understand
I wish you were my Comp Org TA! :-D You're delightful, and your videos are outstanding.
"If you were going to be getting 100% on the exam, you wouldn't be watching this video." Out here sayin what every TA wants to say, hope you're doin well.
this is the BEST explanation of floating point!!! thank you Steven!
you might have just saved my finals thanks
9:58 that arrow is sooooo smooth!
woah, very helpful, thank you so much :) literally couldn't find anything else anywhere else online
finally someone who speaks english
"If you were going to get 100 on this exam, you wouldn't be watching this video"
way to be discouraging lol
Don’t take it too seriously! I made this video to help my students get 100’s :)
Thanks for your video Man, very helpfull really. Im watching you from France, keep going
The best Video I've ever seen about that
awesome explanation, quite short and totally clear
"If you were going to get 100 on this exam, you wouldn't have to watch this video. Anyway-" 1:23. Did not need to do us like that my man
Best video bro..
Thank you so much 🙂🙂👍👍👍
Pov: You came from tintok
Yes
The fuck is a tintok Xudas
Yes
@@stevenpetryk6869 tik tok
@@maneverman nope! I’m also not You Suck at Cooking. I wish I was though.
Is this CasuallyExplained?!
You are AWESOOOOOME ! 10/10
Very helpful and well explained. Thanks!
Thanks Bro!!!! You helped myself. I'm Brazilian spectator.
Very clear explanation! Thanks alot!
THANK YOU
MY PROFESSOR COULDN'T EXPLAIN THIS FOR SHIT
How is 5 equal to 132?
he added to 127
what he converted to binary and how
at first, he just added exponent(i.e, 5) with 127. And their sum is 132. Then he converted 132 (132 is decimal numbers) to binary numbers.
thanks! my exam is tomorrow :~)
Excellent explanation
got 100% thanks to this video
You saved my life dude !
Wonderfully explained 😅
Outstanding, thank you for this
my professor makes a test with more exercises (110%) than usual but in the same amount of time with the amount of exercises for 100% so that more students can hit 100% :)
My teacher always want us to normalize the mantissa... why?
Pencils are important. Indeed!😊😊
"If were gonna get a 100 on the exam you wouldnt have to watch this video like lets be real anyway"
thank you man your the best !!!
really appreciate the video
Thank you so much
How did you get the binary of 132? I don't get it:((( help
Just like how he gets the binary value of 45 😊
Amazing, thank you so much
Good for you! What university do you TA for? I wish our TAs did that for us too. :)
Are you the voice behind Casually Explained?
I was thinking the same thing haha
He even makes the same jokes... How many channels does this guy have???
hello , i dont get last three 1100,why you add?okay you want to get 23 bit ,but why 1100?
You sir are awesome
Hello,
Can you help me on this one -0.045625(ten) to binary? I tried doing it your way. But I'm trying to do it without calculator since our professor don't allow it. Can you show me?
Man you saved my ass. Can you make a video for double precision?
SUPER HELPFUL
Dude, ty you so much!
I'm really confused. So they decided to bias an exponent. Why didn't they just used 8-bit signed number for it?
Partly, I think because it is less efficient. For example, you would wind up wasting multiple values to represent zero (positive zero = 00000000 and negative zero = 10000000).
The reason it is not 2's complement is because the circuitry would be more complicated than just having an extra step of subtracting 127.
Very "encouraging" words.
Thanks Steven 👍
What would I search for to find a video explaining the math behind that nifty little technique he's using to get the binary (the multipying with two table)?
I'm not in computer science in case you wondered. ;)
Steven, when recording the results at the end, on the mantissa, why didn't you consider the fact that 1100 is repeating?
Heyy Steven, what if it is a negative decimal
Buddy u should convert binary by using 1,2,4,8 pattern it is easy
Karrrrdeşimmm biliyorsun bu hayatı
Can you make a video for a negative decimal? Like (-4.75)???
Thanks!
I found this video in my old "watch later" category... I watched it many years ago. All I have to say is the crap they taught is in school is mostly worthless.
You’re right! I barely remember this stuff. I did find it cool to learn, though.
what if 'E' negative?
45 is a palindrome number in binary. So reading in opposite order isn't really explained.
I know this video has been some years ago, but do u have a video with fractions? :O
why you repeated that loop of binary fraction representation at the matisse case , normally you should complete the mantisse result by zeros !!
what if the we have something like -0,123
Actually U @Steven Petryk missed a rule.....Coz in mantissa we need 23 bits..We write 23 bits as u said, but the rule u missed is that If 24th bit is 1 then 23rd should be 1 Else 0......
nice vid!
ok how to convert 0.0059 any help
I watch the video to get a 100 on the exam.
Which textbook do you recommend?
The bias is 127 not 255
Yep! 7:44
2^8 -1 = 127 For the listeners(like me) that got confused or dont know what is going on. we use (2^8)-1 cause its 32 bit so (S^k) - 1 becomes 2^8 -1 . if it was 8 bit then k=3. so the exponent part is whatever you got on top of 2^this. and the (2^8) -1 . so its 5 + 127 = 132 . transform that into binary and voila you got your exponential. so sign + exponential + mantisa and you re good to go
Whoa this 127 reminds me of loopback....255 reminds me of multicast “Broadcasting” Or portion of Network....Or...SubNet....
Don’t get me started on those “Admin” or “Research” Numbers that always return inAdd-ARPA..”Advanced Research Projects Agency...Or DARPA “Defense” Advanced Research Projects Agency....We gonna use this “New” Nanotechnology to cure CANCER & provide safe FOOD & WATER....
Or you “Defense” & “Research” Folks on the Take....North & South America going to get FOOD dropped in by air....
Like Africa et al “Hellenism” for profit....
Why has Law Enforcement Not stepped in....?
Guys just to clarify the bias = 2^(8-1) - 1 = 127
Why does the IEE754 converter here puts a 1 at the end? because of rounding?
www.h-schmidt.net/FloatConverter/IEEE754.html
thanks for the video by the way :)
Thanks bro!
So, what if the fractionary part process ends up without a repeating cycle? How many digits should i take as a result?
Example: for 0.01
Usually the question will specify, most professors would be ok with doing it 6-7 times. Theoretically you'd have to do it until all 52 bits are filled.
why have you not 127 for mantisa
Thanks
Thank you.
Huge thanks ..man..u deserve more than that...maybe a pizza
u cannot do this with 0.006. Ofcouse its simple with that number
how do i convert 23.1675, im racking my brain out
Omg , thank you so much.
Check solution is
0 10000100 01101011100....
Check bec video is blur not able to see ans.
What if the mantissa wouldnt be repetetive. Would you just fill the last bits with 0's?
Yes
Hey, nice Video realy!
Shouldn't the exponent have the value 6