HOW TO: Convert Decimal to IEEE-754 Single-Precision Binary

Ғылым және технология

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

Пікірлер: 220

  • @thornclawofwarriors
    @thornclawofwarriors7 жыл бұрын

    "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.

  • @giorgibujiashvili3942

    @giorgibujiashvili3942

    6 жыл бұрын

    can confirm, can't get a hundred. will report back once the test is done.

  • @kev814445

    @kev814445

    6 жыл бұрын

    It made the video more interesting...your humor was greatly appreciated during this stressful time :-)

  • @Miraclefruitify

    @Miraclefruitify

    5 жыл бұрын

    @@richardma3187 Jeez, chill bruh. It's just a joke

  • @ajimatsmail5686

    @ajimatsmail5686

    5 жыл бұрын

    Teu ngarti aing bngst:(

  • @ashishdaniel169

    @ashishdaniel169

    5 жыл бұрын

    @@giorgibujiashvili3942 still waiting for that report

  • @DragonDePlatino
    @DragonDePlatino6 жыл бұрын

    Thank you so much! This was an immense help and I wasn't able to find such a straightforward explanation anywhere else.

  • @Yunho_Park
    @Yunho_Park4 жыл бұрын

    woah woah I didn't ask to be personally attacked watching a youtube tutorial video lmao

  • @EMMIR_KC
    @EMMIR_KC7 жыл бұрын

    The best video i've seen discussing this topic so far!

  • @gloriaxiaoluzhang4430

    @gloriaxiaoluzhang4430

    7 жыл бұрын

    agree!

  • @danteeep

    @danteeep

    6 жыл бұрын

    I'm subscribing cause he nailed it

  • @heron_
    @heron_6 жыл бұрын

    This was the best explanation ever. Why couldn't my professor break it down this simply. Thanks for this video.

  • @mrarcticaaa1101
    @mrarcticaaa11015 жыл бұрын

    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

  • @g0ballistic
    @g0ballistic5 жыл бұрын

    You're a legend. Best video about IEEE-754 on youtube.

  • @volodymyrzmazhenko4060
    @volodymyrzmazhenko40604 жыл бұрын

    Thank you, Steven, it help me to understand IEEE 754 much more better than others!

  • @JayoomJay
    @JayoomJay6 жыл бұрын

    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.

  • @stevenpetryk6869

    @stevenpetryk6869

    5 жыл бұрын

    Good to know! Thank you for sharing this.

  • @krullebolalex
    @krullebolalex5 жыл бұрын

    Thanks a bunch! Very helpful, straight forward and clear. Other videos try to explain the concepts behind them too but that just confuses people.

  • @alexbourlis
    @alexbourlis6 жыл бұрын

    love your way of explaning mate, i think you meant the only way to score 100 is to watch your video ;)

  • @madhurjyadeka5569

    @madhurjyadeka5569

    3 жыл бұрын

    Yeah who does that lol😂😂😂

  • @johnrex9612
    @johnrex96125 жыл бұрын

    That video will help me to get 100/100 on exam. Thanks from Poland

  • @ns_down
    @ns_down7 жыл бұрын

    Saving me for my final exams mate, thank you.

  • @mitchallcowell5166
    @mitchallcowell51666 жыл бұрын

    this saved my ass before an exam, great video

  • @deshanesims2196
    @deshanesims21963 жыл бұрын

    this is the BEST explanation of floating point!!! thank you Steven!

  • @TheFlyguy31
    @TheFlyguy316 жыл бұрын

    Definitely the best 'pencil-pen' i've seen.

  • @foobar_eve8813
    @foobar_eve88136 жыл бұрын

    I wish you were my Comp Org TA! :-D You're delightful, and your videos are outstanding.

  • @standinonstilts
    @standinonstilts6 жыл бұрын

    Ma boi steven roasting these kids expecting him to be perfect, love it

  • @JoseFloresEC
    @JoseFloresEC4 жыл бұрын

    woah, very helpful, thank you so much :) literally couldn't find anything else anywhere else online

  • @joaquincandalaft2124
    @joaquincandalaft21247 жыл бұрын

    awesome explanation, quite short and totally clear

  • @kucuksamuray
    @kucuksamuray6 жыл бұрын

    Thanks for your video Man, very helpfull really. Im watching you from France, keep going

  • @adamroach43
    @adamroach436 жыл бұрын

    Very helpful and well explained. Thanks!

  • @badong4878
    @badong48786 жыл бұрын

    you might have just saved my finals thanks

  • @KansasFashion
    @KansasFashion6 жыл бұрын

    The best Video I've ever seen about that

  • @LaplacianFourier
    @LaplacianFourier5 жыл бұрын

    WHOA... when some guy out of a billion in the internet you've searched is using the same pencil as you.... pffssshhh MIND BLOWN!

  • @justdledfruitloops
    @justdledfruitloops6 жыл бұрын

    Very clear explanation! Thanks alot!

  • @vinayak8100
    @vinayak81005 жыл бұрын

    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

  • @DrNinjaPhDofPAIN
    @DrNinjaPhDofPAIN6 жыл бұрын

    Outstanding, thank you for this

  • @Tibia390
    @Tibia3905 жыл бұрын

    Thanks Bro!!!! You helped myself. I'm Brazilian spectator.

  • @AC-fi8ge
    @AC-fi8ge7 ай бұрын

    You are AWESOOOOOME ! 10/10

  • @rosiebahrani9895
    @rosiebahrani98955 жыл бұрын

    Good for you! What university do you TA for? I wish our TAs did that for us too. :)

  • @jennyggf3556
    @jennyggf35565 жыл бұрын

    Excellent explanation

  • @klauspeter2199
    @klauspeter21993 жыл бұрын

    9:58 that arrow is sooooo smooth!

  • @aldrinaldrinald
    @aldrinaldrinald4 жыл бұрын

    Best video bro.. Thank you so much 🙂🙂👍👍👍

  • @leogourbin9752
    @leogourbin97523 жыл бұрын

    You saved my life dude !

  • @andrewbrenner9375
    @andrewbrenner93755 жыл бұрын

    Wonderfully explained 😅

  • @GidMightyWarrior
    @GidMightyWarrior7 жыл бұрын

    Amazing, thank you so much

  • @mehdibadaoui1658
    @mehdibadaoui16587 жыл бұрын

    really appreciate the video

  • @BsharatAhmed
    @BsharatAhmed5 жыл бұрын

    thank you man your the best !!!

  • @tooru
    @tooru5 жыл бұрын

    got 100% thanks to this video

  • @calvinlan6568
    @calvinlan65684 жыл бұрын

    ditching my professor's video in favor of some random guy on youtube -seriously though, thank you for making this easier to understand

  • @saturdaysportscentral6129
    @saturdaysportscentral6129 Жыл бұрын

    Watched this for my exam today, no way you had the right to drag me like that😭 1:17

  • @AkashSingh-pu4dc
    @AkashSingh-pu4dc7 жыл бұрын

    Thanks Steven 👍

  • @tiffany3255
    @tiffany32556 жыл бұрын

    SUPER HELPFUL

  • @hadyabdel-fattah5810
    @hadyabdel-fattah58105 жыл бұрын

    You sir are awesome

  • @unicorn8533
    @unicorn85334 жыл бұрын

    Thank you so much

  • @somefuckstolemynick
    @somefuckstolemynick6 жыл бұрын

    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. ;)

  • @shanegrayson7068
    @shanegrayson70685 жыл бұрын

    Dude, ty you so much!

  • @danielmapiti6891
    @danielmapiti68916 жыл бұрын

    Steven, when recording the results at the end, on the mantissa, why didn't you consider the fact that 1100 is repeating?

  • @OMNI_INFINITY
    @OMNI_INFINITY6 ай бұрын

    Thanks!

  • @solopine9624
    @solopine96246 жыл бұрын

    Thank you.

  • @korneliuspasztor7465
    @korneliuspasztor74656 жыл бұрын

    I know this video has been some years ago, but do u have a video with fractions? :O

  • @youseflyly
    @youseflyly7 жыл бұрын

    thank you

  • @eg9418
    @eg94184 жыл бұрын

    nice vid!

  • @user-yz7ts2fq9m
    @user-yz7ts2fq9m4 жыл бұрын

    Thanks bro!

  • @berkoz2343
    @berkoz2343Ай бұрын

    Thanks

  • @PerpetuallyTiredMillennial
    @PerpetuallyTiredMillennial10 ай бұрын

    "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.

  • @jahedulislam3438
    @jahedulislam34383 жыл бұрын

    Man you saved my ass. Can you make a video for double precision?

  • @user-cm9qb4xy7c
    @user-cm9qb4xy7c6 жыл бұрын

    nicly explained

  • @shortsFactsSociety
    @shortsFactsSociety4 жыл бұрын

    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

  • @Oreoezi

    @Oreoezi

    Жыл бұрын

    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.

  • @RTimo
    @RTimo3 жыл бұрын

    Can you make a video for a negative decimal? Like (-4.75)???

  • @moralniprocvat2205
    @moralniprocvat22056 жыл бұрын

    what if 'E' negative?

  • @Yusa98
    @Yusa986 жыл бұрын

    Hey, nice Video realy!

  • @serkan3743
    @serkan37436 жыл бұрын

    Karrrrdeşimmm biliyorsun bu hayatı

  • @fruitlover7073
    @fruitlover70733 жыл бұрын

    finally someone who speaks english

  • @minsookim13
    @minsookim139 ай бұрын

    Heyy Steven, what if it is a negative decimal

  • @holymind2348
    @holymind23487 жыл бұрын

    thanks

  • @sorrefly
    @sorrefly6 жыл бұрын

    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 :)

  • @ezzermaya4082
    @ezzermaya40823 ай бұрын

    thanks! my exam is tomorrow :~)

  • @aditopguy9785
    @aditopguy97858 ай бұрын

    Which textbook do you recommend?

  • @katrinagonzales1575
    @katrinagonzales1575 Жыл бұрын

    How did you get the binary of 132? I don't get it:((( help

  • @samannoysingha5259

    @samannoysingha5259

    Ай бұрын

    Just like how he gets the binary value of 45 😊

  • @patelav21
    @patelav215 жыл бұрын

    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?

  • @maxgobel
    @maxgobel7 жыл бұрын

    Are you the voice behind Casually Explained?

  • @ProductionsOfPauls

    @ProductionsOfPauls

    7 жыл бұрын

    I was thinking the same thing haha

  • @halio8012

    @halio8012

    6 жыл бұрын

    He even makes the same jokes... How many channels does this guy have???

  • @RamonX69
    @RamonX696 жыл бұрын

    Bravo

  • @rishiupadhyay3956
    @rishiupadhyay39563 жыл бұрын

    Pencils are important. Indeed!😊😊

  • @S3iF3
    @S3iF36 жыл бұрын

    What if the mantissa wouldnt be repetetive. Would you just fill the last bits with 0's?

  • @Preposter

    @Preposter

    5 жыл бұрын

    Yes

  • @azizko2046
    @azizko20464 жыл бұрын

    Is this CasuallyExplained?!

  • @TheKarimPuff
    @TheKarimPuff5 жыл бұрын

    god bless you

  • @joecomplexgeometricshapesr3348
    @joecomplexgeometricshapesr33487 жыл бұрын

    Hey Steven great video, but does the exponent always equal 132? What is the significance of the 5 and the 132 , thanks EDIT Nevermind just got it lol

  • @exoxDiD

    @exoxDiD

    7 жыл бұрын

    wait I still don't ;;

  • @sorrefly

    @sorrefly

    6 жыл бұрын

    The exponent is coded in excess 127, so you just add 127 to the value of the actual exponent 5 + 127 = 132 keep in mind while converting back from iee754

  • @exoxDiD

    @exoxDiD

    6 жыл бұрын

    thanks a lot! I get it now

  • @sorrefly

    @sorrefly

    6 жыл бұрын

    jongup__ no problem :)

  • @hekk_tech5975
    @hekk_tech59754 жыл бұрын

    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% :)

  • @JasonJason210
    @JasonJason2106 жыл бұрын

    Brilliant thanks. How would you convert a number like 0.0000000025 to IEEE 754?

  • @TheStrelok7
    @TheStrelok76 жыл бұрын

    ok how to convert 0.0059 any help

  • @mustafaahmadov3896
    @mustafaahmadov38962 жыл бұрын

    hello , i dont get last three 1100,why you add?okay you want to get 23 bit ,but why 1100?

  • @Akatsuu
    @Akatsuu5 жыл бұрын

    THANK YOU MY PROFESSOR COULDN'T EXPLAIN THIS FOR SHIT

  • @nicoli108
    @nicoli1083 жыл бұрын

    Thank you so much! I'm struggling a lot to understand this but you definitely made it easier. I was trying to convert -0,75 to binary and I did this: 0,75 * 2 = 1,50 0,5 * 2 = 1,00 When I get only 1.0 I need to stop. So my number would be 0.11 so 1.1 * 2 ^ -1 1.1 * 2 ^126 0 | 01111110 | 100000000000000 Is this logic correct?

  • @Staroo

    @Staroo

    3 жыл бұрын

    Yh, but your original number was negative so your sign bit would be 1 instead of 0

  • @nicoli108

    @nicoli108

    3 жыл бұрын

    @@Staroo thank you!

  • @ayite8163
    @ayite81636 жыл бұрын

    thank u so much lol

  • @user-ox2rb7po3u
    @user-ox2rb7po3u4 жыл бұрын

    Omg , thank you so much.

  • @tomislavvinkovic6652
    @tomislavvinkovic66526 жыл бұрын

    How is 5 equal to 132?

  • @0fficialRatedR

    @0fficialRatedR

    6 жыл бұрын

    he added to 127

  • @opatechnus

    @opatechnus

    6 жыл бұрын

    what he converted to binary and how

  • @puskalpulami8246

    @puskalpulami8246

    6 жыл бұрын

    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.

  • @ochuodhoisaya9017
    @ochuodhoisaya90176 жыл бұрын

    why have you not 127 for mantisa

  • @etien613
    @etien6137 жыл бұрын

    what if the we have something like -0,123

  • @timi_LoL
    @timi_LoL2 жыл бұрын

    Very "encouraging" words.

  • @brianvandenberg4467
    @brianvandenberg44676 жыл бұрын

    5:45 - 5:51 #BRAINinitiative Move from #Wired to Wireless IEEE’s MultiDisciplinary approach could do it...Wonder, what is their Motivation? @Outcomes_Matter

  • @paulolopes5939
    @paulolopes59395 жыл бұрын

    one question if i have a negetive number like for example -18,125 should it be represented in complement 2??

  • @HabiburRahman-xs9gb
    @HabiburRahman-xs9gb6 жыл бұрын

    Huge thanks ..man..u deserve more than that...maybe a pizza

  • @rickthebrick12
    @rickthebrick123 жыл бұрын

    What is going on with the exponent ^5? How did you convert it to 132 (1000 0100)?

  • @stevenpetryk6869

    @stevenpetryk6869

    3 жыл бұрын

    I added 127. The physical register represents numbers as 127 higher than the actual exponent value. So if the flip-flops in the computer show 1000 0100, the actual mathematical exponent it’s representing is 132-127 = 5

  • @rickthebrick12

    @rickthebrick12

    3 жыл бұрын

    @@stevenpetryk6869 if my exponent comes out to be 3, I would add 3 + 127 = 130?

  • @stevenpetryk6869

    @stevenpetryk6869

    3 жыл бұрын

    @@rickthebrick12 If you're going from paper -> electricity, you add 127. If you're going from electricity -> paper, you subtract. For a mathematical exponent of 3, the bits in the register would be 3 + 127 = 10000010₂.

  • @anilkadiyala

    @anilkadiyala

    3 жыл бұрын

    If Paper (decimal) to Ieee , then map ur math into this 1.M * 2^(E-127). Evaluate M and E , later arrange them as S E M. That’s it

  • @edwinsanchez4973
    @edwinsanchez4973 Жыл бұрын

    "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

  • @tr_998
    @tr_9986 жыл бұрын

    Shouldn't the exponent have the value 6

  • @kareemashouri1429
    @kareemashouri14293 жыл бұрын

    my number is 454.125 and when i started converting the second part (0.125) it stopped at a whole 1 so it went like this: 0.125 * 2= 0.25 0.25 * 2=0.50 0.50 * 2=1 did I do it wrong?

  • @stevenpetryk6869

    @stevenpetryk6869

    3 жыл бұрын

    No, you’re right. 0.125 is represented as 0.001 in binary (2^-3 = 1/8). You’ll notice that if you continued you’d just get more and more zeroes: 0.50 * 2 = 1 0 * 2 = 0 0 * 2 = 0 Which is the same as just adding more zeroes to any decimal number’s decimal side: like how 10 = 10.0000 (ignoring precision, which computers don’t usually encode ). So your number in binary is (I think-doing the math on my phone right now): 1 1100 0110.001

  • @kareemashouri1429

    @kareemashouri1429

    3 жыл бұрын

    @@stevenpetryk6869 I actually did not get the same answer my binary number came out too: 011000111.001

  • @stevenpetryk6869

    @stevenpetryk6869

    3 жыл бұрын

    @@kareemashouri1429 if you Google “454 in binary” you’ll see that something went wrong with your conversion. I’d recommend trying again.

  • @nafisah9499
    @nafisah94992 жыл бұрын

    "If you were going to get 100 on this exam, you wouldn't be watching this video" way to be discouraging lol

  • @stevenpetryk6869

    @stevenpetryk6869

    2 жыл бұрын

    Don’t take it too seriously! I made this video to help my students get 100’s :)

  • @hixamjocular6591
    @hixamjocular65915 жыл бұрын

    why you repeated that loop of binary fraction representation at the matisse case , normally you should complete the mantisse result by zeros !!

Келесі