Twos complement: Negative numbers in binary

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 พ.ย. 2024

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

  • @DUANEYAISER
    @DUANEYAISER 8 ปีที่แล้ว +2009

    Please tell me you're a paid instructor, and that you're paid well. You deserve it! This isn't just a TH-cam series, this is a full fledged course Thank you!!

    • @IvanEedle
      @IvanEedle 6 ปีที่แล้ว +81

      He used to be employed by Khan Academy. I'm not sure, maybe still is.

    • @dendritedigital2430
      @dendritedigital2430 5 ปีที่แล้ว +10

      @@IvanEedle monetized youtube? He has 400K subscribers.

    • @anandrajofficial1
      @anandrajofficial1 4 ปีที่แล้ว +1

      th-cam.com/video/pJ-zzHEsXZE/w-d-xo.html
      2's complement shortcut

    • @ReasonMakes
      @ReasonMakes 4 ปีที่แล้ว +13

      @@dendritedigital2430 TH-cam's monetization is a joke; they don't pay creators anywhere near industry standard. Half a *million* views is about $1,000 based on my experience making videos (and according to Social Blade he got $246 at worst, $2,000 at best). To get the avg salary of a Computer Science Professor he would need to do that 114 times a year (10 videos like this every month, excluding how many videos might be flops, excluding weekends, etc.) But that's an impossible expectation. This is his 9th most viewed video of all time. Social Blade estimates his revenue at $296 - $4.7k monthly (probably $2,500). That's minimum wage. I hope I'm wrong and he's getting more than that. I wonder if he has a Patreon?

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

      @@ReasonMakes Patreon, Development Kits, etc...

  • @SJohnTrombley
    @SJohnTrombley 5 ปีที่แล้ว +788

    I probably had two's compliment taught to me half a dozen times in college. I get how it works. The properties are nice. Not once has anyone ever told me "treat the sign bit as a -(2^n) bit." This is a borderline life-changing revelation.

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

      @美遊エーデルフェルト why?

    • @crs-t
      @crs-t 5 ปีที่แล้ว +42

      Some people need to visualize things, which in turn gives deeper understanding of subjects. I found this video while i was searching for a better understanding of 2s compiment and 1000 == -8 was the piece i needed to feel i understand it, because it helped visualize the whole thing. And in turn visualize very basic ALU operations better.

    • @mayukhbera
      @mayukhbera 5 ปีที่แล้ว +4

      SAME HERE

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

      @@crs-t how do we write positive 8 then 😅😅😅

    • @salesv
      @salesv 4 ปีที่แล้ว +17

      @@alonebuthappy33 You use more bits :)
      If you have 4 bits and 1 is for sign, you actually have only 3 bits for numbers, so you can represent at most 0b111 = 7.

  • @livium9184
    @livium9184 7 ปีที่แล้ว +814

    By far the best explanation of two's complement.

    • @oussamaelhriki8160
      @oussamaelhriki8160 4 ปีที่แล้ว +15

      especially the -8 part

    • @NoOne-oz7lc
      @NoOne-oz7lc 3 ปีที่แล้ว

      @@oussamaelhriki8160 true

    • @focus-freaks
      @focus-freaks 3 ปีที่แล้ว

      true

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

      For sure!!

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

      It really is. I'm reading Harris' "Digital Design and Computer Architecture" which covers binary numbers in chapter 1 and although it's a fantastic book, its explanation still falls short of Ben's. Ben really shows the logic behind the pattern for those of us who need it spelled out. Mr. Eater you the man.

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

    the way you first worked with flawed methods and then built your way to show us why adding 1 to the one's complement works better was really amazing . thank you so much

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

      This was buffling me for sometime.Thank you.

  • @mariobrito427
    @mariobrito427 6 ปีที่แล้ว +43

    Been fiddling with bits for 20 years and I don't think i've ever seen this explained as clearly as this. The video is a joy to watch, great work!

  • @razsamy4274
    @razsamy4274 7 ปีที่แล้ว +122

    A great way to explain not just the process of negative binary numbers but actually why two's complement is used.

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

      Exactly!

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

      My random opinion as a random person would be that: considering the fact that 1 is being subtracted from each bits. We end up getting it's negative version. But... Since the représentation is basically 1 less so after everything we have to add back this 1 that we have taken from. But that is not full fledged and doesn't explain the fact that we have taken 1 from each bit. But collectively add 1 and we get to the original result. It's odd fr. 🤷‍♂️

  • @adrianolariu3767
    @adrianolariu3767 7 ปีที่แล้ว +8

    A couple of years ago I had to learn those things for university, and I did, and got a good score, but due to the fact that I'm going to be a SW Developer that programs microcontrollers, I had to re-learn these things and watching this I've realised that I didn't understand the complement method the way I was supposed to. My teacher just told us to add 1 and that's it and now, after 4 years, I have finally understood why. You are awesome. I really hope a lot more students watch your videos.

  • @TF2Gaming101
    @TF2Gaming101 5 ปีที่แล้ว +99

    Oh my gosh the two's compliment is beautiful and I realized this at 12:18 that -8 makes so much sense

    • @Fera-gr5mm
      @Fera-gr5mm 4 ปีที่แล้ว +1

      Especially because you have 4 bits so you can have 16 numbers. Given that 0 has no sign, you have to assign 1 more number to either positive or negative side.

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

      It's not only -8 ;) when you have more bits the most significant bit is always treated as a negative value of the highest bit order. If you really compare the signed representation to 2s complement you'll find that the series just goes in reverse ;). And the extra negative number is there only because there is 1 zero

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

      i didnt understand it until this timestamp thanks lol

  • @tomc642
    @tomc642 6 ปีที่แล้ว +45

    Wow, best explanation ever. You explained it! In school they just say, here is the Two's complement, take it and don't ask why it works.

  • @CastorTroy212
    @CastorTroy212 5 ปีที่แล้ว +39

    This is far better explanation than the paid course at my university. Thank you so much.

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

    most just teach that 2 step process for getting negetive numbers
    but u explained how that 2s complement steps works
    thats really genius
    you are amazing brother

  • @PhoenixClank
    @PhoenixClank 5 ปีที่แล้ว +26

    I see a lot of people with blown minds in the comments, at the fact that the "sign bit" is actually just a negative-valued bit. I'm *so glad* I was taught it like this in university. It just fit right into my head. It made sense from day one.

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

    Been searching articles for more than 30 mins and didn't find any good ones and later found this . Easy and clear explaination . Thanks a lot

  • @akshanshkmr
    @akshanshkmr 5 ปีที่แล้ว +15

    I never understood the need for 2's compliment before this video
    Thank you so much

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

      I have sat through a few bad explanations of what's going on here... probably due to the tutor/lecturer not understanding it themselves.

  • @nicholasantonini6730
    @nicholasantonini6730 4 ปีที่แล้ว +1

    THANK YOU. I have been taught this by 2 instructors at a college. NONE of them simplified this like you did. IT FINALLY CLICKED!!!

  • @RetroHoo
    @RetroHoo 7 ปีที่แล้ว +55

    You are a hero in my book. Amazing how you present these video's, you keep it interesting and the build-up is just right. Keeping it interesting while teaching is important but I always think that making people feel smart while teaching is equally important. In my opinion you nail both.

  • @thepvporg
    @thepvporg 6 ปีที่แล้ว +11

    Nice, you just said something that made sense.
    When I was in computer class in school, we were presented with a lesson on binary and it wasn't explained why these are one's or two's complement, just that is what they were called.

  • @indjev99
    @indjev99 8 ปีที่แล้ว +253

    That moment when you find a great channel, but the last upload is 2 months ago. And then the next day 3 videos go up.

  • @YaroKasear
    @YaroKasear 4 ปีที่แล้ว +26

    Another neat property of two's complement is sign extension.
    In some architectures you'll often find yourself converting a number between sizes. So for example, we have a 4-bit number we want to resize to an 8-bit number.
    1010 = -6
    When we extend the sign, what this means is when we convert to a larger number, every added bit copies the value of the most significant bit from the smaller number.
    11111010 = -6
    This also works on positive numbers:
    0100 = 4
    00000100 = 4
    The only drawback is ou have to make sure your hardware does not keep trying to sign-extend on an unsigned number.
    1000 = 8 (Unsigned)
    11111000 = 248 (Unsigned)
    Fortunately, the same hardware used to drive signed number behavior in twos-complement should be able to also ensure sign extension only kicks in when it's in use.

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

      O:
      my mind has been blown for the second time today

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

    This is by far the clearest explanation on the topic I've ever come across, every digital design book needs to footnote you.

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

    I wanted to teach students how to solve pseudo-code and got stuck in bitwise operators. By far the clearest explanation of two's complement. Thank you, sir. I'll be teaching it exactly as you have done here.

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

    I feel really smart now considering how my own professor refered our class to this video and in this video, you came to the same conclusion as I did when I realized that the negative numbers are just -8 + whichever positive number the remaining 3 bits represent.

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

    I've watched several videos about twos complement and am in a CSCI 101 class where our professor explained it several times. This is the explanation that really landed for me. 10/10 would learn again

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

    i love how you explain everything bit by bit

    • @Shockload
      @Shockload 9 หลายเดือนก่อน +2

      I see what you did there

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

    I remember at the digital logic lab when we had to design a 4-bit ALU that included logic AND, OR, XOR and add and sub, and with a 2-bit select signal we had to choose any one of the operations. As bonus, we had to build any other adder, except from ripple carry, display the result on a seven segment display in two digits and find a way to display the minus sign for negative numbers by using the third seven segment display and the negative numbers as positive ones next to the minus sign. I was the one who managed to do all these three, and I chose to implement a carry look ahead adder

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

    Thank you very much Ben. I read about twos complement several times and didnt understand the logic behind it. You explained it in 10 minutes. I cant explain how much I appreciate your work. Thank you! 🙏

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

    Thank youuuuuu, this has been confusing me about *why* we do it like this, and your -8 (or negative MSB) trick really makes it go from "a nuisance but necessary" to "check out this cool trick".

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

    the realisation that 8's coulumn is actually -8's coulumn has saved me here. Thanks so much.

  • @szyszkienty
    @szyszkienty 5 ปีที่แล้ว +1

    You are definitely one of the best teachers I've ever seen. Your ability to give concise and interesting explanations that are in-depth, yet devoid of jargon and any unnecessary minutiae is truly marvellous! Thanks a lot for your amazing work!

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

    I finally understood why ones complement wasn't good enough and why twos complement was needed. Thank you!!

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

    I have to say, even if it's an older video, the way you teach stuff is a real eye catcher, simple to get and understand.

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

    This is probably the best explanation of twos complement I've heard. My professor completely glossed over the meaning behind adding 1 and it never made sense to me. Thank you.

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

    My class didn't explain this, so I jumped right to youtube, and knew your words would be the winner, wonderful explination, and many thanks!

  • @Luiza-fy2og
    @Luiza-fy2og 2 ปีที่แล้ว

    I've been desperately watching videos on yt trying to understand this but none of them could help me understand it at all. thank you very much for helping me w this.

  • @vikasbhandari257
    @vikasbhandari257 4 ปีที่แล้ว +1

    Sir you are the best. Other teachers just explain the topic but you have tell the logic behind it excellent sir

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

    You are a really good teacher, I studied electronics at college and this was apart of the course and the lecturer was no where near this level of explaining

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

    I was 12 years old with a Timex-Sinclair 1000 which did BASIC and assembly. I had problems understanding the binary math, but assembly was fun. I dabbled with assembly again a few years ago, which really clears up some subtle things about C programming. I still found the complements thing confusing. This video put things together in just the right way, explaining the three ways. It all makes sense now.
    You make very good videos. Thank you.

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

    I've tried to understand two's compliment before with no luck. This is the first time its made sense. Thanks!

  • @willsi
    @willsi 6 ปีที่แล้ว +5

    Wish I had found your videos earlier in the semester. You've been better in a few minutes than my professor all semester. Click comment, but very true.

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

    Just adding my voice to the choir Ben. I'm trying to learn assembly programming for the 6502, and yet again you've done a great job in teaching the fundamentals. Outstanding! Not just this video, but so many of them have been so helpful to me. I'm not as sharp as I used to be in my teens and I'm grateful for the pen and paper approach. I mean, if you can distil this sort of knowledge down to something that can be conveyed on pen and paper, it makes is so much more accessible to so many people. Just look at your video on the stack and stack pointer. Pen and paper! Thankyou for sharing your expertise with us all.

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

    Was watching this to prepare for an interview, and it completely blew my mind, thanks!

  • @RishabhKumar-bn4qj
    @RishabhKumar-bn4qj 5 ปีที่แล้ว +3

    THIS IS THE BEST EXPLANATION EVER ! I LITERALLY LOGGED ON TO COMMENT ON THIS VIDEO.
    KEEP UP THE MIND BLOWING WORK

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

    The best explanation i have ever seen so far on 2's complement.

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

    from this day onward, i will never tell myself im stupid, it's just a matter of what type of teaching and learning apply to me, YOUVE ANSWERED ALL THE QUESTIONS I HAVE IN MIND, THANK U SIIIIIRRRRRRRRRRRRRRRRRRRRR

  • @schoolForAnts
    @schoolForAnts 5 ปีที่แล้ว +1

    Excellent video and just for everyone's' knowledge, in One's Compliment arithmetic, you take your carry-over bit and add it back in on the right side.

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

    My university teacher never explained me like this. Thank you very much sir. This is the best explanation on 2's compliment.

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

    Very nice...generally people explain how to take 1s and 2s complement, but dont explain the science or the logic behind it. Great Work!!

  • @BK-tv4mw
    @BK-tv4mw 4 ปีที่แล้ว

    My electronics engineering/ logic and digital systems design teacher took 2 hours and still couldn't explain what this man explained in 13 minutes in clear details.

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

    Really this is the best video in youtube for understanding 1's and 2's complement. Love from India.

  • @vegetaiv9275
    @vegetaiv9275 20 วันที่ผ่านมา

    The best presentation of negative numbers in binary! Thank you so much!

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

    Thanks for the very clear explanation! I randomly looked for this information while having no background knowledge and you made it understandable to me.

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

    I'd never thought of the high bit in two's complement as meaning -(2^(n-1)) before. That's incredibly useful. Thank you so much!

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

    I am an ICT Instructor. I will provide the same lesson tomorrow in my class. Wonderful teaching method 💜

  • @AlexBlack-xz8hp
    @AlexBlack-xz8hp 2 ปีที่แล้ว

    You’re literally my favorite teacher!!! Learned more about computer fundamentals from this series than years of searching around the internet

  • @julinization
    @julinization 7 ปีที่แล้ว +86

    Where were you when I was in college? Awesome explanation

  • @osscar29
    @osscar29 7 ปีที่แล้ว +3

    Thank you so much for this explanation, I've been struggling with this on the coursera "nand to tetris" course, this is by far the best explanation I can find. cheers.

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

    I've been struggling with this concept for a long time, but your explanation has now made it very clear to me. Thank you.

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

    We went over ones and twos complement in my assembly class and had no idea why. Thanks!

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

    Dear Ben, I did my Electronics degree in 1975 in Bolton UK and the instructor we had was from industry. Meaning? he was just like you...Absolutely brilliant. Thanks Ben you are an inspiration on how to tutor NOT teach !!!. By the way you sound just like my hero Roger McGuinn 😅

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

    9:41 2's complement
    My lecturer sent us this video saying this guy can explain better than me. And indeed you are so much better. My instructor took like 30 min explaining this but youre quick and simple
    So basically flip all the signs and then add 1 and if we get an additional bit in the sub/add then ignore it

  • @stephenesebre7908
    @stephenesebre7908 6 ปีที่แล้ว +1

    I don't know how to say thank you. You made this really simple. Some books and videos were driving me nuts ! God bless you man !

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

    How lucky am I that I landed here on a cursory search of how negative binary numbers work? Liked and subscribed!!

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

    You did a better job at explaining this than the lecturer at my university, thank you.

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

    Incredible teaching! Recommending this to everyone in my computer architecture class and anyone interested!

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

    did university teachers leave so many dislikes because they are jealous how this guy easily explains hard concepts for free ?

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

    This the best video in the aspect of explaining binary numbers in the world!

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

    nice way to show. very clear,
    thank you.
    way1 show negative
    OK: 1
    NG:5+(-5)=2 3:30
    way2 show negative 4:37
    OK : 5+(-5)=0 5:20
    NG : 5+(-3)=1 7:20
    way3 show negative 10:15

  • @DavidCourtney
    @DavidCourtney 8 ปีที่แล้ว +25

    Glad to see this series continuing

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

    Unbelievable how good your explanation is. It makes it look so easy.

  • @RupeshRam-d4t
    @RupeshRam-d4t 6 หลายเดือนก่อน

    Best video so far about the 1s and 2s compliment .I hope my tomorrows exam goes well thanks bud !!

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

    This is by far the best explanation of this concept on the internet. Thank you so much!

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

    Video time: 12:15
    To get the value (decimal numeral) of "looks like a sign bit" immediately, do this calculation: -(2^(n-1))
    Where n is the number of bits you have. For example: If you have 16 bits, the calculation is: -(2^(16-1)) = -32768
    Video time: 12:48
    An easier way to get a negative value from a positive one, is to flip all the numbers starting from "looks like a sign bit" until you get to the last 1, leave it as a 1 (don't flip). The rest of the 0's after the last 1, leave it as a 0 (don't flip).
    3 examples all in eight bits:
    A) 10 is 00001010 , so to get -10 in eight bits is 11110110
    B) 20 is 00010100 , so to get -20 in eight bits is 11101100
    C) 56 is 00111000 , so to get -56 in eight bits is 11001000

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

      This has helped me to implement a binary indexed tree efficiently. Thanks!

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

    Yesterday night I was suffering so much because of this binary calculation,but thanks to you everything is going so well now.
    Hope to see more.

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

    You are the best! I needed to learn exactly this!! I searched found some other video didn't like. When I saw a video recommended in the sidebar from you I didn't even finish the other video. And you did not disappoint! You started exactly with what I understand and then proceeded to show the different ways to encode a negative number! Man soooo good. Thank you so much Ben!

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

    Don't know what should i call it.... May be perfect is a comparative word. Absolutely perfect.

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

    This video and the assembly to c code video might take the crown for most saved computer architecture exams😊

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

    So nicely explained, now I understand the whole story behind two's complement.. this video made my day. thanks a lot !!

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

    One of the best explanations for binary numbers..

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

    WOW. Thank you. This is the most helpful two's complement lesson I've ever seen. I finally understand.

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

    I love that you started with a simple but incorrect version to show the progression of the idea

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

    My God...This video is revolutionary. Where did u learn all of this😮😮😮. This is just fascinating!!!

  • @Nabilo8501
    @Nabilo8501 5 ปีที่แล้ว +1

    man that lecture is super awesome and oversimplified

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

      I couldn't find the next video man :D
      P.s It is!

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

    Thank you so, so much... I was reading my lecture and it was so confusing... Less than 14min later, your video makes everything so much clearer. Thank you

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

    Truely, this is the best video for 2's complement explanation

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

    Your explanation is getting me through my circuits class, well done sir!

  • @-303-
    @-303- 3 ปีที่แล้ว

    This is a fantastic explanation. So clear. This is the best explanation I have seen yet on TH-cam.

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

    I honestly don't understand how and why 1111 can be both negative and positive value, but the explanation here is really straight forward. Thanks for the explanation.

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

    Thank you for these videos. I just started electronical engineering school and don´t always get everything right away, your channel really helps.

  • @bonbonpony
    @bonbonpony 8 ปีที่แล้ว +195

    12:06 Wow! This is the first time I'm seeing someone assigning a (negative) place value to the sign bit, and it makes sense indeed! :o :D And I thought that I won't learn anything new from a two's complement arithmetics video. Silly me... :D

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

    I kid you not, I think it's the best explanation on the internet. Thanks!

  • @jorgehn7
    @jorgehn7 7 ปีที่แล้ว +10

    Ones and twos complement:
    Ones complement, invert all the values.
    Twos complement, invert all values after the FIRST 1.
    e.g.:
    010110111000
    Ones complement:
    101001000111
    Twos complement:
    101001001000

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

      Wow,Amazing this helped me a lot.Thanks

    • @vimalsheoran8040
      @vimalsheoran8040 6 ปีที่แล้ว +7

      Here's a simple on
      One's Complement : Invert all values
      2's Complement : Add 1 to the one's complement

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

    ty, this video of 13 min is what i needed. not multiple 2-hour lectures of nonsense

  • @lemtzas
    @lemtzas 5 ปีที่แล้ว +1

    This is the first time this has ever made sense to me. Thank you.

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

    tomm. is my exam and coming here is a choice that i will never regret! Great work!

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

    The best practical explanation I've seen on the subject. Thank you.

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

    The best teacher! Making the complex simple to understand!

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

    wowwwww......i have been struggling to understand this concept for the past 2 years each time when i had to do this....never occurred to me to youtube this topic.....thankyouuu!!!!

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

    Finally someone that makes sense and explains it properly. Thanks.

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

    This is the best video on this topic that I found on TH-cam. Going to send to my students -- thanks!

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

    No one ever told me about the place value trick. Completely blew me away when you pointed that out 👀