Binary Subtraction using 2's Complement

Digital Electronics: Binary Subtraction using 2's Complement
Contribute: www.nesoacademy.org/donate
Website ► www.nesoacademy.org/
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Pinterest ► / nesoacademy

Пікірлер: 355

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

    You explain things so clearly that my professor can't even make clear in a 3 hour lecture. I was so confused about aspects of digital logic but now I understand after watching some of your videos, thank you so much.

  • @nopecharon

    @nopecharon

    Жыл бұрын

    Fr he does

  • @amjad6361
    @amjad63614 жыл бұрын

    as always Saved my time after hours of researching

  • @tarqabdullah1954

    @tarqabdullah1954

    4 жыл бұрын

    اهلييين سعوديين في كل مكان ماشاءالله

  • @RahulMadhavan
    @RahulMadhavan5 жыл бұрын

    To clarify bit further on what sir mentioned at 05.30, the addition becomes simplified when we assume 5 bit number system (as representing 9 in 2 complement notation needs 5 bits - the 4 bit range is from [-8, +7]) A = 01001 = 9;B = 00100 = 4; Y = A - B = A + (-B) = 01001 + (-00100) = = 01001 + (11100) = [1]00101. In this notation, the overflow bit (in the square bracket) can always be discarded and the sign of the most significant bit shows the sign of the number. 0 means positive and 1 means negative ---- Just as a check, B-A = 00100 - 01001 = 00100 + (-01001) = 00100 + (10111) = 11011 = -(00101) = -5 ---- (i) Check minimum number of bits required (ii) Convert everything into 2s complement notation in those number of bits (iii) Add -------- In this way, overflow only happens when MSB of the two numbers added is the same, and they are of opposite sign to the MSB of the result obtained.

  • @alinasrollahzadeh7610
    @alinasrollahzadeh76108 ай бұрын

    OH MY GOD, ARE YOU PROFESSOR YOU? YOU EXPLAINED THIS THING IN 30 SECONDS WHILE I CAN'T EVEN LEARN IN 3 MONTHS IN LECTURE CLASS I THOUGHT I'M STUPID

  • @animesan3687

    @animesan3687

    5 ай бұрын

    Me too😌

  • @Factprovider25

    @Factprovider25

    2 ай бұрын

    My book has given the link of this video

  • @animesan3687

    @animesan3687

    2 ай бұрын

    @@Factprovider25 wch book?

  • @Factprovider25

    @Factprovider25

    2 ай бұрын

    Computer for you with AI

  • @charangowda4586
    @charangowda45862 жыл бұрын

    thank you, very concise and to the point.

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

    Thank you so much! Amazing lecture!

  • @Alexander-zc2ju
    @Alexander-zc2ju7 жыл бұрын

    Thanks for the great videos. Very informative.

  • @amirghorban2044
    @amirghorban20443 жыл бұрын

    for 3rd problem i think --> (+15) in 5-bit = 01111 so now (10110) -(01111) = 00111 in simple binary substraction means(A-(+B)) and with methoad two means (A+(-B)) you should sum 10110 with (-15) so (10110)+(10001) = 00111 so with two methoad +7 in 5-bit is 00111

  • @ONLY_GAMER2.0

    @ONLY_GAMER2.0

    Күн бұрын

    Yes 👍🏻 right same ans

  • @user-iq2hs7sy5x
    @user-iq2hs7sy5x4 ай бұрын

    i was so confused about the subtraction using 2s complement but your video was so excellent that now i able to solve properly.You explain much better than my teacher,Thank You:)

  • @arp1001
    @arp10013 ай бұрын

    thanks a lot for this ... everyone had complicated this so much... but u really helped me to clear my concepts.... it helped a lot for my exam...

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

    Really an amazing way of explanation

  • @JenilSoni-qj7yx
    @JenilSoni-qj7yx2 жыл бұрын

    thanks for providing knowledge to teachers

  • @anushapoojary4709
    @anushapoojary47092 жыл бұрын

    Tq sir for this video I understood clearly your explanation is very good tq so much👍

  • @MrAlbashiri
    @MrAlbashiri7 жыл бұрын

    thank you very much for the amazing video. you are the best

  • @sayandip2
    @sayandip22 жыл бұрын

    Really amazing u r sir I nearly completed everything for my digital electronics from your lectures sir Thank u sir

  • @diyadey1654

    @diyadey1654

    2 жыл бұрын

    Can you say the answer of the question given below? -8-4=-12. I cannot perform this substraction by using binary 2's compliment Using the method which sir told.... Kindly if you can pls solve it

  • @VictoryVidya
    @VictoryVidya4 жыл бұрын

    Thank you sir helping me this subject

  • @uniqueversalunicorn2412
    @uniqueversalunicorn24126 жыл бұрын

    Thank you dude

  • @suheladesilva2933
    @suheladesilva29332 жыл бұрын

    Thank you so much.

  • @dharmikmistry8781
    @dharmikmistry87815 жыл бұрын

    Thank you 😊 sir

  • @aadhiyanth5969
    @aadhiyanth59698 ай бұрын

    thank you neso

  • @amitanand948
    @amitanand9483 жыл бұрын

    3rd problem You can't represent 1111 (15) in 2's complement just by 4 bits. So, make it 01111 --> 1's complement --> 10000 --> 2's complement --> 10001 Now, A + (-B) = 10110(22) + 10001(-15) = 100111 --> MSB discarded for the same logic --> 00111 (7)

  • @anshuldhok3407

    @anshuldhok3407

    3 жыл бұрын

    Thanks bro

  • @theb4stguy332

    @theb4stguy332

    3 жыл бұрын

    Why do we convert 1111 to 01111 at start?

  • @fatimatuzahra8945

    @fatimatuzahra8945

    3 жыл бұрын

    @@theb4stguy332 because A is a 5 bit number and B is a 4 bit number, therefore to convert B into a 5 bit number, we add up the zero to the extreme left

  • @theb4stguy332

    @theb4stguy332

    3 жыл бұрын

    @@fatimatuzahra8945 👍

  • @LakshyaGaming_mcoc

    @LakshyaGaming_mcoc

    3 жыл бұрын

    No this method is wrong you have to take direct 2's compliment or else you would get stuck in 2nd problem where also (1110) is 14 so according to your approach (0111) -(1110) taking 2's of 14 will be 10001 Then adding you will get 11001 which is +ve 9 which is wrong ❌ As 0111(7) -1110(14) = -7 not +9

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

    Thank you sir

  • @aakankshanidhi4989
    @aakankshanidhi49893 жыл бұрын

    1) 0010 +ve in true form 2)1001 -ve in 2's complement form 3)00111 +ve in true form

  • @nishantpandey5435

    @nishantpandey5435

    3 жыл бұрын

    In 2nd question the final ans is 0111 right?

  • @snehilgupta6201

    @snehilgupta6201

    3 жыл бұрын

    @@nishantpandey5435 no it's 1001 only!

  • @nishantpandey5435

    @nishantpandey5435

    3 жыл бұрын

    @@snehilgupta6201 ok i got it....brother...🤟🤟🤟

  • @anushamm7403

    @anushamm7403

    3 жыл бұрын

    @@snehilgupta6201 How? I got 0111

  • @anushamm7403

    @anushamm7403

    3 жыл бұрын

    @@snehilgupta6201 How? I got 0111

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

    thank you very much

  • @myonlynick
    @myonlynick6 жыл бұрын

    9:30, a practical example? x'y'z + xyz'

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

    Always the one stop solution 👍

  • @rikhilkulal122
    @rikhilkulal1222 жыл бұрын

    I had a doubt with another channel video but u cleared it thank you kal Mera exam hai🙃

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

    summary of process is: 1) do 2's complement on the 2nd number. 2) then add 1st number and 2's complement of 2nd number 3) if the result's sign bit is 1, then the result is positive. Ignore the sign bit, we get our answer If the result's sign bit is 0, then the result is negative. Ignore the sign bit, do 2's complement on remaining part. then, we get our answer

  • @trishaseal7782

    @trishaseal7782

    11 ай бұрын

    thanks!

  • @ArnavVerma-oy4dc

    @ArnavVerma-oy4dc

    9 ай бұрын

    no we don't do 2's complement in second case, thats just to check our answer

  • @MK2EA
    @MK2EA8 жыл бұрын

    Saved my ass for the exam thanks! You may have an accent but you explain very well with good a good structure!

  • @anonymous-404

    @anonymous-404

    4 жыл бұрын

    MK2EA if you're really concerned with his accent, I believe you have seen a strong accent. His speech is very clear for a non native speaker

  • @laundrybasketmemes
    @laundrybasketmemes7 жыл бұрын

    nice video it really helped me out

  • @santhipriyapriya9828
    @santhipriyapriya98282 жыл бұрын

    Thank you...

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

    Thank You SIr

  • @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.

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

    Thank youu so much

  • @olaayman1900
    @olaayman19003 жыл бұрын

    thank you

  • @siddharthashome3890
    @siddharthashome38903 жыл бұрын

    When we get -5(right) in last qs. Then why are we doing 2s' complement again to get +5(that is wrong)?

  • @sanjeevanibhandari5652
    @sanjeevanibhandari56524 жыл бұрын

    1. 0010 2. -0111 3. 0111

  • @spmsheikh8192

    @spmsheikh8192

    2 жыл бұрын

    mrs 3rd one is wrong

  • @cyberdyers
    @cyberdyers6 жыл бұрын

    when you use 2's comp. Expect an overflow.

  • @kalef1234
    @kalef12347 жыл бұрын

    so for example 2, I got the same answer when I subtracted 1 and THEN took the 1's compliment of the result. Is this okay to do or did it just work out in this example? Thanks

  • @Quenchedfooty
    @Quenchedfooty3 жыл бұрын

    You are a savior

  • @mukulmalviya1605
    @mukulmalviya16054 жыл бұрын

    sir you can use shortcut method for finding 2s complement

  • @oviya.n1317
    @oviya.n13173 жыл бұрын

    U said the carry leads to overflow but u add a 4 bit number which doest fall into that range. Sir actually we are dealing with signed numbers so 1001 is a negtive number so we should not guess the number directly and take 2's complement . So 1001 is -7 and 1100 is -4 and subtrating them we will get -3 101 or 1101 right?

  • @bubunmazumder
    @bubunmazumder7 жыл бұрын

    1.0010 2.0111 3.01001

  • @snehashishbanerjee2575

    @snehashishbanerjee2575

    3 жыл бұрын

    My last ans is coming out to be (00111)₂

  • @JakVah
    @JakVah6 жыл бұрын

    Im pretty sure Ex2 is wrong. Using the 2's complement representation, 0110 in binary is equivalent to +6 in decimal, while 1011 in binary is equivalent to -5. So in deicmal number system, the task is to perform the following subtraction: +6 -(-5) = 11.

  • @serendipitous5497

    @serendipitous5497

    5 жыл бұрын

    Task is performed as6+(2's comp(5))=-11

  • @hemasaini3380
    @hemasaini33803 жыл бұрын

    I'm starting ❤️ with you now 😁

  • @ANAGHAMGOPIMBTEC
    @ANAGHAMGOPIMBTEC3 жыл бұрын

    Will overflow happen if I'm adding (100)10 and (-46)10 ?

  • @amrmohamed6207
    @amrmohamed62075 жыл бұрын

    so if i want to get the negative of a number should i only do the 1's comp and thats it or add 1 :3 im a little bit confusesd

  • @thomasw.eggers4303

    @thomasw.eggers4303

    2 жыл бұрын

    My suggestion is to forget about one's complement arithmetic. Yes, it is sometimes used, but two's complement is FAR more common. To get the two's complement of a number, change all the 1's to 0's, change all the 0's to 1's, and then add 1. You must always add the 1. This works for both positive and negative integers.

  • @uknown9633
    @uknown96332 жыл бұрын

    Is binary subtraction valid for only same bit number or even can I subtract different bit number??

  • @akimchili7103
    @akimchili71038 жыл бұрын

    i) 0010 ii) 1001 and (1001)2= -7 iii) 0111

  • @ayushpattnaik3977

    @ayushpattnaik3977

    3 жыл бұрын

    Last one should be in 5bit

  • @AmanGupta-fe8jk

    @AmanGupta-fe8jk

    3 жыл бұрын

    3.10111

  • @komalkumari-mu2qu

    @komalkumari-mu2qu

    3 жыл бұрын

    3) 00111

  • @prizmik
    @prizmik7 жыл бұрын

    8-bit 2s complement binary numbers: 121 - 67 ? Is it overflow? It seems I got an answer 11111111 with discarding 11 .Did you have to ignore any carry bits?

  • @angelbuffer6115
    @angelbuffer61152 жыл бұрын

    What if u have been given 8 bit binary numbers to add using twos complement how do u neglect final carry?

  • @Eng-Ara_2023
    @Eng-Ara_20236 ай бұрын

    is the final answer when there is no overflow after taking 2's comp or withtout taking 2's comp ?

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

    thanks

  • @ARMWRESTLIN273
    @ARMWRESTLIN2734 ай бұрын

    Fillnaly ❤❤❤❤ thanks sir I searched whole day

  • @Yourdelusionalgirl
    @Yourdelusionalgirl4 ай бұрын

    so in the second example do i express my answer in 2's complement form or live it as it is??

  • @chandanaapriya
    @chandanaapriya3 жыл бұрын

    If carry is 1 out put should be negative right

  • @vikasprajapati6582
    @vikasprajapati65823 жыл бұрын

    how we can solve 3rd question sir, result will come 5 bit or in 4bit

  • @BenardOnchieku-ny5qc
    @BenardOnchieku-ny5qc Жыл бұрын

    Using 2's complement (0110)2 -(0100)2 =0010 and (0111)2 -(1110) =1001

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

    I don’t understand that for the sign bit of 1 is positive and 0 is negative. To my mind, it’s should be the opposite. Would anyone help clarify this situation please???

  • @abcd-pt5jg
    @abcd-pt5jg7 ай бұрын

    Sir, in previous (last) video you have said that 1's complement was negative form of number but in this you were saying that 2's complement was negative form of a number.... So which one is correct....

  • @AnasKhan-pj5pk
    @AnasKhan-pj5pk6 жыл бұрын

    Hello Sir! i have a doubt in example no. 2 where you got the answer without a carry and again you are performing 2's complement. why is that?

  • @akashchakrabarti9639

    @akashchakrabarti9639

    6 жыл бұрын

    Anas Khan The result which was obtained was negative and in its 2's complement form. So, to know the magnitude of the result (in this case +5), you have to perform the 2's complement of it(here -5).

  • @harshitanand3798
    @harshitanand37986 жыл бұрын

    Pls explain 3rd question

  • @tahmeenafirdous5626
    @tahmeenafirdous56266 жыл бұрын

    @3:00 sir how come is the result positive if the carry is 1? .. That has to be negative then no? Please explain

  • @vedasiva695

    @vedasiva695

    3 жыл бұрын

    this is exclusive for two's compliment method. Not taken in general .

  • @aqilahfedurailahi9496
    @aqilahfedurailahi94962 жыл бұрын

    Sir I have a question, if A - B = A + (-B). Then what about A + B ? is it the same like the A -B formula ?

  • @SrcasmMy2ndLang-IsMyXid

    @SrcasmMy2ndLang-IsMyXid

    Жыл бұрын

    A - (-B)=A + B

  • @wubethiopia982
    @wubethiopia9822 жыл бұрын

    0 sign bit indicates a positive number and 1 indicates negative

  • @the_colors_
    @the_colors_3 жыл бұрын

    1. 0010 2. 1001 3. 00111

  • @_ChetnaPatidar_
    @_ChetnaPatidar_3 жыл бұрын

    If we have 5 and 4 bit no. How we know carry is generated or not.

  • @Statusking-vp6xw
    @Statusking-vp6xw Жыл бұрын

    1. 1 0010(+2) 2. 0 0111(-7) 3. 1 00111(+7)

  • @UtkarshRana9999
    @UtkarshRana99993 жыл бұрын

    What about Binary subtraction using 2s complement which have fractional part too?

  • @thomasw.eggers4303

    @thomasw.eggers4303

    2 жыл бұрын

    Getting into binary fractions is way beyond the scope of the video.

  • @akarshsaxena7810
    @akarshsaxena78106 жыл бұрын

    sir aapne last video m kha tha 1's comp. of A is -A and now in this video 2's comp. of A is -A......but 1's and 2's comp. of 6 is not equal explain......

  • @vikashchandra6262

    @vikashchandra6262

    3 жыл бұрын

    Same doubt... How is it possible?

  • @ujwaltamrakar284
    @ujwaltamrakar2847 жыл бұрын

    Can u please tell me how to do minuend change??

  • @shashi882
    @shashi8823 жыл бұрын

    What about - 1-2. There is a carry generated yet it isva negative number

  • @achrafelmahjour8673
    @achrafelmahjour86733 жыл бұрын

    please , what is the minimum number of bits to represent 0 in 1's complement and 2's complement

  • @m0st4fabideer14

    @m0st4fabideer14

    3 жыл бұрын

    I believe 1 bit, the result would be 0 or 1 for 1's complement, and 0 for 2's complement.

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

    What about decimal binary numbers?

  • @user-bw1hp7ic2f
    @user-bw1hp7ic2f3 ай бұрын

    sir you said with binary number like 1011, etc. But how to do with numbers like (1011.10)2 - (110.10)2 ??

  • @bhargava730
    @bhargava7302 жыл бұрын

    Sir what can we do if we have sum is like this (110010)2-(123)10

  • @rohitnade5097
    @rohitnade50977 жыл бұрын

    how the second answer is solved plz explain in detail sir

  • @Honeyypaaji
    @Honeyypaaji21 күн бұрын

    if 1's compliment means negative of a number then how can 2's compliment also be negative of the number ?? please explain.

  • @bbswe497
    @bbswe4978 жыл бұрын

    why 1001(2) goes 9? isn't it -7 because the left most digit is 1?

  • @KHANSAKHAN_SEMEA

    @KHANSAKHAN_SEMEA

    8 жыл бұрын

    if it is in the 2s complement form only then it is -7

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

    How (-B) becomes 0101 in the 2nd problem. If the MSB is 0 then how it becomes negative number. Kindly explain.

  • @taciturn1992
    @taciturn19927 жыл бұрын

    is 2's complement only used in subtraction

  • @thomasw.eggers4303

    @thomasw.eggers4303

    2 жыл бұрын

    Two's complement numbers are the most common way computers implement integer arithmetic. They are used for addition AND subtraction (and multiplication and division) of both positive and negative integers.

  • @sreepaada5842
    @sreepaada58423 жыл бұрын

    1) 0010 2)1001 3)0111

  • @harshitha6160
    @harshitha61606 жыл бұрын

    1) 0010 2) 1001(2's complement of 7) 3) 00111

  • @gauravkumar-ff8gu

    @gauravkumar-ff8gu

    4 жыл бұрын

    2nd answer in incorrect take 2's complement of 1001 because the sign bit is 0(5th bit)

  • @achchhelalgupta3176

    @achchhelalgupta3176

    4 жыл бұрын

    0111 + 0010 (2's complement of 1110) --------------------- 1001 ( now as there is no carry the result have to be converted in 2's complement form) ---------------------- hence the 2's complement of 1001 will be +7 i.e 0111. for 3rd question could you explain me ...

  • @sandeepkumar7357

    @sandeepkumar7357

    4 жыл бұрын

    @@achchhelalgupta3176 for 3rd ques answer is 00111 B is 01111 2's of B will be 10001 10110 +10001 ------------ 100111(final carry is one ) so neglect 1 answer will 00111

  • @amankarn3025

    @amankarn3025

    2 жыл бұрын

    Its only 1001 or 10010

  • @shikharashish7616

    @shikharashish7616

    Жыл бұрын

    @@sandeepkumar7357 thank you , i was confused in 3rd question as i didn't add extra 0 for B at the MSB

  • @charchechiragke
    @charchechiragke4 ай бұрын

    Hw: 1) 2 2) -7 3) 7

  • @ayusisinha6835
    @ayusisinha68356 жыл бұрын

    how do we solve (-7)-9 using 2's complement method

  • @mounimounika2506

    @mounimounika2506

    5 жыл бұрын

    Yessss..I to have a doubt

  • @adamamaral5949
    @adamamaral59497 жыл бұрын

    1) 0010 (utilizes overflow discard) 2) 1001 (-7 because 2s comp = 0111 +7) 3) 0111 (utilizes overflow discard)

  • @adamamaral5949

    @adamamaral5949

    7 жыл бұрын

    S M yeah I was always confused with questions like this one. if u left it as -7 or put it back to +7?? I just looked at the original question. 7 - 14 = -7, hence why I left it in its 2s complement form (1001)

  • @utkarshshukla231

    @utkarshshukla231

    4 жыл бұрын

    Are you sure for 3) ?? 😬

  • @neunzehnvierundachtzig

    @neunzehnvierundachtzig

    Жыл бұрын

    3) and 2) is switched

  • @gojosatoru2005

    @gojosatoru2005

    Жыл бұрын

    ​@Anirudh I don't think so I have the same answer too

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

    1) 0010 2) 1001 3) 10111

  • @pratimamodi607
    @pratimamodi6077 жыл бұрын

    how u calculated d range of 2 comp

  • @AmanGupta-fe8jk

    @AmanGupta-fe8jk

    3 жыл бұрын

    It's easy Since we have 4 variable so number of combination is 2^4.its from range -8 to 7 .if we consider both positive and negative respectively.

  • @jjww2788
    @jjww27884 жыл бұрын

    Sir, I am still confused with overflow. Based on your condition for overflow, the example 1 will be indicated no overflow, since x'y'z+xyz'=1'0'0+100'=010+101=0 no overflow, but in your first example, you said it was overflow. Are we supposed to consider the discarded "1" as the sign of result? even though, the discarded "1" is considered as the sign bit of result, it will be like this: 1'0'1+101'=011+100=0+0=0. it is still 0, which is no overflow in terms of your condition for overflow.

  • @gauravav1635

    @gauravav1635

    4 жыл бұрын

    It's actually, x-sign bit of A y- sign bit of (-B)

  • @clemaloy6269
    @clemaloy62692 жыл бұрын

    How to subtract larger number from Smaller number

  • @tonmoydeka7319
    @tonmoydeka73193 жыл бұрын

    i needed an example . 10010.01-111000.00 by 2's complement

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

    what's about (-42) - (-13) ??

  • @Cybernetic1
    @Cybernetic15 жыл бұрын

    Sir when I substracted -48-23 (-48)+(-23)=-71 11010000 is 2's com.. of 48 11101001 is 2's complement of 23 Adding both we get 1 10111001 so we got carry 1 and is case of overflow and I neglected 1 the answer should be 10111001 which is not equivalent to -71 You said we need to take 2's complement of result when we don't get carry. If we get carry we simply ignore it and that is the answer but here even after neglecting Carry we don't get the answer please help sir I request you

  • @preranadash9640

    @preranadash9640

    4 жыл бұрын

    Did you get the answer from any other source plz reply

  • @diyadey1654

    @diyadey1654

    2 жыл бұрын

    I am having same type of doubt ... Like -8-4 =-12. On performing 2's complement I am getting a carry and if I ignore the carry the ans which I am getting is not the correct ans... So pls if you both get the solution of this problem then pls give a reply

  • @intothefilms
    @intothefilms3 жыл бұрын

    At 5:42 you are mistaken, If the sign bit is “0”, this means the number is positive in value. If the sign bit is “1”, then the number is negative in value.

  • @MATHSBYSURENDRATHAKAN

    @MATHSBYSURENDRATHAKAN

    3 жыл бұрын

    yes correct man.

  • @mihirvaghela2185

    @mihirvaghela2185

    3 жыл бұрын

    No that is the rule of 2s complement addition.. they're correct

  • @cartoondekho0011
    @cartoondekho00113 жыл бұрын

    1. 0010 2. 0111 3. 00111

  • @abhijitgupta7207
    @abhijitgupta72076 жыл бұрын

    How to do -2-6...the answer I get is 1000 with carry 1 . But 1 carry signifies + ...but the answer is -

  • @preranadash9640

    @preranadash9640

    4 жыл бұрын

    Did you got the answer from any other source please help me

  • @alfredhercules
    @alfredhercules3 жыл бұрын

    1. 1110 2. 0111 3. 01001

  • @bindumadhavi6029
    @bindumadhavi60295 жыл бұрын

    Can anyone please explain me the third homework problem clearly!

  • @aakash-codes

    @aakash-codes

    3 жыл бұрын

    As in third example they are 4 bit digits we have to neglect an extra bit to get final answer.

  • @aanchalvyas3480
    @aanchalvyas34802 жыл бұрын

    1. 0010 2. 1001=-7 .. to Check find it's 2's =0111=7

  • @vaibhavmishra4811
    @vaibhavmishra48113 жыл бұрын

    Dear Neso Academy, i dont understand what is need of subtraction via 2's comp. when we can subtraction via 1's comp.. pls have a look on my querry

  • @nidhikunwar17

    @nidhikunwar17

    3 жыл бұрын

    Because of 'end around carry'.

  • @makara2711

    @makara2711

    3 жыл бұрын

    Neso said that it's easier to subtract using two's rather than one's