Binary Subtraction Tutorial

Тәжірибелік нұсқаулар және стиль

An example of binary subtraction. Subtraction in binary works like subtraction in decimal. In some ways it is even easier because there are less "cases" of what we need to do. This method, however, becomes obsolete when we switch to subtracting using two's complement negative numbers.

Пікірлер: 623

  • @mohammednazar324
    @mohammednazar3246 ай бұрын

    Anyone in 2024

  • @user-sv5id4bk5s

    @user-sv5id4bk5s

    3 ай бұрын

    😂

  • @user-ff1cj8fd2k
    @user-ff1cj8fd2k5 ай бұрын

    Anyone In 2024??

  • @Bishwajitnath

    @Bishwajitnath

    4 ай бұрын

    Here

  • @mhomo

    @mhomo

    4 ай бұрын

    Haha yeah

  • @lucymay6765

    @lucymay6765

    4 ай бұрын

    Here👋🏾

  • @saamin_syj8791

    @saamin_syj8791

    4 ай бұрын

    Yessir

  • @tvrtle5053

    @tvrtle5053

    4 ай бұрын

    wouldn't be without my teacher

  • @lukevickers204
    @lukevickers2045 жыл бұрын

    who'd have thought a 1:1 ratio, potato quality video from 9 years ago would teach me beautifully in 3 minutes

  • @gaurangakripa6693

    @gaurangakripa6693

    3 жыл бұрын

    correction: a 11 year video has taught me

  • @ProSimha

    @ProSimha

    3 жыл бұрын

    Lol

  • @exertkarma

    @exertkarma

    2 жыл бұрын

    they are always the best ones

  • @krishpansuriya9229

    @krishpansuriya9229

    2 жыл бұрын

    I’m 69th like 👍

  • @JustinYantho

    @JustinYantho

    2 жыл бұрын

    @@krishpansuriya9229 something about books and covers.

  • @seporokey
    @seporokey9 жыл бұрын

    FINALLY someone does a clear example with borrowing! Thank you!

  • @nkosinathimlenzane3044

    @nkosinathimlenzane3044

    5 жыл бұрын

    Dude. And textbooks fail to explain this.

  • @arungaur8242

    @arungaur8242

    3 жыл бұрын

    @@nkosinathimlenzane3044 yes u r right

  • @vishnuj2717

    @vishnuj2717

    2 жыл бұрын

    Hy game developer

  • @pandalover555
    @pandalover5558 жыл бұрын

    My prof went over this for an hour, never got it... and then you taught me in 5 min haha thank you!

  • @albanian2408

    @albanian2408

    6 жыл бұрын

    Same here

  • @ilaine.

    @ilaine.

    5 жыл бұрын

    Same

  • @tienyickting9293

    @tienyickting9293

    4 жыл бұрын

    Same here! I am so happy to have found this video :) Thank you so much!

  • @alphax4686

    @alphax4686

    3 жыл бұрын

    Professors suck...

  • @sarabjotsingh1500

    @sarabjotsingh1500

    3 жыл бұрын

    @@alphax4686 online school sucks man

  • @fakrulotaku5655
    @fakrulotaku56554 ай бұрын

    Watching this in 2024, 13 years after the upload and this tutorial was the only one which I found useful. Thanks a lot sir ❤

  • @Tenz0071
    @Tenz00716 ай бұрын

    Anyone in 2024😢

  • @sanathawijesooriya5439

    @sanathawijesooriya5439

    3 ай бұрын

    Here!!

  • @paulmapfumo

    @paulmapfumo

    Ай бұрын

    here

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

    I had just started primary school when you posted this video. Now, I'm at university watching it. Thank you very much :)

  • @remixisthis
    @remixisthis3 жыл бұрын

    Great way of explaining borrow as two 1s. I spent 15 minutes stuck on another video that explained it a different way, and got it within less than a minute with your video!

  • @bigsteppac1480

    @bigsteppac1480

    2 жыл бұрын

    same

  • @Paulanthny

    @Paulanthny

    3 ай бұрын

    Twos Compliment is actually the correct way.

  • @xx_gamer_xx8315
    @xx_gamer_xx83152 жыл бұрын

    11 years later and still very usefull, thank you!

  • @Rhalmarius
    @Rhalmarius13 жыл бұрын

    I was so confused with this and your explanation really helped me out. Thank you, and again, thank you.

  • @marlondemoya4270

    @marlondemoya4270

    3 жыл бұрын

    kzread.info/dash/bejne/pZ1_lciicrm1fKw.html

  • @michaelyuabov5056
    @michaelyuabov50568 ай бұрын

    Nah bro is goated in teaching binary subtraction

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

    Bruh we spent like 5 periods learning binary subtraction and here you are making it clear as the difference between day and night in 5 minutes

  • @frishdaw
    @frishdaw12 жыл бұрын

    Thank you so much for this explanation. My CS 350 course text has a terrible explanation for binary subtraction, and you have really cleared it up. Awesome!

  • @sneakyboii732
    @sneakyboii7329 ай бұрын

    man hearing that type of mic after all these years, it brings me such nostalgia. Thank you for the tutorial

  • @thomasw.eggers4303
    @thomasw.eggers43032 жыл бұрын

    The video is very good. I thought I could add some details for the truly nerdy, and for those who have an interest in how computer hardware does binary arithmetic, particularly subtraction. If you are new to binary, I suggest you skip this posting. There needs to be a way to represent negative numbers. There are three common ways: (1) Sign magnitude (2) One's complement (3) Two's complement; this is by far the most common, and the description follows: All of the explanation will be given assuming 4-bit words. Extending the description to 32 bits (or n bits) is left as an exercise for the reader. (LOL, don't you just hate it when instructors say that?) The 4 bits have the weights: -8, +4, +2, and +1. Note: --- Only the left most bit (the sign bit, the most-significant-bit MSB) has a negative weight; All the other bits have positive weights. --- If you set any bit to a 1 (except for the sign bit), the number becomes more positive (or less negative). --- The zero value is represented by 0000 --- All ones, 1111, has the value -1. (Since -8+4+2+1 = -1). To get the negative of a number (that is, to get -N given N), the rule is "complement all the bits and add 0001". First, define the bit-complement operator ~ to be: "Change each 1 to a 0 and each 0 to a 1". Examples: ~0000 = 1111, and ~1111 = 0000 ~0001 = 1110 ~1010 = 0101 Proof: note that N + ~N = 1111 = -1 Example: 0101 + ~0101 = 0101 + 1010 = 1111 = -1 Rearrange: ~N = -1 - N Rearrange: ~N + 1 = -N Finally: -N = ~N + 1 (QED) Examples using the complement+1 negation rule: +1 = 0001; -1 = ~0001 + 1 = 1110 + 1 = 1111 -1 = 1111; +1 = ~1111 + 1 = 0000 + 1 = 0001 +5 = 0101; -5 = ~0101 + 1 = 1010 + 1 = 1011 -5 = 1011; +5 = ~1011 + 1 = 0100 + 1 = 0101 0 = 0000; -0 = ~0000 + 1 = 1111 + 1 = 0000 (Notice: negating 0000 results in 0000.) And finally, negating twice returns the original number, a requirement. Now any two numbers, positive or negative, can be added or subtracted. To subtract a number, first take its negative (using the complement+1 rule given above) and then add. NO "BORROWING" IS EVER NECESSARY. The subtraction method used by hardware inside a computer CPU is: Change the subtraction problem to an addition problem (by negating the subtrahend using the complement+1 rule), then add, propagating the carries right to left. Note that the longer a computer word is, the more carries need to be propagated. The time to propagate the carries is proportional to the length of the word, O(length), which is slow for long words. There are "carry skipping" methods which reduce the carry time to O(log(length)), but these methods are another topic. Addition and subtraction can cause the integer overflow exception: -- If two positive numbers added result in a negative (MSB=1) sum, overflow has occurred. -- If two negative numbers added result in a positive (MSB=0) sum, overflow has occurred. Adding a positive number to a negative number never results in overflow. The negative of 1000 (= -8) results in 1000 and overflow, since the largest positive number is 0111 = +7. In hardware, it is easy to calculate overflow by looking at the carries into and out of the MSB: Overflow = ExclusiveOR(CarryIntoMSB, CarryOutOfMSB). Note that there is always a "strange" number for any of the three number systems: --- Sign magnitude has the number 1000 = 0000 (-0 = +0) since the MSB is the sign and has no value; there is no +8 or -8. --- One's complement has the number 1111 = 0000. Again, -0 = +0, and there is no +8 or -8. --- Two's complement has the number 1000 = -8, but there is no +8; the largest positive number is 0111 = +7. Two's complement has the "strange" number in the most out-of-the-way place, so it rarely causes a problem. The other two systems have the "strange" number at zero, which causes all-to-frequent, and unexpected, computational difficulties.

  • @jayyzee5708
    @jayyzee57088 жыл бұрын

    I've seen many videos on subtracting binary, and this one was, by far, the most straightforward with less fluff and complexity. thankyou

  • @dillanmistry
    @dillanmistry2 жыл бұрын

    You have a special place in heaven, teachers never taught me this and i just realised how simple it is W

  • @gopalmali8653
    @gopalmali86535 жыл бұрын

    Wow, you taught me it in less than a minute which I was trying to crack since an hour. Hats off to you sir.

  • @sunjaykumarsingh7908
    @sunjaykumarsingh79084 жыл бұрын

    I always had confusion in binary subtraction😓 But after watching this video I can easily do binary calculation 🤓 You are good teacher! Thx for sharing quality content🔥🔥

  • @dillanmistry

    @dillanmistry

    2 жыл бұрын

    EXACTLY I FEEL YOU TOO

  • @jaideepwarrier9092
    @jaideepwarrier90924 жыл бұрын

    "Cut off one head, and two more shall take it's place."

  • @sumitupadhayay2270

    @sumitupadhayay2270

    4 жыл бұрын

    In decimal 10 will take Its place haha

  • @MichaelOfRohan
    @MichaelOfRohan4 ай бұрын

    this is the most windows-xp-on-a-toughbook thing ive seen in a while. thanks for the upload!!

  • @user-gy5hl5pg2r
    @user-gy5hl5pg2r9 ай бұрын

    after 12 years ur video is saving lifes

  • @user-tp4mj8rl2f

    @user-tp4mj8rl2f

    9 ай бұрын

    حقيقي ❤

  • @Bhaktisanatan101
    @Bhaktisanatan1012 ай бұрын

    My teacher spend a freaking 2hrs to teach this and never got it but you taught in 5mins clearly😊😂😂😂

  • @lordenglish2654
    @lordenglish26544 жыл бұрын

    You, sir, are a gentleman and a scholar. Thank you very much.

  • @TheGugunea
    @TheGugunea2 жыл бұрын

    Currently on track of learning Kotlin, making a small project about Steganography and Cryptography, your tutorial helped me understand this topic, THANK YOU!

  • @BangMaster96
    @BangMaster965 жыл бұрын

    My Assembly Language professor spent an entire lecture going over Binary addition, and subtraction, yet he failed to explain it. And here you are, making it clear as sky in 5 minutes.

  • @faiziqbal4722

    @faiziqbal4722

    2 жыл бұрын

    the sky is kind of cloudy for me right now tho

  • @dillanmistry
    @dillanmistry2 жыл бұрын

    SIR, you YOU, just taught me perfectly 2 days before the exam and i was so lost on this, you legend

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

    thank you for this! you actually taught about the case in which you have to borrow from the next columns which my professor seemed to avoid. so easy thank you for explaining

  • @cengizhan.caglayan
    @cengizhan.caglayan3 жыл бұрын

    10 years later you save my ass, sir

  • @joytalukdar5838
    @joytalukdar58383 жыл бұрын

    Searched for hours but couldn’t understand finally got here.

  • @krishnashakya2858
    @krishnashakya28587 жыл бұрын

    this is what i call clarification!

  • @xpresslotodo460

    @xpresslotodo460

    2 жыл бұрын

    not really, sound is kinda lackin

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

    Even after my teachers and friends showed me multiple times how to do this I still couldn't solve one equation correctly but this video made me understand in just 1 second. Love this video!❤❤

  • @Ma_Mobin
    @Ma_Mobin8 ай бұрын

    I used your tutorial now and it was awesome and I completely understand it.Thanks a lot.

  • @mahbuburrahmanshanto7905
    @mahbuburrahmanshanto79058 жыл бұрын

    finally got it.......... your explanation was straight to the point.THANK YOU :)

  • @duytruong5012
    @duytruong501210 ай бұрын

    Aug 25 2023, you're still a genius!!!

  • @mohammadrohail8905
    @mohammadrohail89058 жыл бұрын

    Probably the best one out there. Understood it clearly!

  • @nooralnasser4588
    @nooralnasser45882 жыл бұрын

    You made it so easy to understand, thank you🦋💕

  • @apoorvgusain6573
    @apoorvgusain65736 жыл бұрын

    I love it, the way u explained borrowing i was struggling for 2yrs u made it easy and simple to understand thank you

  • @Shibshankar_Roy
    @Shibshankar_Roy5 ай бұрын

    Ok the quality of the video might be bad but he really explained this thing beautifully..

  • @lionelmuskwe
    @lionelmuskwe2 жыл бұрын

    I just want to say thank you so much. This video is gold. Well done

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

    And 12 years later still useful thanks man

  • @EmilWelton
    @EmilWelton3 жыл бұрын

    DUDE. You're the man. My prof made this so much more complicated

  • @jyslakay
    @jyslakay12 жыл бұрын

    THANK YOU SO MUCH. Saved me for my exam tomorrow. My lecturer didn't explain the borrowing concept of "two 1s" properly.

  • @magpinytech4648
    @magpinytech46482 жыл бұрын

    Brief and to the point! Thank you very much

  • @Linkfyre
    @Linkfyre5 ай бұрын

    I didn't understand this when reading my text book for my CSIS110 Course, but this made the process infinitely clear.

  • @dhananjayjhala
    @dhananjayjhala6 жыл бұрын

    TYSM finally after so many classes in my college and still nothing,, one video and bam! i know binary subtraction! yay.. thnx

  • @eeennnoooccc1
    @eeennnoooccc18 жыл бұрын

    FINALLY understood it...great explanation!

  • @albertcarrete
    @albertcarrete10 жыл бұрын

    Thank you! Clear and straightforward presentation.

  • @johnbennett834
    @johnbennett8346 жыл бұрын

    thanks for the short, simple, and informative video.

  • @amarachiamaechi-odunsi4794
    @amarachiamaechi-odunsi47943 жыл бұрын

    Thanks for this. You made it so easy to understand.

  • @otakuriser
    @otakuriser6 жыл бұрын

    I haven't gotten this for months and I have exams but I got it in 5 mins from you!

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

    Bro just helped me in my computer science homework, thanks

  • @ollinixtli
    @ollinixtli2 жыл бұрын

    Thank you so much watched and watched videos and everything made it over complicated. This was simple and effective!

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

    I've been stressed about this the whole weekend😂 and you've made me get it in 3 minutes haha😅.....video from 9yrs ago🤦‍♀️😅

  • @jacobparrott973
    @jacobparrott9738 жыл бұрын

    great video, binary subtraction finally makes sense

  • @yasser28000
    @yasser280003 ай бұрын

    he posted this when i was 7 who knew he would help me 13 years later

  • @gumball1872354345
    @gumball18723543452 жыл бұрын

    holy shit my professor dragged on for about an hour about this and it was so confusing, now I understand after 3 minutes thank you so much

  • @theomanarin7667
    @theomanarin76672 жыл бұрын

    Your explanation is so simple i love it thank you

  • @uzmaazhar5099
    @uzmaazhar50996 жыл бұрын

    Best explanation of borrowing in binary subtraction I got frm this video 👌

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

    A big thanks from Brazil. Helped me a lot!!

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

    This video is an absolute blessing THANK YOU

  • @AminaAmina-yn5uc
    @AminaAmina-yn5uc8 жыл бұрын

    finally .. an explanation that really helped. thanks !!

  • @luckytemitope2551
    @luckytemitope25513 жыл бұрын

    10years later. Anyone?

  • @wailokcheung6808
    @wailokcheung68086 жыл бұрын

    Thank you sir! Finally, I discover a very concise video telling me how to borrow! Good job :):):)

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

    Thank you for writing to the two 1s to borrow! This is the only way that makes sense to me and I had to look again for your video and the explanation. :)

  • @relladiege9413
    @relladiege94133 жыл бұрын

    Wow. First time to have understood this. Thanks very much

  • @milanpegu9682
    @milanpegu96822 жыл бұрын

    Best of all video I have watched thank you so much 🙏

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

    Best vedio ever for binary subtraction, thank you ❤❤

  • @55ban
    @55ban9 ай бұрын

    Still works in 2023 Thanks❤

  • @khaledacmilan
    @khaledacmilan11 жыл бұрын

    This video is the best one explaining subtraction of binary. Thank you very much. :)

  • @YashSharma-qo1sy
    @YashSharma-qo1sy2 жыл бұрын

    This was the best one to get this-thanks a lotttttt

  • @ilaine.
    @ilaine.5 жыл бұрын

    Thank you so much!! This will really help me for my exam tomorrow.

  • @Leonhart407
    @Leonhart40712 жыл бұрын

    Wow, thanks for this! Your explanation was easy to understand.

  • @skyeuy3766
    @skyeuy37667 жыл бұрын

    oh this made me understand so much about "borrowing" thanks

  • @amrapalidasgupta1543
    @amrapalidasgupta15437 жыл бұрын

    this is the best video on binary subtraction....!!!!! no doubt at all....

  • @lankeswardas6787
    @lankeswardas67876 ай бұрын

    Was really helpful..better thn my CS professor thank you

  • @parastooghazanfari4471
    @parastooghazanfari44719 ай бұрын

    I reallllly needed this Thank youuuuu

  • @RayhanRafid-gg5sz
    @RayhanRafid-gg5sz9 күн бұрын

    watching this on 2024 july. Thanks man. you are a Legend!

  • @shujamukhtar4563
    @shujamukhtar45635 ай бұрын

    Thank you. Finally, can solve the tricky ones.

  • @Arwym
    @Arwym7 жыл бұрын

    Best method for me so far. Thank you!

  • @marlondemoya4270

    @marlondemoya4270

    3 жыл бұрын

    kzread.info/dash/bejne/pZ1_lciicrm1fKw.html

  • @syedzuhairhaider9371
    @syedzuhairhaider93712 жыл бұрын

    Amazing. So simple. Amazingly taught. Thankyou for that.

  • @puneetsohi
    @puneetsohi10 жыл бұрын

    Thank you very much, simple and effective video!

  • @Inti72600
    @Inti726002 жыл бұрын

    Thank you for the tutorial, very good explanation in 5 minutes !

  • @Gladiator1911
    @Gladiator19112 жыл бұрын

    man, look how cool and nostalgic this is: win 7 xp with a good teacher... can't get any better.

  • @hirenjetani2852
    @hirenjetani28523 жыл бұрын

    Really good explanation sir. Your video viewer from Canada

  • @bwalya38
    @bwalya3811 ай бұрын

    Without thinking I have mastered this thank u

  • @BL-ec3nq
    @BL-ec3nq2 жыл бұрын

    Gosh, this is better than the lecture I had. Understood it in just less than 5min as compared to the near 30min ver I had in my course =.=

  • @user-ds5kv7bu5j
    @user-ds5kv7bu5j3 жыл бұрын

    Such a good explanation. Also , i love the mic quality.

  • @tyraelhermosa
    @tyraelhermosa4 жыл бұрын

    Thank you. Straight to the f-ing point. Nice job.

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

    Thank you!! Explained and understood in 3 minutes!!

  • @sh0ejin
    @sh0ejin6 жыл бұрын

    Thank you sir . helped me a lot . Awesome teacher. keep it up 👍🏻👍🏻

  • @Naruto_X-op.
    @Naruto_X-op.2 ай бұрын

    My tuition and c school teachers took 4 f**king hours to taught it but i dont understand it but you, you taught be in only five minutes and i understand clearly And is anyone in 2024

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

    Wow, finding this video in 2023 and learning smth, love it

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

    This 5 minute video saved tonnes of my time!!

  • @killaburribo
    @killaburribo2 жыл бұрын

    thank you, you explained this so much better than my professor

  • @AeolusMN
    @AeolusMN11 жыл бұрын

    Excellent explanation, alot more clear and concise than my book...or teacher.

  • @yasser28000

    @yasser28000

    3 ай бұрын

    how is your life right now

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

    12 years passed and still thank you

  • @Quranserenity786
    @Quranserenity7869 жыл бұрын

    thank you sir i am giving five star from Afghanistan

  • @itssrm870
    @itssrm8703 ай бұрын

    Thanks dude....for the uploading this video in the era of windows xp

Келесі