- #1
mr_coffee
- 1,629
- 1
binary to decimal confusion! signed numbers!
OKay this makes no sense to me...
THe directions say:
The following binary numbers have a sign in the leftmost postion and if negative, are in 2's complement form. Perofrm the indciated airthmeic operations and verify the answers.
So i have:
110001
-010010 = ?
010010 = 18, but since we are subtracting its -18.
1 10001 is in two's compliment form so we have to convert it to its regular magnitude by taking 2's compliment of it.
which is
001110 + 1 = 001111 = 15, but since the sign is a 1 above, its -15;
so we got -15 - 18 = -33
So we know the answer has to be -33; but when u take the 2's compliment of the minuend, u end up with
010010 = 101101 + 1 = 101110;
so now we add that to the top number:
110001
+101110 = 1 011111; we have an overflow of 1, so u delete that and ur left with
011111 = 31! what the heck is going on!
OKay this makes no sense to me...
THe directions say:
The following binary numbers have a sign in the leftmost postion and if negative, are in 2's complement form. Perofrm the indciated airthmeic operations and verify the answers.
So i have:
110001
-010010 = ?
010010 = 18, but since we are subtracting its -18.
1 10001 is in two's compliment form so we have to convert it to its regular magnitude by taking 2's compliment of it.
which is
001110 + 1 = 001111 = 15, but since the sign is a 1 above, its -15;
so we got -15 - 18 = -33
So we know the answer has to be -33; but when u take the 2's compliment of the minuend, u end up with
010010 = 101101 + 1 = 101110;
so now we add that to the top number:
110001
+101110 = 1 011111; we have an overflow of 1, so u delete that and ur left with
011111 = 31! what the heck is going on!