Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

subtracting two binary numbers...

Status
Not open for further replies.
what is the best way of 'subtracting any two values in binary forms - using borrowing method' - without using 2's complement...

Regards,

Simran
 
what is the best way of 'subtracting any two values in binary forms - using borrowing method' - without using 2's complement...

Regards,

Simran

Perhaps you would like to give some example problems. If a negative number is already in twos comlement form, then how are you going to not deal with twos complement?

Ratch
 
You subtract them the same way you would in base 10. Start in the right column with 0-1 and borrow 2 from column two.

Like this,
Sub.png
.

Mike.
 
Last edited:
i'm unable to find the answer... if anybody can help... (subtracting in binary form)...

100100100 - 000011011 = ?

i'm getting answer as : 100000001 which when verified comes wrong... (using borrowing method)...
 
thanks and sorry to everyone who tried to make me understand... but i still didnt got....

well, everything is OK. ... anyhow...

,
sum-png.114403


Simran
 
Last edited:
wow... my first thought was subtraction could be accomplished by XOR.... nope.... it's been too long since i've done any binary math in that much detail (outside of the occasional subnet mask math).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top