Binary Addition and Subtraction With Negative Numbers, 2's Complements & Signed Magnitude

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • This video tutorial explains how to perform binary addition and subtraction with negative numbers. It also explains how to express numbers in binary form using two methods - the 2's complement and the signed magnitude method.
    Binary to Decimal:
    • How To Convert Binary ...
    Binary to Decimal With Excel:
    • Binary to Decimal Usin...
    Decimal to Binary:
    • How To Convert Decimal...
    Decimal to Hexadecimal:
    • How To Convert Decimal...
    Binary to Hexadecimal:
    • How To Convert Binary ...
    _________________________________
    Decimal to Octal:
    • Decimal to Octal Conve...
    Octal to Binary:
    • Octal to Binary Conver...
    Octal to Hexadecimal:
    • Octal to Hexadecimal C...
    Decimal to BCD:
    • Decimal to BCD
    ASCII Code to Binary:
    • ASCII Code and Binary
    ____________________________________
    Binary to Gray Code:
    • How To Convert Gray Co...
    How To Add and Subtract Binary Numbers:
    • How To Add and Subtrac...
    Binary Addition - Negative Numbers:
    • Binary Addition and Su...
    Intro to Number Systems:
    • Number Systems Introdu...
    Number System Conversions With Excel:
    • Number System Conversi...
    _________________________________________
    Final Exams and Video Playlists:
    www.video-tuto...
    Full-Length Videos and Worksheets:
    / collections

Комментарии • 760

  • @TheOrganicChemistryTutor
    @TheOrganicChemistryTutor  9 месяцев назад +16

    Final Exams and Video Playlists: www.video-tutor.net/
    Full-Length Videos & Worksheets: www.patreon.com/MathScienceTutor/collections

    • @femijames3389
      @femijames3389 7 месяцев назад +1

      Please can anyone give the reason why he use 5bit for the -7 in the sign magnitude😢🙏🏼.
      I don't get that aspect.

    • @sylviabryan3164
      @sylviabryan3164 4 месяца назад

      The question may ask for that​@@femijames3389

    • @Imperator_27
      @Imperator_27 2 месяца назад

      ​@@femijames3389 Because he wanted to keep the same number of bits also for -12 and -15 in the demonstration. So he chose 5 bit and not 4 bit

  • @GamerTheTurtle
    @GamerTheTurtle 4 года назад +1360

    How do you know literally every subject but I forget basic calculus after Christmas break

    • @flimflam6652
      @flimflam6652 4 года назад +81

      Doing the pre-research before making a video and an inherently good memory would likely do it

    • @DearHRS
      @DearHRS 4 года назад +22

      there you go now you have (1000000)2 numbers of likes :(11)2

    • @brandonhughes645
      @brandonhughes645 4 года назад +18

      Years of intense study after high school does the job. And revision before the video.

    • @jean-marcndongekouaga5267
      @jean-marcndongekouaga5267 4 года назад +18

      interest is probably the answer

    • @MDMD007
      @MDMD007 4 года назад +7

      tutor for a reason

  • @Nic-of1sr
    @Nic-of1sr 4 года назад +59

    I absolutely adore you! You are a grade saver. You have helped me understand so many subjects/concepts. Thank you! I hope you continue to add videos to your channel.

    • @femijames3389
      @femijames3389 7 месяцев назад

      Please can anyone give the reason why he use 5bit for the -7 in the sign magnitude😢🙏🏼.
      I don't get that aspect.

  • @jackmizzi1943
    @jackmizzi1943 3 года назад

    Thanks a lot!

  • @littlebuster07
    @littlebuster07 4 года назад +1030

    You are God's gift to students with professors who either don't speak good english and/or they don't teach the subject this well. I feel like my time in class is a waste of time and you are my real teacher. Bless you, brother

    • @bobross3880
      @bobross3880 2 года назад +16

      Unfair comparison. It’s a thought out, planned video. Giving lectures in real time when people have questions and/or don’t get it and can’t pause to think is nothing like a video.

    • @littlebuster07
      @littlebuster07 2 года назад +41

      @@bobross3880 🧢

    • @gingee_8186
      @gingee_8186 2 года назад +7

      My college teacher is just an arse (hard r) so I don’t ask him any questions and go online to learn.

    • @masonp1599
      @masonp1599 2 года назад +1

      Ditto

    • @scared3267
      @scared3267 2 года назад +2

      @@gingee_8186 same here 🤐🤐

  • @user-du9zt5rp5x
    @user-du9zt5rp5x 2 года назад +23

    Last year I studied organic chemistry from you, 1 week ago I studied physics from you, yesterday I studied math from you and now this. How do you know every subject?

  • @latedeveloper7836
    @latedeveloper7836 3 года назад +763

    0:30 Worked example 1 - Writing -6 as a number using the signed magnitude method (4 bit binary)
    1:55 Worked example 2 - Writing -7, -12, -15 using the signed magnitude method (5 bit binary)
    2:43 Converting +7 in binary to -7
    6:00 Expressing negative numbers using the 2's complement method
    7:25 How to check your negative binary calculations in 2's complement
    7:48 Worked example 3: -12 as a binary 2's complement number
    9:50 Binary subtraction 2 ways - subtraction and 2's complement
    12:05 2's Complement Subtraction
    12:55 Changing +25 into -25 using the 2's complement method
    15:30 What to do with a carry over / overflow number
    16:34 Worked example 4: Subtracting 2 binary numbers
    18:45 What to do when you can't borrow
    19:52 Subtracting with the 2's Complement Method (by adding!)

  • @keivanipchihagh2115
    @keivanipchihagh2115 3 года назад +359

    This is the equivalent to the 3-hour lecture my professor gave. Great Job!

    • @foreverseethe
      @foreverseethe 2 года назад +11

      You gotta be doing something wrong bro. Lectures, professors and 3 hours sounds like money. Money in the wind.

    • @DarcMagikian
      @DarcMagikian 2 года назад +28

      @@foreverseethe Unfortunately learning from RUclips doesn't get you a degree. So even if that money is in the wind, it is necessary to get a degree.

    • @egyptianplanner
      @egyptianplanner 2 года назад

      The same without understanding alas ..untill I find this video

    • @ethanholmes5677
      @ethanholmes5677 2 года назад +1

      Same for me. 2 hours condensed into a half hour. Watched at 2x speed, it becomes 15 minutes.

    • @kithenry
      @kithenry 11 месяцев назад

      Keivan my boy, i taught and you said you understood.

  • @rimjhimsingh703
    @rimjhimsingh703 3 года назад +10

    How do you know 6 is 4 bit and 7 is 5 bit ? Like how do you decide which number to replace in signed magnitude method?

  • @learntoearn6612
    @learntoearn6612 4 года назад +56

    Please sir make for us a Fourier series video
    You're our teacher

    • @MTMT_HITHESHNAIK
      @MTMT_HITHESHNAIK 3 года назад

      and also laplace transform and its inverse. please

  • @brendanbuckley13
    @brendanbuckley13 4 года назад +174

    This was explained wayyyy better than how my professor did. Thank you so much lol

    • @AMF884
      @AMF884 3 года назад +2

      i was thinking the same thing , those so called Pro.Dr. they tryna make my Life harder than what it already is !!!

    • @User-ow7rn
      @User-ow7rn 3 года назад

      really? if you understand very well then help me with this.
      ////
      i did not understand what you wanna prove. at 3:26 you said -ve of +ve number can be done just by replacing leftmost 0 as 1 but at 13:35,you are saying that leftmost value of 1 as -64 and calculating other 1s as resmebling bits in positive, but if we apply that rule at 3:26 for -7 (1 0 1 1 1) then we will be -16+4+2+1=-9 instead of -7

    • @ahmedraza4410
      @ahmedraza4410 2 года назад

      @@User-ow7rn SHHHHHHHHHHHH

    • @eccrow7419
      @eccrow7419 2 года назад +3

      @@User-ow7rn its been 11month but im still going to reply it anyway. These two that you stated are different thing. Binary at 3:26 is signed magnitude whereas binary at 13:35 is 2's complement.

    • @adithyadavidm
      @adithyadavidm 11 месяцев назад

      ​@@eccrow7419glad you responded...that's right both are different representation

  • @learntoearn6612
    @learntoearn6612 4 года назад +112

    I persuaded a lot of my colleagues whenever you search RUclips for any video and find a video from channel named *_ORGANIC CHEMISTRY TUTOR_* watch that video first I always recommend that now since then I passed calculus 1, calculus 2 and now three and hoping to pass through him *_ORGANIC CHEMISTRY TUTOR_*
    Please we will always comments on your videos but you won our hearts sir am student where professors are teaching in Arabic but who saved me this young man of this channel
    *_Jah bless 🙏🙏🙏🙏🙏_*

  • @mariaanica8412
    @mariaanica8412 4 года назад +28

    HAPPY WORLD TEACHER'S DAY ! ❤️

  • @ABCDEF-mq2tl
    @ABCDEF-mq2tl 10 месяцев назад +5

    YOU ARE LITERALLY CARRYING ME THROUGH UNIVERSITY 😂

    • @orjisophia
      @orjisophia 3 месяца назад

      Like I'm sorry glad I found this channel on time😂

  • @pixiedust9860
    @pixiedust9860 3 года назад +7

    Pls replace my computer science teacher 😭

  • @Chainless_Slave7
    @Chainless_Slave7 2 года назад +47

    If you need to convert a binary number to its two’s complement form, you can use the
    method indicated by the video but there is a quicker method. For this you start at the
    least significant bit and move left ignoring any zeros up to the first 1, which you also ignore.
    Change any remaining bits from 0 to 1 or from 1 to 0.
    For example, expressing the number 10100100 in two’s complement form leaves the right-hand 100 unchanged, then the remaining 10100 changes to 01011, so the result is 01011100.
    ------------------------------
    Edit:
    For negative numbers,
    Convert the positive version of the number to 2's complement and then, just add a "1" to the right of the most significant bit.
    Just adding 1 converts a two's complement to negative. DONE!
    Example:
    2's complement of 12 ----> 0100
    2"s complement of -12 -----> 10100
    See there is an extra 1 at the right end.
    -------------------------------------------
    Extra note:
    While 2's complement of 12 is 0100, it can be written as 0000000000100, u can have many 0s at the right end
    But for 2's complement of -12 is 10100, you cannot write it as 0010100, u gotta write it like 1111110100.
    See what I did there?
    1 is the default right end of negative binary numbers,
    0 is the default right end of positive binary numbers
    ( talking in terms of two's complement)

    • @andreamazzai1969
      @andreamazzai1969 Год назад +5

      Thank you, great trick

    • @aadityapradhan5694
      @aadityapradhan5694 10 месяцев назад +1

      I might me wrong but this trick may not always work, like for example -12
      12 in binary 1100
      using the trick it would be 0100 but the actual 2's complement would be 10100 which would be the result using this trick if you write 12 as 01100.

    • @Chainless_Slave7
      @Chainless_Slave7 9 месяцев назад +1

      @@aadityapradhan5694 Well, same process for negative numbers but you add a 1 to the right end of two's complement of 12. Thanks, I have now added this step for negative numbers to my original comment

  • @ianobi2842
    @ianobi2842 4 года назад +14

    thanks to u, i did great improve at the night right before the final exam. love u so much.

  • @mikatch8067
    @mikatch8067 3 года назад +11

    I have been subscribing u since 2016, and I’ve always wondered how you’re able to master all of the triple sciences and the basic ict/cs knowledge. It’s amazing.

  • @swisscatva9175
    @swisscatva9175 3 года назад +3

    Why did we have to use a 5 bit system when we can use a 4 bit system, when you expressed negative 6, the most significant bit had a zeor in it (0110) so we can just add 1 in the beginning(1110) to be negative 6, it should be the same when dealing with a 7 right? Since its(0111) we can just add a 1 in the most significant bit which represents the sign to be (1111)...and that should be a negative 7. Right?

    • @GhostSamaritan
      @GhostSamaritan 3 года назад

      Makes sense to me.

    • @KABKAKIy_KAPATEJI_DOP
      @KABKAKIy_KAPATEJI_DOP 7 месяцев назад

      because, he also wanted to use (-12) . Tell me , how you would put or represented by converting the decimal signed integer (12) in binary numbering system in a 4-Bit Pattern(Memory-Block Size)?

  • @sukesukieatmyheart
    @sukesukieatmyheart 4 года назад +12

    I really appreciate your teaching, cause it helps me go through every subject that I don't understand. And thank you very much for teach me.

  • @ninminion
    @ninminion 4 года назад +17

    As always, you have a great way of breaking the concept down and explaining it so that it just seems like common sense. I recommend you to everyone I meet. You are my go-to guy for everything math, science, or logic related. Great job... again!!!

  • @hreigi14
    @hreigi14 2 года назад +4

    The OG! Chemistry tutor carried me through my bio degree now he's carrying through my EE degree as well :') Thank you

  • @belalkasem4140
    @belalkasem4140 3 года назад +5

    Take my heart,man
    You are great! ❤️
    Your audiences from Egypt ❤️🇪🇬

  • @smoshfann24
    @smoshfann24 3 года назад +9

    A helpful tip for finding the 2's compliment: flipping all of the bits and then adding 1 is the same as starting from the rightmost 1 and flipping all the bits higher than that.

  • @thepixelgamer3d913
    @thepixelgamer3d913 Год назад +1

    9:11 video, Theres a shorter way we can do it, like consider the last digit of the 5th bit as "-16" and then just do regular algerba, i.e -16+4= -12 , SO set "16"and "4" as "1" and the rest "0" since we didnt use others. IN BINARY it will be 10100 . TRY THIS!

  • @diyamed9715
    @diyamed9715 4 года назад +6

    Hi! Could you talk about the mantissa and the exponent please?
    Thanks:)

  • @TSanya98
    @TSanya98 2 года назад +3

    I solved a past paper question using your method of calculation it’s 3:46 am and I do pray I ace my exams thank you so so much

  • @realknight9562
    @realknight9562 3 года назад +6

    I love this channel. I don't know how you've been able to help me calc 1-2 ( I think you're still adding calc 3 stuff), and physics, and biology, and now even my CS class!

  • @ThatGuy0275
    @ThatGuy0275 3 года назад +1

    Do we always have to calculate 2's complement in 8 bit ? Somebody please answer 🙏

  • @brahimdeiaa6564
    @brahimdeiaa6564 2 года назад +1

    19:15 why did you skip calculating the last digit? or why didn't you further explain why did not so

  • @shishirthapa4167
    @shishirthapa4167 2 года назад +1

    thanks for your good explanation..well done keep it up bro god bless you

  • @Bdbdjdidnbwk
    @Bdbdjdidnbwk 5 месяцев назад +1

    10:28 - why if we borrow, the previous number is becoming 1, 1 or 2 instead of 1 ?

  • @taekwondotime
    @taekwondotime 2 года назад

    @5:50 *You made a mistake* . Looks like I'm the only one who caught it. 11110 in sign-magnitude format = -14. The first bit is just the sign bit, not part of the number.

  • @AmahGivenz
    @AmahGivenz 4 месяца назад +2

    This video has transformed my understanding in just 25 minutes. Thanks alot😊

  • @imahopeime509
    @imahopeime509 4 года назад +7

    This tutor should be inducted into the hall of fame

  • @aribakhalil3195
    @aribakhalil3195 15 дней назад +1

    this dude explained in 20 mins what my prof couldn't in 2 hours

  • @mohammadahnafhuq9364
    @mohammadahnafhuq9364 2 года назад +5

    Nice Job! You made two's complement way easier than the way my teacher taught me :)

  • @Chero10
    @Chero10 2 года назад +3

    is it possible to represent the -7 using a 4-bit or it has to be 5-bit?

  • @ninwetayonan9214
    @ninwetayonan9214 3 года назад +1

    Why are we using 4 bit to (-6) and 5 bit to - 7, - 12 and - 15??

  • @dilanmadawa1356
    @dilanmadawa1356 Год назад +1

    thank you sir.really well explained😍😍👍👍👍

  • @gtg8289
    @gtg8289 4 года назад +6

    The Example you have used for -6 in binary is wrong, you have assumed the first number in binary 1110 is a (-1) however the value is actually -8 thus the real answer would be 1010= -8 +0+2+0=-6 in decimal value.

  • @landonscott4347
    @landonscott4347 4 года назад +7

    Thank you so much for this got an exam in 2 days. This made revising so much easier for me

  • @imankhalili7629
    @imankhalili7629 2 года назад +1

    can someone please explain why in 6:00 the result is 30 and not -14 ?

  • @iambored.k.
    @iambored.k. 4 года назад +28

    I absolutely love this channel! It's so informative and the way you teach is so relaxing. Amazing work! Please never stop making videos!

  • @rupeshingle1187
    @rupeshingle1187 3 года назад +1

    If we want to perform (-7)+(-2) the answer should be (-9). But if writing in binary form, 2's complement of -7= 1001 & 2's complement of -2= 1110 and now if we add them we get 0111 and a carry. As you said carry has to be discarded, if we discard carry we get 0111 which shows a positive number with magnitude 7!!.
    Edited: I got the answer, it is due to concept of overflow. I will still keep the question here so that it may help someone with same doubt. Cleared my above doubt from video: ruclips.net/video/o-WXqnagg0c/видео.html Time: 17:00 onwards

    • @JD-gw9rl
      @JD-gw9rl 2 года назад

      Thank you for this! I have the same question and has been looking for an answer ♥️

  • @charpad6690
    @charpad6690 2 года назад +2

    Thank you for the info at 9:38; I could not understand how to do -7 +(-5) in 2s compliment until you showed that you just do the sign bit (-16) + all the ones.

  • @setademardomimelbourne7192
    @setademardomimelbourne7192 4 года назад +2

    Hello would you pls write in my comments below the correct answer? thanks!
    1. how many different numbers can be represented with 5 bits?
    2. what is the largest decimal number that can be represented with 10 bits?

  • @mehmetnadi8930
    @mehmetnadi8930 3 года назад +1

    Why -7 isn’t written as 1111, but written as 10111? Why did we do it with 5 bit?
    Also later in the video, he says -7 is 1001. How come?lol I’m like confused as hell

    • @nevis2769
      @nevis2769 3 года назад

      There's more than one way of representing each negative number. Stop thinking in terms of only one solution like in base 10.

  • @tedduck800
    @tedduck800 2 года назад +1

    At 5:50, shouldn't the answer be minus 14? Because the signed bit is a one?
    The result is wrong anyway, but I was just wondering what happened to the signed bit..
    Good video!

  • @CristianHerrera-yz7np
    @CristianHerrera-yz7np 2 года назад +2

    It seems to me that when subtracting signed integers the straightforward method is much less time consuming. Is there any ever point to subtracting using the twos complement method other than preference?

  • @varshithkemmasaram2115
    @varshithkemmasaram2115 4 года назад +4

    Please please please teach C language Please SIR

  • @mariamacamaraderie2613
    @mariamacamaraderie2613 7 месяцев назад +1

    its crazy how we all have to run to his channel right after our professors confuse us in class.

  • @zehidaidowu6015
    @zehidaidowu6015 Год назад +1

    why did he use 5 bits for -7? is'nt is supposed to be 4 bits?

  • @imaaaan
    @imaaaan 3 года назад +2

    Thank you so much. My teacher didn't explain everything clearly like you did and I was so confused but you saved me 😪

  • @addyHacker
    @addyHacker 2 месяца назад +2

    Nah dude, -6 is 1010 in binary not 1110😕😑

  • @XJacksonvilleX
    @XJacksonvilleX Год назад +2

    so for a computer, -6 is 14?!?

    • @africanamerican1754
      @africanamerican1754 5 месяцев назад

      nah more like 6 but with an extra redundant bit exclusively used for sign checking

  • @sandratawfek9576
    @sandratawfek9576 2 года назад +1

    Thanks very much. That was very helpful.
    I have a question though. In 02.00 How can I determine which binary system I am going to use. I didn't get the point.
    I mean, why in (-6) he uses (4 bit binary system) and in (-7, -12, -15) he uses (5 bit binary system). How can I determine which binary system should I use??
    Thanks in advance.

  • @cordelldev
    @cordelldev 3 года назад +5

    Thank you once again, you explained this subject more clearly than my CS professor!

  • @learningenglish5131
    @learningenglish5131 Год назад +1

    I'm new in this topic so I'd like to ask, how can we differentiate between a binary number and it 2's complement form? I mean, if I'm dealing with this number: 1010 1001, how do I know if it's a 169 or a -87?

    • @Mc.Gucket
      @Mc.Gucket 8 месяцев назад +1

      It was also what i wanted to ask. Did u find the answer?

    • @SoozaV
      @SoozaV 8 месяцев назад

      @@Mc.Gucket sorry, not yet, but I just asked chat-gpt:
      "Without additional context, the interpretation of the leftmost bit (sign bit) can vary. In most cases, when working with integers represented in binary, the leftmost bit is often used as the sign bit in the two's complement format.
      However, in certain contexts or applications, it might be interpreted differently. Without additional information, here are some assumptions you could make:
      • If you assume it's two's complement:
      - If the leftmost bit is 0, then the number is positive, and you can convert it directly to decimal.
      - If the leftmost bit is 1, then the number is negative. You need to find the two's complement of the rest of the bits (excluding the sign bit) to get the decimal value.
      • If you assume it's an unsigned number:
      - Simply convert the binary number to decimal. In this case, 10101001 would be 169 in decimal.
      • If you have no information about the format:
      There's no definitive way to determine if the number is positive or negative without additional information.
      In summary, without additional context or a specific convention, the interpretation of the leftmost bit can vary, and you may assume different formats depending on your needs or the system you are working with.
      I hope it helps.

  • @ranati2000
    @ranati2000 4 года назад +1

    Sir I have a question.
    I had an exam in DLD subject. There was a question as "Design a circuit which can take 2’s compliment of any 3 bit number". The truth table we get is :
    A| B| C|
    0| 0| 0|
    0| 0| 1|
    0| 1| 0|
    0| 1| 1|
    1| 0| 0|
    1| 0| 1|
    1| 1| 0|
    1| 1| 1|
    Whereas when we find 2s complement as
    000
    111
    +1
    ----
    1000
    But I have watched many videos where they have ignored 1 and wrote the answer in 3 bits as
    A|B|C
    0|0|0
    Iam much confusing why they ignored 1 and what is the problem if we put 1 rather than ignoring

    • @gouthamtadali5072
      @gouthamtadali5072 4 года назад +1

      I may know something;
      for representing signed, 1's or 2's numbers, the MSB is always belongs to sign bit.
      Consider +6 and -6 in a 5 bit register (16 8 4 2 1)
      +6 is represented as 00110.
      here the MSB(16's place) is 0.
      for representing negative numbers, we have to choose either 1's or 2's form.
      consider 2's form in this example;
      2's of +6(00110) is 11010.
      here the MSB(16's place) is 1.
      so, as per representing signed, 1's, 2's numbers when MSB is 0, it is positive number.
      when MSB is 1, it is negative number.
      so, we may or may not consider MSB.
      I hope this may cleared your doubt.

    • @ranati2000
      @ranati2000 4 года назад +1

      @@gouthamtadali5072 Thankyou verymuch brother. Ok so, basically you are saying that when we have 1 in msb in any 2s compliment then we can ignore it if we want to. So in my above question we can also write trith tablr in 4 bits ? As 1000

    • @gouthamtadali5072
      @gouthamtadali5072 4 года назад +1

      @@ranati2000 i was saying in your case all the outputs are 3 bit...so ignore the sign bit from the result(2's complement) you got.
      for 000 case, 2's complement is 1000.
      it is negative zero. doesnot make sense right? since, zero, positive zero, negative zero all are same.
      so, in 000 case, we can ignore 1 from result we got.
      for remainig case, you will get exactly 3 bit output.

    • @ranati2000
      @ranati2000 4 года назад

      @@gouthamtadali5072 hmm. Sorry, I got a bit confused. Um.. ok so basically we can ignore 1 where as 1 is msb and is negative signed iam i right ?. Secondly i didnt get when you said we got negative zero

  • @justinvillarosa667
    @justinvillarosa667 8 дней назад +1

    Why does 2's need to be introduced?

  • @yassirtx8412
    @yassirtx8412 2 года назад +1

    Why use 4 bit to solve -6 and 5 bits for -7

  • @atlasprime6193
    @atlasprime6193 4 года назад +2

    I tried 2's complement with 1 - 11 = -10. Step-by-step, the result was 11110110. I tested it out through convector calculator and it was correct: 11110110 = -10.
    However, when I tested out on paper, I get -66 instead.
    -128 + 32 + 16 + 8 + 4 + 2 = -66
    EDIT: Never mind, I forgot the 64.
    What am I missing here?

    • @tashrifmahmudraiyan4119
      @tashrifmahmudraiyan4119 9 месяцев назад

      If you do 2's complement of 11, you get 10101, which is equal to -11 in decimal.
      Then we add 1 +10101 = 10110
      And it is equal to -10 in decimal.

  • @BOMBON187
    @BOMBON187 Год назад

    Can someone explain the question below, I dont know what to do with the last 1 since it becomes a 0. Where else can I borrow from?
    100000
    - 110110
    ----------------

  • @mathilda247
    @mathilda247 11 месяцев назад

    Bizim hocadan iyi anlatıyor, iyi ki bölüm ingilzce de bu tarz içeriklerden faydalanabiliyorum.

  • @remziyyeagazade7832
    @remziyyeagazade7832 3 года назад +1

    Super explanation,thanks a lot. but i have a tricky question.How does computer know the shown number is not positive (it is negative)??Because we only use 0 and 1 both of them.

  • @CarlC9898
    @CarlC9898 4 года назад +12

    Awesome video, very helpful! I'm studying these concepts over my winter break because I have to take a class next semester that starts with this material!

  • @anythingbeyondlimit8398
    @anythingbeyondlimit8398 2 года назад +1

    I have a confusion: when we were showing -6 we with 4 bits we say that the left most is the positive or negative sign. so -6 is 1110. but in summation/subtraction we interpret that as -8 + 4 + 2 + 0.

  • @saadaziz6316
    @saadaziz6316 4 года назад +3

    why do we use 4 bit binary at the start and 5 at the second question, you gotta explain that too

    • @Ari-jm6xx
      @Ari-jm6xx 4 года назад

      Yeah, I don't get that either.

    • @Merazz
      @Merazz 4 года назад

      @@Ari-jm6xx he does explain it. its because u dont want a 1 in front of it , u always want the first value to be 0 to indicate its positive, hence u will go to the next bit system

    • @theo9743
      @theo9743 3 года назад +1

      In order to store a higher range of numbers, -12 cannot be stored in 4 bit binary as the lowest number you can get is -8

  • @khonzaizzati4836
    @khonzaizzati4836 4 года назад +2

    oh my, thank u so much this truly help me a lot. it was crystal clear and super easy to understand, I couldn't be more grateful

  • @حسامالديناحمدجمعهعبدالسميع

    Thank You! Keep Going, learnt a lot ....................studying at Computer science faculty.

  • @МАТИМУЛ
    @МАТИМУЛ 4 года назад +1

    Dude, i'm french and i speak better french than english, you explain better than a french teacher lol :')

  • @tinashelionelchenyika5612
    @tinashelionelchenyika5612 2 года назад +1

    Thank you so much kind sir l have never got a chance to understand this concept until today. May God bless you with more knowledge

  • @ahinsanipuni
    @ahinsanipuni 4 года назад +1

    Thank you so much 😘😘😘😘

  • @tharindadivakara2881
    @tharindadivakara2881 3 года назад +5

    6:04 - Two's complement. ( අනිත් පැත්ත ගැහුවා, 1ක් එකතු කළා : ඉන් සොයන අගයෙහි ඍණ අගය ලැබේ. )
    7:41 - 2nd example for Two's complement

  • @Trotters79
    @Trotters79 7 месяцев назад

    @4:12 - 6:02
    With signed magnitude, wouldn't the answer after adding 7 to -7 actually become -14 instead of 30, as the answer is still signed?
    What you basically did was add 7 to 23, and that truly is 30.

  • @annaroliak22
    @annaroliak22 Год назад

    at 5:59 why +7 + (-7) is 30 ? Why you talk about result as UNSIGNED number, although operation were with SIGNED. So the correct answer should be -14, because the highest bit is considered as a sign. Going with the logic if we used signed numbers then result should be a signed number too.

  • @jarodl3554
    @jarodl3554 2 года назад

    Wouldn't the negative numbers still have positive counterparts? Like 10111 was -7, but that's also 23 in binary?

  • @DanielLarios-j7r
    @DanielLarios-j7r Год назад

    wouldn't the two's complement of 6 be 1010 and not 1110? Our Professor had said to copy the 0's from right to left until we reach a 1. Them complement the rest. Therefore, is 6 is 0110 then our answer would've been 1010 (aka: -6) and not 1110. Am I missing something?

  • @ayeshafirdose946
    @ayeshafirdose946 4 года назад +2

    Plz can u add (23)10 and(15)10 using binary additions

  • @JASONNI-bj3tw
    @JASONNI-bj3tw 6 месяцев назад +1

    3:01, wouldn't 1 0 1 1 1 also be 23?

  • @shantahalder9061
    @shantahalder9061 3 года назад +1

    The moment when you are here talking stuffs about your Professor and your Professor also is here tryin hard to get hold of things..

  • @mia1535
    @mia1535 11 месяцев назад

    shouldn’t it be 0. something and 1. something? like a point after that first 0 or 1 that determines whether the number is positive or negative. because without the point that number isn’t any different from regular numbers… like 1110 may equal -6 but also +14…

  • @paaulsens6086
    @paaulsens6086 3 года назад

    How can 10100 be both -12 and 20 ?
    If I asked you to write down the number 10100 in Decimal, would you write -12 or 20????

  • @superAnfal8
    @superAnfal8 5 месяцев назад

    6:27 why did you ignor one zero? You said previously +7= 00111. Is this a rule? to ignor all zeros except for one

  • @prajnasuresh2876
    @prajnasuresh2876 3 года назад

    I don't understand why we take value 2 while borrowing from 1 in(subtraction of 2 binary numbers) please help!

  • @User-ow7rn
    @User-ow7rn 3 года назад

    i did not understand what you wanna prove. at 3:26 you said -ve of +ve number can be done just by replacing leftmost 0 as 1 but at 13:35,you are saying that leftmost value of 1 as -64 and calculating other 1s as resmebling bits in positive, but if we apply that rule at 3:26 for -7 (1 0 1 1 1) then we will be -16+4+2+1=-9 instead of -7

  • @patrickdomshack6717
    @patrickdomshack6717 Год назад

    Please I've been trying to do the subtraction of 2's complement using the method you gave but I kept getting confused, the question is this use 2's complement to subtract 001110 from 101110 base 2, please help me out

  • @SakatzuCat
    @SakatzuCat 2 года назад +1

    Oh my god when I understood the 2's complement.. You seriously are a lifesaver, thank you so much!

  • @JosephPachuau
    @JosephPachuau 11 месяцев назад

    Sir, why do we use 2's complement: like take 5, -5 would be +5 flipped and added 1 ie 00000101 -> flipped -> 11111010-> added 1-> 11111011, why is it not 10000101?

  • @frickxnas
    @frickxnas Месяц назад

    Shouldn't the result from addition of 7+(-7) use the sign bit too so instead of 30 getting - 14?

  • @femijames3389
    @femijames3389 7 месяцев назад

    Please can anyone give the reason why he use 5bit for the -7 in the sign magnitude😢🙏🏼.
    I don't get that aspect.

  • @rakhitharc
    @rakhitharc Год назад

    Can anyone help me solve (-20) - (+110) using 2's complement method. Please😭

  • @arnavajitbordavekar5071
    @arnavajitbordavekar5071 Год назад +1

    MAN'S A LIFE SAVER, LOVE FROM MUMBAI

  • @sougatamand
    @sougatamand Год назад

    -6 is 1010, does the binary of numbers changes according to the subject because i am a computer science student and it is giving me 1010 not 1110 , please explain because this is the only viideo where i found someone talking about the negative numbers binary

  • @nerdcraig4696
    @nerdcraig4696 Год назад +1

    Thanks a lot man appreciate it!!

  • @Mike-ci5io
    @Mike-ci5io Год назад

    You can't write 2 so write 0 and carry over 1 ...hmmm that sounds confusing to ppl instead you should say can't write 2 so add 1 0 to the right which is 2 in binary write the 0 and carry over the 1

  • @gwendolinebinya5311
    @gwendolinebinya5311 10 месяцев назад

    from your calculations if (-7) is 10111 how come when i change the binary to decimal i get -9 not -7

  • @xcurrentbreeze6626
    @xcurrentbreeze6626 2 года назад

    6:50 this part confused me so much since I thought 0111 + 1000 + 1 in decimal is 7 + 8 + 1 = 16, 16 in binary is 10000, not 1000
    but I guess he's only adding 1000 + 1 = 1001, I wish he would have put a line or something to make clear he wasn't adding 0111, he was just adding 1000 + 1

  • @derrickwatsala6431
    @derrickwatsala6431 Год назад +4

    Hello, I appreciate so much how helpful your tutorials are. But I have a question regarding this video in particular.
    How do u tell, while using the sign magnitude method to use either a 4 bit or 5 bit to convert -ve number to binary system?