I am humbled by how pedagogical, clear and efficient you are in teaching this material. I'm a former teacher switching careers to work in IT, and your videos have been incredibly helpful and instructive. Thank you very, very, much!
@ComputerScienceLessons3 жыл бұрын
You're very welcome and thank you so much. I too switched from teaching to IT, but I came back to teaching again. :)KD
@talharashidi3666 жыл бұрын
this is easily the best video on youtube for learning 2's complement.
@ComputerScienceLessons6 жыл бұрын
You are very kind. Tnx :)
@ApteraEV2024 Жыл бұрын
I❤u 2's!!❤🎉
@oliver40033 жыл бұрын
so I spent hours reading this section in my textbook trying to understand it with no luck. So i decided to watch this video, and 12 minutes later I fully understand the concept. Thank you so much!
@ComputerScienceLessons3 жыл бұрын
You are very welcome - glad to help :)KD
@Jayson223ad5 жыл бұрын
I have exam in Discrete mathematics in a few days and this is one of many topics. I knew how but not why. Thank you so much for making this so so clear. My teacher never explained the first 1 stands for -128! nor the book or notes . If all the teachers were like you the civilization would be much more advanced.
@ComputerScienceLessons5 жыл бұрын
You are most welcome :)KD
@rancorjoy5412 Жыл бұрын
I do not think the first number stands for -128! ~ -3.856205e+215
@T3chBeatz6 жыл бұрын
Kevin's delivery of these tutorials is just brilliant - Thank you!
@adamyagaur96382 жыл бұрын
This is learners gold. Short , crisp & clear . Thanks a lot!.
@ComputerScienceLessons2 жыл бұрын
Thank you :)KD
@TheLonelyLPer3 жыл бұрын
This is hands down the best explanation I've had for 2's complement! Thank you!
@ComputerScienceLessons3 жыл бұрын
You are very welcome :)KD
@cesarvides97294 жыл бұрын
Just when I thought I had learned an easy method, you pull out another one. This video had me on an emotional rollercoaster.
@ComputerScienceLessons4 жыл бұрын
I hope it was the exciting part of the ride. :)KD
@exactzero4 жыл бұрын
Awesome explanation. You didn't just teach the how but also the why which is the most important of all. That last technique was mind-blowing!
@ComputerScienceLessons4 жыл бұрын
Thanks for the comment. Delighted to help. :)KD
@veryangerymanminecraftisco90485 жыл бұрын
Thank you so much dude, I never mange to find people who speak English on youtube that teach these sort of thing.
@potatochannel1948 Жыл бұрын
-Sir, you are a saver, my prof at the university only gave us the two's complement method without explaining where the hell that came from . I very thankful for you sir!
@fmv537010 күн бұрын
clear explanation in all topics in the playlist about binary and denary representations for both integers and floating point numbers, thanks for your effort.
@ComputerScienceLessons7 күн бұрын
You're very welcome :)KD
@boudieraurelien85315 жыл бұрын
To be honnest, if you were in front of me, i'd have hug you ! You just made me so happy, i finally understood why i can use the 2's complement. I didnt understand why i had to use it. Thank you soooo much!
@ComputerScienceLessons5 жыл бұрын
You are welcome. Things are much easier to understand when you know why! :) KD
@nicestcatoutthere32215 жыл бұрын
This was truly the best video on complements.
@ComputerScienceLessons5 жыл бұрын
Thanks for the lovely comment :) KD
@rationalsage10844 жыл бұрын
This is an incredible insight, I've never understood this, my teacher only taught me the shortcut to the conversion.
@ComputerScienceLessons4 жыл бұрын
Underlying concepts are important if you want knowledge that you can build upon. Thanks for the comment :)KD.
@amanrubey4 жыл бұрын
your videos are simply superb. it's the same as watching some interesting documentary. I'm loving it. True Gem on the internet
@guzman-do7 жыл бұрын
What a great teacher you are, Sir!
@ComputerScienceLessons7 жыл бұрын
You are too kind.
@sandipghoshal21224 жыл бұрын
This so far the best video on two's compliment
@ComputerScienceLessons4 жыл бұрын
Thanks for saying so. :)KD
@xr.melissa Жыл бұрын
Excellent video! My coworker was trying to teach this to me but it's hard to follow without strict examples, so thanks for this!
@ComputerScienceLessons Жыл бұрын
You are most welcome :)KD
@jworld94 жыл бұрын
Thank you so much. Why the universities cannot make their material as easy as this? Thank you millions!
@ComputerScienceLessons4 жыл бұрын
You are very welcome. Thanks for the comment. :)KD
@deedewald17073 жыл бұрын
You are confident and capable to teach complex concepts !
@ComputerScienceLessons3 жыл бұрын
Thank you. I've been doing it for nearly 40 years :)KD
@deedewald17073 жыл бұрын
@@ComputerScienceLessons I put this method into Excel such as your teacher skills are excellent !
@LindaLawton7 жыл бұрын
You might want to add a link to the first series in the description. Make it easier for me to go check that one out :)
@blank-vw2sb6 жыл бұрын
AWESOME, i don't find this depth in two's complement. Really Nice
@flow_down_iana2 жыл бұрын
Oh my Godness. It's so great explained. I find it just wondersfull so you can pause the video or watch this one more time till you get the idea...not like at the uni.
@ComputerScienceLessons2 жыл бұрын
I very am glad to hear this is useful. There is a lot to be learned at university too. :)KD
@abhishekdutta80894 жыл бұрын
Thank you sir for this wonderful lecture on representation of binary numbers.
@ComputerScienceLessons4 жыл бұрын
You are very welcome. Thanks for commenting :)KD
@MrMeeseeksPiano2 жыл бұрын
You say that I can represent up to 256 positive numbers with 8 bits but then doesn't specify wether the MSB is -128 or 128 for the exercise at 8:03? Was I supposed to guess it?
@ComputerScienceLessons2 жыл бұрын
The left most bit is -128 as described earlier in the video. The left most bit is always a negative value with two's complement.
@soz8245 жыл бұрын
Great voice, super well made video and excellent explanation!
@fadhlyrafi Жыл бұрын
3:09 how about 2s complement table for 16 bit binary?
@ehsanmavaei53805 жыл бұрын
Awesome people like you who help people understand better are loveable and admirable
@v380riMz3 жыл бұрын
Bruh this becomes so easy when you know that MSB should be -128 for negative binary numbers
@ComputerScienceLessons3 жыл бұрын
That's the trick 💡:)KD
@user-fg6ng7ej6w9 ай бұрын
very clear explanation. cool that you presented 2 ways of dealing with it
@ComputerScienceLessons8 ай бұрын
Thank you :)KD
@alexmartini80873 жыл бұрын
At 11:35 for the example -44: how does the 3rd bit go from 0 + 0 = 1, but the 4th bit goes from 0 + 0 = 0?
@ComputerScienceLessons3 жыл бұрын
With the third pair of bits there is a 1 carried from the previous pair. With the 4th pair of bits, there is no carry. Take at look at this: kzbin.info/www/bejne/iom9c6Sqm6aCprs :)KD
@hammam926 жыл бұрын
The best video on KZbin, Thanks so much
@ComputerScienceLessons6 жыл бұрын
Thank YOU
@kenshinhimura87084 жыл бұрын
Thank you so much! Why can’t textbooks explain it the way you did from 0:00-7:00?
@ComputerScienceLessons4 жыл бұрын
I'm happy to help. Thanks for the comment. :)KD
@astheffander_alexander4 жыл бұрын
Got stuck because of the "online class" didn't help me.... But this video help sooooooo muchhh... Thanks!!! 😭
@ghalibazad59613 жыл бұрын
How did you subtract 38 from 90...can you explain? At 2:09 .....
@ComputerScienceLessons3 жыл бұрын
Column subtraction in base 10 is explained here www.bbc.co.uk/bitesize/topics/zy2mn39/articles/zc78srd :)KD
@ghalibazad59613 жыл бұрын
@@ComputerScienceLessons thanks
@fatimakhan30843 жыл бұрын
Best teacher ever!!!
@ComputerScienceLessons3 жыл бұрын
Wow - thanks :)KD
@mmmpz2298 Жыл бұрын
You safe me from failed the test😭 thank you so much😭
@mahmoudbasha48382 жыл бұрын
sir great work i spent a week to try to understand this topic but thanak to u it's done.. i wanna know sir what is the program u using to make these effects in the videos
@NoName-tj8dm2 жыл бұрын
Thanks for the great video. I am confused how system will be able to identify that left most bit is -128 of the bit is 1
@rx252513 жыл бұрын
Can you please explain how the computer identifies a number as a negative number before storing it in registers in its 2s complement form ? How does the computer know the result of arithmetic operation is negative so that it can be stored in its 2s complement form.
@ComputerScienceLessons3 жыл бұрын
Hi Ravi, a computer system stores POSITIVE numbers in two's complement as well. So that fact that it is negative, or positive, is part of the encoding. Ultimately, negative numbers come from outside the computer. When you input a negative number, you probably type a minus sign in front of it, the value you have input is then processed and stored accordingly. When it comes to arithmetic operations such as addition and subtraction, negative results take care of themselves (that's the beauty of two's complement) as you will see if you study floating point addition and subtraction later in this series. By the way, in this series, I am talking about general principles used by a range of different types of computer system. Modern PCs encode floating point numbers using the IEEE 754 standard, but the same arguments apply. :)KD
@rx252513 жыл бұрын
Thanks for the explanation! One follow-up question however - How do you represent a positive number in its two's complement form ? For example +57 in binary is 00111001 and two's complement of 00111001 is 11000111 So will the two's complement of +57 i.e., 11000111 be stored in the registers ? But the first bit is 1 which denotes a negative number. 11000111 from above is in fact binary representation of -57 and its 2's complement is 00111001 . what will be stored in the registers to represent -57 ?
@akshaybodla1635 жыл бұрын
Im really confused about binary addition. I have a few questions that i hope you can answer, thanks! 1) At 10:03 why is there a subscript of 1 at the last zero? 2) And for -122 in binary why does the addition of 0 and 0 in the two's place create a 1? 3) When is the result a 0 or 1 when adding bits
@ComputerScienceLessons5 жыл бұрын
When we perform a similar calculation in base ten, we add pairs of digits and, if necessary, we carry a digit. In the example below, 6 + 9 is 15 so we write down 5 and carry 1. The 1 is then added to 5 + 8. 4 5 6 +7 8 9 ___1___ 5 _______ In base ten, 1+1 = 2. We represent 2 in binary as 10, so 1+1 = 10. In my video, I write down the 0 and carry the 1. The green bits are the bits that are carried. In my example for -122, the the 1 that was carried from the previous operation is added to 0+0. I just haven't shown the carry bits this time. I hope this helps. will will make a quick video on how to add binary numbers together soon. KD
@tavongampofu95612 жыл бұрын
wow really helpful i was struggling with this for a while thank you
@ComputerScienceLessons2 жыл бұрын
You're welcome :)KD
@HealthConsciousUpdates5 жыл бұрын
Thanks sir It's too much useful video👍👌 Love this video from Pakistan
@ComputerScienceLessons5 жыл бұрын
Thank you :) KD
@thimalifernando71644 жыл бұрын
Awesome explanation. Thank you!
@ComputerScienceLessons4 жыл бұрын
You are very welcome. :)KD
@АнатолийАнатолий-п1д4 жыл бұрын
Very good video, sir.
@ComputerScienceLessons4 жыл бұрын
Thank you kindly :)KD
@DigitalGuruLK7 жыл бұрын
what is the maximum negative number in two's complement... how it represent large negative numbers....?
@ComputerScienceLessons7 жыл бұрын
That's where floating point binary comes to the rescue
@WesleyKanye Жыл бұрын
Thank you for simplifying this
@LimeriuxasLT2 жыл бұрын
Awesome video!!! Thank you so much!
@ComputerScienceLessons2 жыл бұрын
You're welcome, and thanks :)KD
@barrydevine3 жыл бұрын
Does the system whereby the MSB becomes a negative (ie -128) have a name?
@ComputerScienceLessons3 жыл бұрын
It's called 'two's complement' :)KD
@barrydevine3 жыл бұрын
@@ComputerScienceLessons In this video you seem to have 2 methods of making negative numbers: 1 - changing the MSB to -128 2 - 2's complement. Am i mistaken?
@Mike-vj8do3 жыл бұрын
hey man, what if we are asked to do it in 6 bits
@Mike-vj8do3 жыл бұрын
instead of 8 bits
@ComputerScienceLessons3 жыл бұрын
You might. The biggest number you could encode however would be 63 (64 possible values including 0). Perhaps there is an embedded system out there that only needs to work with integers up to 63. Some types of processor might allocate 6 bits of the current instruction register to the operation code, which means a maximum of 64 commands in the instruction set (as you'll see if you start looking into hardware architecture and low level code). :)KD
@ComputerScienceLessons3 жыл бұрын
see below
@monjasonsteng7861 Жыл бұрын
Thank you. This was great!
@ComputerScienceLessons Жыл бұрын
You're most welcome :)KD
@SuperSayiyajin5 жыл бұрын
Thanks for your playlist.
@TheAltKryptonite4 жыл бұрын
This video is awesome, thank you!
@ComputerScienceLessons4 жыл бұрын
Thank you for the awesome comment. :)KD
@AviPars3 жыл бұрын
what about positive binary to 2s complemenmt
@ComputerScienceLessons3 жыл бұрын
Same method - just put a 0 in the left-most place value. In two's complement, positive numbers always start with 0 and negative numbers always start with 1. :)KD
@CraigEaton6 жыл бұрын
This has confused me for YEARS and I have to teach this soon. This video just makes it so easy. I do have one question tho 1011 1011 How would one know which number is representing the negative?
@ComputerScienceLessons6 жыл бұрын
By convention, the sign bit is the left most bit. Inside a processor register, one of the bits will be allocated as the sign bit, usually on the left, but it might vary from processor to processor. This is decided by the designers of the processor.
@АнатолийАнатолий-п1д4 жыл бұрын
You just have to agree with whomever you talking to that you both use the same system. It's just like with character sets - it only works for you and your friends because you've agreed to use the same method of representation (encoding). If all of you will use different encodings (for example, like the ones before Unicode came along), you'll end up with the same binary numbers, but different interpretations of those (thus different characters).
@SusmitMohan7 жыл бұрын
Really very impressive work. Thanks a lot.
@ComputerScienceLessons7 жыл бұрын
Tnx :)
@theonesongchannel95134 жыл бұрын
Just Beautiful!
@ComputerScienceLessons4 жыл бұрын
Thank you :)KD
@voiceoverworld40365 жыл бұрын
Where does the green 1's come from?
@ComputerScienceLessons5 жыл бұрын
They are the carry bits. 1 + 1 = 10, so write down the 0 and carry the 1.
@shah1442 жыл бұрын
How would u do -7.5?
@ComputerScienceLessons2 жыл бұрын
Good question. You would need to use floating point binary. :)KD
@Technogrammer7 жыл бұрын
Excellent Work Done!
@ComputerScienceLessons7 жыл бұрын
:) Tnx
@oneminutedaily63945 жыл бұрын
Which method is the best?
@ComputerScienceLessons5 жыл бұрын
Two's complement lets you subtract a number by simply using addition. Sign and magnitude makes subtraction more difficult but is good for fast conversion.
@oneminutedaily63945 жыл бұрын
@@ComputerScienceLessons thank you so much sir 👍🏼 keep it up with the good content provided. No doubt u're a hidden gem in youtube 😄
@lumennganje27214 жыл бұрын
wonderful. thanks so much. God bless you
@ComputerScienceLessons4 жыл бұрын
You are very welcome :)KD
@milestailsprower45552 жыл бұрын
127 is possible in 8 bit twos complement.
@ComputerScienceLessons2 жыл бұрын
Indeed it is. The range is from -128 to 127 :)KD
@yangliyeh55104 жыл бұрын
Thanks a lot! Very clear!
@MTP2nd7 ай бұрын
im from chile, if is -32'768 for 16-bit binary numbers, i would stay it as -32'768 since doing two's complement of -32'768 does nothing.
@osianpetts556 Жыл бұрын
11:59, is what you're looking for Osh
@idensoneltume6275 жыл бұрын
I was mind blown 🤯
@williamtylerwillis64172 жыл бұрын
Thank you!
@ComputerScienceLessons2 жыл бұрын
You're welcome :)KD
@abdullateefjabasa16563 жыл бұрын
How amazing you are!
@c_1_qw3 ай бұрын
Thx for helping bruh 🎉
@Gravityys5 жыл бұрын
Denary = Decimal for those who don't know
@Gravityys5 жыл бұрын
Great video btw,really helping me grasp the basics of cs and understand them.
@ComputerScienceLessons5 жыл бұрын
Glad to be help :) KD
@kavereon4 жыл бұрын
holy...moly. I understand!
@ComputerScienceLessons4 жыл бұрын
That's music to my ears. :)KD
@ThePandaGuitar6 жыл бұрын
Fascinating!
@indikajayasinghe95793 жыл бұрын
best of best
@ComputerScienceLessons3 жыл бұрын
Thank you :)KD
@Democracy_Manifest3 жыл бұрын
Why this was published on April Fool's day I'll never know. Great video tho
@ComputerScienceLessons3 жыл бұрын
It's hard to believe it was nearly 4 years ago. What a fool I was then! Thanks BTW. :)KD