Computer Subtraction: Can Computers Subtract?

  • Thread starter Thread starter skywolf
  • Start date Start date
  • Tags Tags
    Computer
Click For Summary

Discussion Overview

The discussion revolves around whether computers can perform subtraction directly or if they utilize addition through techniques like 2's complement. It explores the mathematical equivalence of addition and subtraction, as well as the implications for computer circuitry.

Discussion Character

  • Technical explanation, Conceptual clarification, Debate/contested

Main Points Raised

  • One participant questions the ability of computers to subtract, suggesting it might be easier to perform subtraction through addition.
  • Another participant explains that computers use 2's complement to perform subtraction as an addition operation, referencing external material for further detail.
  • A mathematical perspective is presented, indicating that subtraction can be viewed as addition of a negative number, which relates to the handling of signed and unsigned numbers in computer science.
  • It is noted that while subtracting in binary is not inherently more difficult than adding, the design choice to use a single set of circuits for both operations simplifies hardware requirements.
  • A participant mentions that similar principles could apply to decimal numbers, although the implementation is more complex than in binary.

Areas of Agreement / Disagreement

Participants express varying viewpoints on the nature of subtraction in computing, with some agreeing on the use of addition for subtraction via 2's complement, while others focus on the implications for circuit design. The discussion remains unresolved regarding the necessity and efficiency of direct subtraction versus addition.

Contextual Notes

Limitations include the potential for differing interpretations of mathematical operations and the specific hardware implementations that may affect the discussion.

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
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 53 ·
2
Replies
53
Views
7K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 42 ·
2
Replies
42
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
5
Views
2K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K