Computer Subtraction: Can Computers Subtract?

  • Thread starter Thread starter skywolf
  • Start date Start date
  • Tags Tags
    Computer
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 8K views
skywolf
Messages
81
Reaction score
0
why can't a computer subtract, or can it, and its just easier to do it by adding?
 
Engineering news on Phys.org
In the mathematical point of view, adding or subtracting are the same operation, i.e,

A - B = A + (-B)

That is a reason why computer science concern about signed and unsigned numbers. :smile:
 
Its not that it is any more difficult to subtract in binary than to add --- just simply the fact that we don't need to build two sets of circuits, when one set can do both functions by simply using complement operation. By the way, the same can be done with decimal numbers, its just not quite as easy as with binary.

KM