binary subtraction arithmetic!

Thread Starter

Eric007

Joined Aug 5, 2011
1,158
Hello!

Can someone show me how to do this little calculation? I'm a bit confused!

00000 - 10011 = ?
00000 - 00010 = ?
00000 - 00011 = ?

Please show me how you do the borrowing and all that!

Thanks in advance!
 
Last edited:

Thread Starter

Eric007

Joined Aug 5, 2011
1,158
Computers do not do subtraction.
The simplest solution is to form the 2's complement and add.
There must be a good reason why i'm asking this question...
Actually i'm multiplying signed number using 'Booth's Algorithm'

But yeah your " 2's complement and add" method works.
In fact, you perform a 2's complement only on the 'signed' number then you add.

--» 00000 - 00010 = 11110
--» 00000 - 00011 = 11101
--» 00000 - 10011 = 01101


Thanks MrChips!
 
Top