- deathnote00Straw Hat Pirate
- Posts : 34
Points : 101700
Coins : 3864
Join date : 2013-04-29
Warning Level :
Programming Tutorial: How to Subtract Binary Numbers
Thu May 02, 2013 8:44 am
Now were done with addition of Binary Number so lets proceed with subtracting binary Numbers so here is it's rule to follow:
0 − 0 = 0
0 − 1 = 1, borrow 1
1 − 0 = 1
1 − 1 = 0
0 − 0 = 0
0 − 1 = 1, borrow 1
1 − 0 = 1
1 − 1 = 0
- Code:
Example:
* * * * (starred columns are borrowed from)
1 1 0 1 1 1 0
− 1 0 1 1 1
----------------
= 1 0 1 0 1 1 1
Permissions in this forum:
You cannot reply to topics in this forum