Plus and Minus Signs - Uses in Computing

Uses in Computing

As well as the normal mathematical usage plus and minus may be used for a number of other purposes in computing.

Plus and minus signs are often used in tree view on a computer screen to show if a folder is collapsed or not.

In some programming languages concatenation of strings is written: "a" + "b" = "ab", although this usage is questioned by some for violating commutativity, a property addition is expected to have.

In most programming languages, subtraction and negation are indicated with the ASCII hyphen-minus character, -. In APL a raised minus sign (Unicode U+00AF) is used to denote a negative number, as in ¯3) and in J a negative number is denoted by an underscore, as in _5.

In C and some other computer programming languages, two plus signs indicate the increment operator and two minus signs a decrement. For example, x++ means "increment the value of x by one" and x-- means "decrement the value of x by one". By extension, "++" is sometimes used in computing terminology to signify an improvement, as in the name of the language C++.

There is no concept of negative zero in mathematics, but in computing −0 may have a separate representation from zero. In the IEEE floating-point standard 1/−0 is negative infinity whereas 1/0 is positive infinity.

Read more about this topic:  Plus And Minus Signs