Floating Point Arithmetic: Multiplication

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ม.ค. 2025

ความคิดเห็น • 44

  • @alexk.2361
    @alexk.2361 7 หลายเดือนก่อน +8

    still helping students in 2024, thanks man

  • @brandonKA4993
    @brandonKA4993 5 ปีที่แล้ว +12

    Thanks for the detailed explanation of large binary repeating binary.

  • @SuperDummdidumm
    @SuperDummdidumm 7 ปีที่แล้ว +42

    damn boi,
    4 just explaining the damn 3 steps, you could have choosen a shorter binary number

  • @junaiddaud1420
    @junaiddaud1420 4 ปีที่แล้ว +3

    Watching it in quarentine for online exams...btw nice explaination

  • @alphayeti991
    @alphayeti991 9 ปีที่แล้ว +4

    shouldn't the last 2 bits on the x significant be 01? As in the repeating 0011?

    • @JacobSchrum
      @JacobSchrum  9 ปีที่แล้ว +7

      +Alpha Yeti The last 1 of the sequence 0011 goes outside of the bounds of the significand, so the number has to be rounded up. This causes the result above, and also explains why floating point numbers cannot precisely represent certain values.

  • @plasticflower
    @plasticflower 2 ปีที่แล้ว +2

    This is nice and all, but what if X_E + Y_E > 255, that is to say, what if the new exponent is to large to be represented in 8 bits?
    Do we just cap it at 255 since this is the best we can do?

    • @rishatsheakh876
      @rishatsheakh876 ปีที่แล้ว

      you have to subtract the bias 127 (2^(n-1) -1) from that number dear. basically the equation is Bias exponent = actual exponent - bias.

    • @Chroncher
      @Chroncher หลายเดือนก่อน

      thats a special case. if the exponent is too large to be displayed in 8 bits the result of that multiplication will be + or - infinity (depending on the sign bit). Usually a Full Adder or Carry-Look-Ahead Adder or whatever you use to multiply numbers has a mechanism that detects whether there is an overflow happening (in the exponent) and that will lead to the exponent being set to 1111 1111 which stands for infinity (also the mantissa will be set to 0). There is another video of jan Misali on how floating points work i highly recommend that.

  • @renatoaraujo4601
    @renatoaraujo4601 5 ปีที่แล้ว +2

    Thanks! helped me in 2019.

  • @ikrm7015
    @ikrm7015 ปีที่แล้ว

    What if we have negative sign how we can do the multiplication between positive and négative

    • @e1490807aa
      @e1490807aa ปีที่แล้ว

      We only need to multiply the significand of floating numbers.
      Negative floating number can be seen as -1×1.xxxxx (x denotes any number).
      -1 is a odd function, just counting how many -1 you have, then you will know is it negative or not.

  • @leanthanaicker180
    @leanthanaicker180 9 ปีที่แล้ว +3

    Easy to understand.
    Thanks!

  • @bharatdeb
    @bharatdeb 7 ปีที่แล้ว +1

    0.3 = 0.01001100110011....
    =1.001100110011..... x 2^-2
    biased exponent = 127-2=125
    =01111101
    sign = 1 as negetive number
    so floating point representation
    sign(1bit) - 1
    exponent(8bits)- 01111101 mantissa(23bits)0011-0011-0011-0011-0011-001
    Sir, In your presentation last(right) three digits are 010 different from mine 001. can you please say what's wrong in my representation.
    Thanks

    • @JacobSchrum
      @JacobSchrum  7 ปีที่แล้ว +1

      I rounded up the last one that would appear outside the bounds of what the mantissa can store, which effectively added a 1 to the end of the term, which caused a carry one spot further to the left.

    • @bharatdeb
      @bharatdeb 7 ปีที่แล้ว

      Got it ! So if last three digits of mantissa is 011 then it will be 100 ??

    • @JacobSchrum
      @JacobSchrum  7 ปีที่แล้ว

      This is what I did, and is a reasonable thing to do. However, the standard actually defines alternate rounding options as well. Details here: en.wikipedia.org/wiki/IEEE_floating_point#Rounding_rules

  • @13achinjain
    @13achinjain 9 ปีที่แล้ว +1

    Complex stuff .. explained with ease

  • @obelix_gaul
    @obelix_gaul 9 ปีที่แล้ว

    I am trying to solve this number 0.250 x 7, but i am getting 7 as the answer with this method, am i doing something wrong?
    Because converting 0.250 to floating gives 1.000 0000 0000 0000 0000 0000 x 2^-2..can someone help..?

    • @JacobSchrum
      @JacobSchrum  9 ปีที่แล้ว

      +Madhu Kashyap Since 7 is 111 in binary, and 0.25 = 0.01, when you multiply 0.01 * 111 you should get 1.11 in binary which is 1.75 in decimal. This method should give that result. If that's not what you are getting, then I'll need to see your work to be able to comment.

  • @akhil4841
    @akhil4841 8 ปีที่แล้ว

    should'nt we subtract the bias value?

    • @JacobSchrum
      @JacobSchrum  8 ปีที่แล้ว

      I'm adding the actual unbiased exponents rather than the biased exponents. Since I have to subtract the bias from each one, and then add back one bias to the final result, I have effectively subtracted the bias once overall. However, in the computer, you can simply add the biased exponents directly, and then subtract the bias value once to get a result that is already biased.

    • @akhil4841
      @akhil4841 8 ปีที่แล้ว

      so if we subtract shouldn't it be 7-127?

    • @JacobSchrum
      @JacobSchrum  8 ปีที่แล้ว +1

      The answer would be the same, you would just reach it in a different way. You only subtract the bias if you were originally adding biased exponents. The biased exponents were 125 and 135. 125 + 135 - 127 = 133, and then we add one to normalize the significand and get 134. This is the same as adding 8 + (-2) = 6, normalizing to get 7, then biasing to get 7 + 127 = 134.

    • @akhil4841
      @akhil4841 8 ปีที่แล้ว

      thank u

  • @Asdfdyutgfd
    @Asdfdyutgfd 2 ปีที่แล้ว

    you are great sir!!

  • @jerralynpino7467
    @jerralynpino7467 7 ปีที่แล้ว

    the exponent of Y which is 8 was added with 127, in which i found incorrect... because the exponent is positive so we should subtract 127 to 8... EXPONENT value is 1110001001 for Y...

    • @goldenotis9703
      @goldenotis9703 7 ปีที่แล้ว

      you add the excess(127) not subtract. The whole reason for you adding the excess is to make sure it's a positive number.

  • @prateekkeer8487
    @prateekkeer8487 3 ปีที่แล้ว +1

    Youre goD🙏🔥🔥

  • @rishabhnegi1937
    @rishabhnegi1937 4 ปีที่แล้ว

    Awesome job

  • @bazardnubis7723
    @bazardnubis7723 5 ปีที่แล้ว

    Strong perseverance

  • @tarunsinghal8840
    @tarunsinghal8840 8 ปีที่แล้ว

    I have a no. 0.250*8 . Can I multiply it simply first and then convert into floating point? Will it be a right way or not? Reply fast.

    • @JacobSchrum
      @JacobSchrum  8 ปีที่แล้ว

      You can multiply it first

  • @swathibr7266
    @swathibr7266 6 ปีที่แล้ว

    Thank you sir...

  • @McKisiek
    @McKisiek 5 ปีที่แล้ว

    You rock!

  • @surftijmen
    @surftijmen 3 ปีที่แล้ว

    Thanks!

  • @jjjrrrrrrrrr3482
    @jjjrrrrrrrrr3482 9 ปีที่แล้ว

    thanks! very good explanation

  • @bellafrade
    @bellafrade 2 ปีที่แล้ว

    grazie

  • @txtrocket9064
    @txtrocket9064 19 วันที่ผ่านมา

    still helping in 2025.

  • @realgyan4910
    @realgyan4910 5 ปีที่แล้ว +2

    Dec 2019😁

  • @007abdulrahman
    @007abdulrahman 2 หลายเดือนก่อน

  • @李龙-b2o
    @李龙-b2o 3 ปีที่แล้ว

    Hardcore

  • @sarahmanzi5348
    @sarahmanzi5348 3 ปีที่แล้ว

    no way dude

  • @076torikul9
    @076torikul9 ปีที่แล้ว +1

    I'm giving it up 😵‍💫🥲