You are not logged in.
Pages: 1
hi. i have a problem with binary subtarction. i am trying to subtract 11010110 - 01000111 showing the difference and borrow as well but i get the wrong answer. can u help me?
1101 0110
-
0100 0111
-----------------------------------
Difference: 10010001
Borrow: 00000001(0)
-------------------------------------
Answer: 010010111
i get this as the answer but its not correct, because if you check this in Calculator (View > Scientific) you get the answer 10001111.
I cant see where i am going wrong. all help is greately appreciated!
Offline
1101 0110
- 0100 0111
========
1000 1111
You need to borrow for the first 5 (rightmost) columns. Hopefully you can understand my notations.
1
1101 0100 You must borrow for the first subtraction which makes the 1 in the 2's
0100 0111 column a 0
=======
1
1
1101 0000 You must borrow for the second subtraction also, making the 1 in the 4's
0100 0111 column a 0
=======
11
1
1100 1000 You must borrow again, this time from the 16's column.
0100 0111
=======
111
1100 1000 Now it's easy with no more borrowing.
0100 0111
=======
1000 1111
Offline
I got 1000 1111, too, so this problem has been solved.
Offline
thanks alot. that definately explained my problem!
Offline
Adding the inverse is typically much easier than subtraction. However, if you've never heard of 2's complement, then you might as well stick to subtraction.
"In the real world, this would be a problem. But in mathematics, we can just define a place where this problem doesn't exist. So we'll go ahead and do that now..."
Offline
Pages: 1