Q. What is the procedure of Binary Subtraction?
The Rules of Binary subtraction
- 0 - 0 = 0
- 0 - 1 = 1, and borrow 1 from the next more significant bit
- 1 - 0 = 1
- 1-1=0
For illustration,
a) 00100101 - 00010001 = 00010100 0 borrows
0 0 1 10 0 1 0 1 = 37(base 10)
- 0 0 0 1 0 0 0 1 = 17(base 10)
--------------------------------------------------------------------------------
0 0 0 1 0 1 0 0 = 20(base 10)
b) 00110011 - 00010110 = 00011101 0 10 1 borrows
0 0 1 1 0 10 1 1 = 51(base 10)
- 0 0 0 1 0 1 1 0 = 22(base 10)
--------------------------------------------------------------------------------
0 0 0 1 1 1 0 1 = 29(base 10)