Operator

Updated: 02/06/2025 by Computer Hope

An operator may refer to any of the following:

Exclamation point and equals sign

1. In computer programming and at the command line, an operator is an object capable of manipulating a value or operator. For example, in "1 + 2", the "1" and "2" are the operands and the plus symbol is the operator. Below is a listing of common operators found in programming languages with explanations and examples.

Operator Alternative Explanation Examples
=   Equals (set a variable to a value). a = b
== Eq or equ Equals? (compare two values) a == b
!= Ne or neq Not equal a != b
+   Plus a + b
+=   Addition a += b
++   Increment a++
-   Minus a - b
-=   Subtraction a -= b
--   Decrement a--
/   Divide a / b
*   Times a * b
> Gt or gtr Greater than a > b
< Lt or lss Less than a < b
>= Ge or geq Greater than or equal to a >= b
<= Le or leq Less than or equal to a <= b
<=>   Spaceship operator  
|| or Boolean or a || b
&& and Boolean and a && b
Tip

Booleans are also considered operators where AND, OR, and NOT can also be used in most programming languages.

2. An op is a person who controls an IRC (Internet Relay Chat) channel. See the op page for further information about this term.

Arithmetic operator, Bitwise operator, Conditional expression, Decrement, Exclamation mark, Increment, Logical operation, Op, Operand, Operator associatively, Operator precedence, Order of operations, Programming terms, Syntactic sugar, Ternary operator, User