Binary 4 - Floating Point Binary Fractions 1

  Рет қаралды 352,831

Computer Science Lessons

Computer Science Lessons

Күн бұрын

Пікірлер
@razvanbarbu278
@razvanbarbu278 4 жыл бұрын
Videos like these are gold. I wish they were around 10 years ago when I started college. I am a bored, high-level front end developer. In an attempt to stimulate my mind, I started pursuing a spiraling sequence of steps that began with my attempt of building a command line game engine in C++. I realised how important it is to have a deep understanding of variable representation in memory. The feeling of "gambling" when you write a new line of code simply vanishes, as you regain control of what is happening under the hood. Thank you so much for your effort!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are very welcome, and thanks for commenting. I believe it's important, whatever you do for a living, that you should never stop learning. And you're right, understanding the basics is always the place to begin. Good luck. :)KD
@latedeveloper7836
@latedeveloper7836 4 жыл бұрын
3:55 Allocation of bits to the mantissa and the exponent, both stored in 2's complement 5:05 Signed bit of the mantissa as a positive/negative as per 2's complement 5:26 Checking whether the exponent is positive/negative and implications for binary point 5:49 Converting to base 10 5:55 Step 1 - work out the value of the exponent in denary 6:10 Step 2 - float the binary point in the mantissa to the right/left according to the value of the exponent 6:46 Example 2 - 16 bit register (10 bit mantissa, 6 bit exponent) 7:45 Example 3 = positive value with negative exponent 8:25 Practice exercises (followed by solutions) 8:45 Further practice exercises with 4 bit mantissa and 4 bit exponent 9:08 Example with a negative number 10:08 Final example with a negative number 10:50 Practice exercises for negative numbers (followed by solutions)
@Replyingg
@Replyingg 3 жыл бұрын
Thank you
@h1k0usen13
@h1k0usen13 4 жыл бұрын
You seriously make the best computer science explanations on youtube.. just keep it coming! Your voice is also pretty soothing :]
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Thanks for the lovely comment. :)KD
@thomaslee7909
@thomaslee7909 4 жыл бұрын
great video man, when my teacher explained this made 0 sense over 3 lessons. Now I completely understand in 15 minutes!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Delighted to help :)KD
@Mateksk8oz
@Mateksk8oz 4 жыл бұрын
Lifesaver! Thank you so much! The best explanation I found. 11 minutes could saved me whole yesterday, instead I was trying to understand that from my rubbish books. THANK YOU GOOD SIR!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You're very welcome. Don't give up on the books completely; it's a fast moving field so sometimes you have to dig around for fragments of information and piece them together. Slow learning is the deepest. :)KD
@alexbukk556
@alexbukk556 3 жыл бұрын
Best and most helpful video on binary numbers I've EVER seen!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
You are very kind. Thank you :)KD
@tyberfen5009
@tyberfen5009 4 жыл бұрын
Time for the obligatory "Thank you for saving another aspiring EE student" Jokes aside. I truely am gratefull. Not to mention, that the explanation is excellent
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are most welcome. Thanks for the lovely comment. :)KD
@rashida786ali1
@rashida786ali1 7 ай бұрын
Thank you so much. I never got these questions right ever. My Paper 1 is in 2 days and honest to god you are a blessing and I think my grades may have been saved.
@thereformist8718
@thereformist8718 7 ай бұрын
How did you do?
@rashida786ali1
@rashida786ali1 7 ай бұрын
@@thereformist8718 I think it went well. I honestly expected way worse because my teacher was hyping P2. He said recursion comes up every year. I know I messed up every code question and the Dikstra but other than that, it was fine. But that means that 2025 exams are going to be so hard.
@oneanddonediy
@oneanddonediy Ай бұрын
Floating points are a beast to explain to people. What makes ti hard is that most people thinks floating points are decimals. This helps!
@debarunkumer2019
@debarunkumer2019 4 жыл бұрын
One of the best video I have come across so far.
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Delighted to help. :)KD
@maruthiprasad8184
@maruthiprasad8184 4 жыл бұрын
Thank you so much sir, now I am clear on this subject. the best part of the video is 4 practice questions with solution, based on practice questions , our knowledge on the subject can be concluded. Good job sir. Keep it up.
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are very welcome. Thanks for the comment. :)KD
@Iamstephane
@Iamstephane 3 жыл бұрын
Thank you very much for all your videos. It really helps out alot both when i was in advanced level and now in the university Love from Cameroon 🇨🇲❤️
@timho1415
@timho1415 2 жыл бұрын
This video is really amazing. It solved the questions that came up with when I was first introduced to floating point numbers.
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
Delighted to help :)KD
@noctua7771
@noctua7771 4 жыл бұрын
This is the only explanation I found that makes sense, thank you!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are most welcome :)KD
@joanalune
@joanalune 2 жыл бұрын
Great video! But I have a question. In 8:43 why does 111111 equal 2^-1 ?
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
Hi Joana. The leftmost 10 bits are the mantissa, and following 6 bits are the exponent. This particular way of encoding floating point numbers uses the format mantissa^exponent (mantissa raised to the power of the exponent). If all of the bits of the exponent are 1, when using two's complement, this represents -1 (in base 10). If this doesn't make sense please go back and watch this video. kzbin.info/www/bejne/o4PZlHqfn718b9k Let me know how you get on :)KD
@joanalune
@joanalune 2 жыл бұрын
@@ComputerScienceLessons Thank you so much, I understand it now, keep up the great work
@ontheway5792
@ontheway5792 3 жыл бұрын
Thanks man for saving my A level
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Delighted to help :)KD
@petersenglish
@petersenglish 3 жыл бұрын
I have degrees in German, International Studies, and music, and even I was able to understand this. Well done!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Du bist herzlich Willkommen :)KD
@omarrandoms4157
@omarrandoms4157 Жыл бұрын
the most clear explanation in the whole internet! thx
@mrx-qi8th
@mrx-qi8th 3 жыл бұрын
10:25 how come the fractional part value became negative? I think it must be negative mantisa (-2) + positive fractional (0.25 + 0.125) so the answer should be -1.625
@LasarMoon
@LasarMoon 2 жыл бұрын
That's what I was thinking as well.
@TheAmeer3881
@TheAmeer3881 4 жыл бұрын
Mantissa - precision Exponent - range Got it chief you the man
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Tnx :)KD
@stylangee334
@stylangee334 10 ай бұрын
Excess127 I don’t get this one
@erendurmus3962
@erendurmus3962 2 жыл бұрын
for the second example at 9:00, when the value 0.111 is multiplied by 2^-2 5 digits are required to represent the resulting value. since there are 4 mantissa and 4 exponent digits how is the resulting value represented at the digitally? does the computer utilize exponent bits too?
@axedyson
@axedyson 4 жыл бұрын
two questions: 1. Why is the base specifically always 2? 2. What happens when the exponent is much bigger than the mantissa, will there be enough bits to contain the result of the calculation?
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Hi Andyson 1. A typical computer stores a number as a sequence of 1s and 0s (bits) inside a fixed size register. Each bit has a place value. Place values increase in powers of 2. This is not immediately obvious but it's worth keeping in mind how we were taught to count in base 10. Take another look at this: kzbin.info/www/bejne/mXuxnmxpbb2ql9E 2. If you were to allocate more of a register's bits to the exponent, you could have a greater range (much smaller and much bigger numbers), but you would have less bits for the mantissa so you would lose accuracy. Take a look at this: kzbin.info/www/bejne/d2Orl5-GatiUlZI :)KD
@alexanderscheffer3882
@alexanderscheffer3882 4 жыл бұрын
Thank you so much for sharing your knowledge, sir!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are most welcome. :)KD
@AkimboFennec
@AkimboFennec 3 жыл бұрын
Oh my god, this is the best tutorial on ieee floating point ever, Thank you so much. I pray to you, it is so clear
@psgkelvin4919
@psgkelvin4919 4 жыл бұрын
much better than my teachers, thank you so much!
@mortenlund1418
@mortenlund1418 4 жыл бұрын
Thanks so much for this excellent explanation - you are putting teachers out of jobs !!
@ray.watts-35
@ray.watts-35 3 жыл бұрын
Perfect explanation, thank you. Good to have those try it yourself examples too to make sure its sunk in.
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you. Glad to help :)KD
@emanelshamekh
@emanelshamekh 3 жыл бұрын
even water isn't clear like this. Thank you very much
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you. You're most welcome. :)KD
@danic8676
@danic8676 3 жыл бұрын
Thank you, the pdf I got given by the teacher was a huge mess, I appreciate the explanation.
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Delighted to help. Take your time with this topic and do plenty of practice. :)KD
@mirageleung
@mirageleung 4 жыл бұрын
Hello, thanks for the video. At 8:06 I'm a bit confused, howcome in the exponent: 111110 is -2? Thanks!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
The exponent is in two's complement form. The most significant bit has a negative place value. Please take a look at my video on two's complement: kzbin.info/www/bejne/o4PZlHqfn718b9k :)KD
@mirageleung
@mirageleung 4 жыл бұрын
@@ComputerScienceLessons That make much more sense! Very much appreciated :) Keep up the great work
@hastarajrai215
@hastarajrai215 3 жыл бұрын
you always give us the best of explanations.....
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you :)KD
@omeghana
@omeghana 2 жыл бұрын
I am really confused at 9.56. -8+4+2=-2 . Should answer be -2.5?
@deepblackoutlaw9640
@deepblackoutlaw9640 Жыл бұрын
It's -2 + 0.5 = -1.5 Not -2 - 0.5 = -2.5 According to the fact that the last bit of the exponent is positive not negative
@flueepwrien6587
@flueepwrien6587 3 жыл бұрын
Isn't at 9:05 the answer on the second question 0.109375 instead of 0.21875 ?
@flueepwrien6587
@flueepwrien6587 3 жыл бұрын
I cannot wrap my head around this, no matter how i count it i always get the same answer.
@flueepwrien6587
@flueepwrien6587 3 жыл бұрын
My bad, I started counting bytes from 1/16 isntead of 1/8
@joopie46614
@joopie46614 3 жыл бұрын
Uh where did you get the 0.5 and 0.25 from?
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
These are the place values of the binary digits. In base ten, we know that 357.46 is actually 3*100 + 5*10 + 7*1 + 4*0.1 + 6*0.01 In binary we know that 101.11 is actually 1*4 + 0*2 + 1*1 + 1*0.5 + 0.25 I mention this concept in my very first video about the binary number system.
@joopie46614
@joopie46614 3 жыл бұрын
@@ComputerScienceLessons ah thank you. I'm in my first month or two doing A level computer science and wanted to try get ahead of some of the teaching such as floating point calculations
@shahryarhb6263
@shahryarhb6263 2 жыл бұрын
I love you , finally after 3 semester I understand it
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
Delighted to help :)KD
@MrJustinRobertson
@MrJustinRobertson 4 жыл бұрын
Very nice, although your last two examples don't seem to be normalised to begin with. Is that deliberate?
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Thank you. Yes, normalisation is a concept I wanted to introduce later. :)KD
@Quietlamacakes
@Quietlamacakes Жыл бұрын
The knowledge you kind sir have bestowed upon me along with your soothing voice helped me a lot with the subject that I didnt quite understand until now. I just want to thank you for your effort =D
4 жыл бұрын
1:14 This is indeed elementary charge, but it's not the charge of an electron measured in coulombs, since electrons are, by definition, negatively charged. If you said "charge of a proton," everything would be correct, but if you're going to say "charge of an electron," you have to have a minus in front of it.
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are quite right. It would also have been correct if I had said, "this is the elementary charge which was once called the electron". I'll upload an edit soon. I would be interested to hear what you think of my forthcoming series on quantum mechanics.
@JamesBrodski
@JamesBrodski 3 жыл бұрын
What an amazing video. You explained it beautifully. Thank you s much!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
...and than you. You are most welcome :)KD
@ragazoub
@ragazoub 3 жыл бұрын
thanks, my teacher didn't explain this at all, so it's kinda nice to see that left most bit in the exponent is always negative
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Indeed - both the mantissa and the exponent are in two's complement, so the left most bit has a negative place value.
@ospina79
@ospina79 2 жыл бұрын
I don't understand why the exponent is 2 instead of being 30 in the example 8:00, since it has the 1's in 16-8-4-2 in the exponent part. The same in the exercise at minute 8:33, the second example should give an exponent of -31, since it has 1s in 16-8-4-2-1 in the exponent part but the solution is an exponent of -1.
@ospina79
@ospina79 2 жыл бұрын
I found the answer, thks! *Computer Science* :"The exponent is in two's complement form. The most significant bit has a negative place value. Please take a look at my video on two's complement: kzbin.info/www/bejne/o4PZlHqfn718b9k :)"
@Stopanimtz
@Stopanimtz 4 жыл бұрын
Thank you excellent, tutorial. Very clear, I couldn't understand other tutorials bit this worked a treat :)
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Glad to help. :)KD
@xxczn
@xxczn 2 ай бұрын
bro u dont know how much i scanned youtube to understand this topic until i came across your video😭😭
@ComputerScienceLessons
@ComputerScienceLessons 2 ай бұрын
Glad to help :)KD
@deathtoy101
@deathtoy101 3 жыл бұрын
9:50 the value should be -2 not -1.5 since you have -8+4+2 = -2
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Not quite. The calculation is -8+4+2+0.5 = -1.5
@olegkuzenko
@olegkuzenko 4 жыл бұрын
do not like to write comments, but, big thanks for this video, great explanation
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are welcome. You comment is most appreciated :)KD
@Rob-xg9ws
@Rob-xg9ws Жыл бұрын
I LOVE THE ACCENT
@sukshithshetty4847
@sukshithshetty4847 3 жыл бұрын
9:55 should its answer be -2.5??
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
-1.5 is correct. You need to take -8 then added every other place value to it. You will find that -2 plus 0.5 is indeed -1.5 :)KD
@mister-ace
@mister-ace Жыл бұрын
7:27 why it always changed and why it didn’t start with 1-2-4-8-16-32 instead we have 0.125-0.25-…?
@arianagm2332
@arianagm2332 11 ай бұрын
After the decimal point it goes 2^-1, 2^-2, 2^-3 etc.
@SonNguyen-pj7nd
@SonNguyen-pj7nd 4 жыл бұрын
what is the difference between putting exponent behind mantissa and the IEEE 754 standard? Does the method remain the same, sir ?
@tolgayatamturk2304
@tolgayatamturk2304 4 жыл бұрын
Thank you that was very well explained. I had issues grasping it but now i fully understand it.
@Mrmuhammedrahman
@Mrmuhammedrahman 3 жыл бұрын
Excellent explanation and well animated. Seriously helped alot with differentiating to non -gcse cs students coming to a level
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you :)KD
@ramiltaghiyev9712
@ramiltaghiyev9712 2 жыл бұрын
Help please. Why on 8:40 is 111111 equal to 2^-1?
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
Are you familiar with two's complement? If not, please go back and watch this video kzbin.info/www/bejne/o4PZlHqfn718b9k :)KD
@madeleinevargas8898
@madeleinevargas8898 4 жыл бұрын
Excellent self explanatory video 👏🏽👏🏽👏🏽
@isayaps
@isayaps 2 жыл бұрын
for some reason, I always get the second example question wrong. I don't understand why.
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
Make sure you study the solutions and try again. Life's greatest teacher - is failure. :)KD
@isayaps
@isayaps 2 жыл бұрын
@@ComputerScienceLessons Thank you, I tried multiple times and I got the right answer finally.
@TimoDeWinter
@TimoDeWinter 2 жыл бұрын
Dear KD, EDIT; nevermind I have noticed I made a math mistake on my part it is actually correct the way I interpret it I just didn't recount the numbers thanks for the video though it was very well done I was following your tutorial and found that in the first examples that you let us do ourselfs you made a mistake I think at the second exercise when you have to translate the 0.0101 to the decimals you say it's 0.3125 but then the binairy should say 0.011 am I wrong or correct? Hope you can help it's at 8:42 kind regards timo
@LisaCalegari
@LisaCalegari 3 жыл бұрын
This is so helpful!!! Thank you! This is *such* a confusing topic when you're first learning it and the textbook my professor picked for our class is insanely dense and full of confusing math formulas. He's a good professor but his lecture was still... not enough to fully grasp the concept for me. But now I feel like I actually understand it well!!! (which is good because I have both hw problems on this and a few insanely hard bitwise logic puzzles on this stuff to complete asap). You are really really really good at teaching and I am so grateful for this video!!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you so much. I hope you stick with it, sometimes you have to dig around for what you need to make a concept click. :)KD
@hagnosis
@hagnosis 2 жыл бұрын
best computer science explanations. may Allah help you like how you did with us
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
Thank you :)KD
@bartlomiejodachowski
@bartlomiejodachowski 3 жыл бұрын
hasnt it been implemented that there is "one more bit in mantisa"? hidden "1"? becouse binary exponencial form alwas starts with 1. ( and mantisa would store only bits after) i dont get it, pls help, i wanna know my floats
@bartlomiejodachowski
@bartlomiejodachowski 3 жыл бұрын
ok i knwo it has something to IEEE
@angelelenkov5209
@angelelenkov5209 3 ай бұрын
Perfect explanation. Thank you ❤
@siddiquiadnan92
@siddiquiadnan92 4 жыл бұрын
At 9:54 it should be -2.5 ?
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
-8 + 4 + 2 = 2. Then 2 + 0.5 = -1.5 The example is correct. :)KD
@siddiquiadnan92
@siddiquiadnan92 4 жыл бұрын
@@ComputerScienceLessons ok I got i was seeing right of decimal separately
@beaconinternational1574
@beaconinternational1574 2 жыл бұрын
Salute to sir for making such an informative video..
@CH-tw7wb
@CH-tw7wb 4 жыл бұрын
I don't understand 8:06, how is the exponent 2^-2 ??
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Hi. The system needs a way to float the point to the left, which is why you can have a negative exponent. The exponent and the mantissa are both encoded in two's complement. If you are unsure about two's complement, take a look at this video: kzbin.info/www/bejne/o4PZlHqfn718b9k
@kwonyijun1286
@kwonyijun1286 3 жыл бұрын
At 6:46, how do you get 3 and 2^3?
@arianagm2332
@arianagm2332 11 ай бұрын
Because 2+1=3
@Pimp482
@Pimp482 4 жыл бұрын
1:17 technically that is the magnitude of the charge of an electron or the charge of a proton(or what used to be the charge of an electron iirc) but great video
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are quite right. I should have said 'elementary charge'. Good to have a scientist keeping me on my toes. :)KD
@prestoX
@prestoX 4 жыл бұрын
Awesome content and also awesome brit slang.
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
Cor blimey guvna! :)KD
@BoraY5734
@BoraY5734 2 ай бұрын
why do you shift the binary point and on what reasons do you shift it 2 times or 3 times i didnt get it
@BoraY5734
@BoraY5734 2 ай бұрын
in 7:45 what happening to the 2**2
@elkscout1
@elkscout1 3 жыл бұрын
neat explanation using a sign bit in the exponent, but what about systems that use a biased exponent? Your mention of IEEE 754 standard leads one to wonder how you mispoke and used the term "mantissa". One of the revisions of the IEEE754 decided on using the term "significand". The revisions also decided on a biased exponent.
@danegoulter4392
@danegoulter4392 3 жыл бұрын
Why the hell they dont teach it this way in studies? It's so much better
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
I guess it depends on the school. Delighted to help. :)KD
@josuevaldez9663
@josuevaldez9663 2 жыл бұрын
thank you, just what i needed
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
You're welcome :)KD
@d30124
@d30124 2 жыл бұрын
thank you for the amazing explanation!
@ComputerScienceLessons
@ComputerScienceLessons 2 жыл бұрын
You are welcome :)KD
@Catholic_BB
@Catholic_BB Жыл бұрын
Thank you Mr. GENIUS !!
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
Thank you :)KD
@nickpenacl_
@nickpenacl_ Жыл бұрын
Thanks for this nice video, may I ask I doubt of last example; for the following binary exponent 1 1 1 1 1 0 my own result was -1 (-32 16 8 4 2) , but your video said -2. Then let me beg you for clarification. Cheers
@ComputerScienceLessons
@ComputerScienceLessons Жыл бұрын
Thanks for the comment. Your right-most place value should be 1. -32 16 8 4 2 1 :)KD
@nickpenacl_
@nickpenacl_ Жыл бұрын
@@ComputerScienceLessons Thanks for your clear out my friend, keep going !
@not_yet_implemented
@not_yet_implemented 2 жыл бұрын
Thank you for the great video, the examples really helped
@Jovkee0909
@Jovkee0909 Ай бұрын
Look man i was forced to search this because of the test i have but man this helps
@ComputerScienceLessons
@ComputerScienceLessons Ай бұрын
Good luck on the test
@radamesvalentin
@radamesvalentin 3 жыл бұрын
Un millón de gracias.
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Eres muy bienvenido
@wojciechfioka5819
@wojciechfioka5819 3 жыл бұрын
Very good explanation!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you :)KD
@serhatteoman6669
@serhatteoman6669 5 жыл бұрын
Why mantissa and exponen in the different plaxes first must be exponent and then mantissa
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
It depends on the system. You are probably referring to the IEEE754 standard used in general purpose computers. Systems for Digital Signal Processing (DSP), of which there are many, may use completely different formats for representing floating point binary numbers. At advanced level in the UK, students therefore study the general principles of floating point binary with different sized mantissas and exponents. Placing the exponent after the mantissa looks more like standard scientific form, but where it is actually stored in the processor depends on the architecture.
@jseanlimpiado1565
@jseanlimpiado1565 3 жыл бұрын
Thank you for this great tutorial...🙂🙂🙂🙂🙂
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
You are most welcome :)KD
@sathya9494
@sathya9494 Жыл бұрын
Sir we want to follow same method for negative floating values !!! Answers are different if we use same method as positive floating numbers
@salehhassan9524
@salehhassan9524 2 жыл бұрын
thank you so much, now i understand why is it called float , the -ve,+ve complementary thing and how very large or small values represented in binary machine
@TheNewEthiopiaTube
@TheNewEthiopiaTube 5 жыл бұрын
Why is the exponent bit is -2 in the last question? Can you please explain more about that
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
The exponent and the mantissa are stored using two's complement. So, if the most significant bit (left-most bit) of the exponent (or the mantissa) is 1, then it is a negative number. Take a look at my video on two's complement representation of negative numbers. kzbin.info/www/bejne/o4PZlHqfn718b9k
@copitzkymichael3313
@copitzkymichael3313 Жыл бұрын
Natural logs is this?
@fabiharizvi4272
@fabiharizvi4272 4 жыл бұрын
Thanks for explaining so well!
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You are very welcome :)KD
@zoe_paw
@zoe_paw Жыл бұрын
Hi, i keep getting 0.8125, for the 1101000000 111111 question. What am i doing wrong?
@MTP2nd
@MTP2nd 11 ай бұрын
Use 1.1101 for the left most negative one's place.
@flueepwrien6587
@flueepwrien6587 3 жыл бұрын
where can I see the video to be watched after this one
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
They are in my playlist called Binary. I hope you like them.
@hugoalonso8308
@hugoalonso8308 3 жыл бұрын
Great video! So helpful
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you :)KD
@vidunsewmithafonseka1258
@vidunsewmithafonseka1258 3 жыл бұрын
Thanks, this video was really helpful
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
You're welcome :)KD
@MagnusAnand
@MagnusAnand 3 жыл бұрын
Fantastic series
@kingmoore2156
@kingmoore2156 11 ай бұрын
You just gained an extra follow😁
@ComputerScienceLessons
@ComputerScienceLessons 11 ай бұрын
Welcome and thanks :)KD
@arielclement8734
@arielclement8734 3 жыл бұрын
Hi everyone, I'm relatively new to computer science. Would anyone be kind enough to explain why the MSB for the exponent it -32 instead of 32? Thanks in advance!
@slavoljubkuroglavic1324
@slavoljubkuroglavic1324 3 жыл бұрын
Beause if it was a 1 instead of 0 it would mean its a negative number(because its the first integer), so it would be -32 anyway.
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Hi Ariel. The exponent needs to be encoded in two's complement form so that that it can represent positive or negative values (take a look at my video on two's complement if you are unfamiliar with the concept. kzbin.info/www/bejne/o4PZlHqfn718b9k ). A negative exponent specifies that the binary point must float left, whereas a positive exponent specifies that it should float right. Having said that, there is another way to encode the exponent which is used in general purpose computers (like your PC) and that is covered in this video kzbin.info/www/bejne/iKaunJiGrtRssM0 :)KD
@toderirecaca5266
@toderirecaca5266 5 жыл бұрын
Why it's - 0.25 in the last question? The msb is 1 and it's not negative it should have been 0.25 plus 0.125 why minus
@ComputerScienceLessons
@ComputerScienceLessons 5 жыл бұрын
Hi Toderie If you are referring to time 10:42 in the video(?), you need to bear a couple of things in mind. If the ORIGINAL representation has a sign bit of 1 (msb is 1), then the final result MUST also be negative. To achieve this, when you perform the final step (0.011 = -0.125) you must assume the left most 1 (the msb) has a NEGATIVE place value (shown in red in the video). In this case, -0.25 + 0.125 = -0.125 (I just checked this on a calculator). I really hope this helps :) KD.
@batteryman2852
@batteryman2852 4 жыл бұрын
@@ComputerScienceLessons Sorry for old post, but i'm trying to understand how to read 8 bytes and convert them manually to Float64, but i decided to start with Float32 first, so i can get my head around it. but since on a x32/x64 Intel CPU, the Exp is first, and its in 9 bits, so if the 9th bit are 1, then its -256, and if the 9th bit is 0 its 256,? i am correct? so [ 2^8*Bit ] Or [ (2^8*Bit) - ((2^8*Bit)*2) ] , + (2^7*Bit), + (2^6*Bit), + (2^5*Bit) , + (2^4*Bit), + (2^3*Bit), + (2^2*Bit), + (2^1*Bit) , + (2^0*Bit). The reason im writing so much is because i'm trying to make it into programming code.
@fiance-for11
@fiance-for11 Жыл бұрын
What he'll is this accent shefild or bermigaham or Liverpool?
@mansorsaleh8698
@mansorsaleh8698 4 жыл бұрын
Thanks for the very informative lecture
@ComputerScienceLessons
@ComputerScienceLessons 4 жыл бұрын
You're very welcome :)KD
@loftylabs8629
@loftylabs8629 3 жыл бұрын
Great video, thank you!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Thank you :)KD
@sour3000
@sour3000 3 жыл бұрын
6:01 where tf did 2 come from?
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
With binary we are working in powers of 2. kzbin.info/www/bejne/mXuxnmxpbb2ql9E
@rodrigorivers2469
@rodrigorivers2469 3 жыл бұрын
Hello, can anybody help me understand why the left most bit on the exponent equals negative 36, and not a positive one? I would be really thankful!
@ComputerScienceLessons
@ComputerScienceLessons 3 жыл бұрын
Hi. In this particular scheme (used in various embedded and digital signal processing systems), both the mantissa and the exponent are stored in two's complement format. Two's complement is explained in this video: kzbin.info/www/bejne/o4PZlHqfn718b9k Not that modern PCs use a different scheme, namely the IEEE 754 standard, which is described here: kzbin.info/www/bejne/iKaunJiGrtRssM0 :)KD
@rodrigorivers2469
@rodrigorivers2469 3 жыл бұрын
@@ComputerScienceLessons oh ok. Thank you so much for answering!!!
@royalegaming9801
@royalegaming9801 4 жыл бұрын
Very nice explanation Thanks for making video
@nguyenkhai5178
@nguyenkhai5178 4 жыл бұрын
Should 1110 1000 00 | 000011 = -2.5?
@siddiquiadnan92
@siddiquiadnan92 4 жыл бұрын
Yes he mistakenly writes -1.5 Or we r doing any mistake I'm confused
@calipo5110
@calipo5110 5 жыл бұрын
Why is it -32 when the sign bit is positive
@mohammaddiaah.5513
@mohammaddiaah.5513 5 жыл бұрын
When we want to convert to denary from binary using sign and magnitude, the sign bit is usually the negative place value of the bit.
@suriyas1456
@suriyas1456 5 жыл бұрын
Put it this way -32 16 8 4 2 1 When you set the sign bit it's actually 1 0 0 0 0 0 - 32 + 0+ 0+ 0+ 0+ 0 Another example, let's represent -30 1 0 0 0 1 0 -32 + 0+ 0+ 0+ 0 +2+0
Binary 5 - Floating Point Range versus Precision
11:21
Computer Science Lessons
Рет қаралды 36 М.
how floating point works
17:48
jan Misali
Рет қаралды 395 М.
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
Twos complement: Negative numbers in binary
13:49
Ben Eater
Рет қаралды 1,2 МЛН
Binary 3 - Fixed Point Binary Fractions
6:46
Computer Science Lessons
Рет қаралды 60 М.
Decimal to IEEE 754 Floating Point Representation
9:27
Abishalini Sivaraman
Рет қаралды 1,5 МЛН
Floating Point Numbers - Computerphile
9:16
Computerphile
Рет қаралды 2,4 МЛН
How Floating-Point Numbers Are Represented
9:56
Spanning Tree
Рет қаралды 41 М.
IEEE 754 Floating Point Representation to its Decimal Equivalent
7:26
Abishalini Sivaraman
Рет қаралды 497 М.
Binary Addition and Subtraction With Negative Numbers, 2's Complements & Signed Magnitude
24:57