Browse Definitions :
Definition

# operand

## What is an operand?

In computing and mathematics, an operand is an object that is operated on by an operator. Operands are similar across both fields, but an operand's specific characteristics are best understood within the context of each field and the operations being performed.

## What is an operand in mathematics?

In mathematics, an operand is the object of a mathematical operation. Operands are used in conjunction with operators to create equations that produce values based on how the operators and operands are positioned within the equations.

An operand is a number, a variable that represents a number or a function that returns a number. Operators determine how those values are acted upon. For example, the addition operator (+) is used to add two numbers together, and the multiplication operator (x or *) is used to multiply two numbers together, as in the following equation:

2 + 3 x 4

The equation contains three operands -- 2, 3 and 4 -- along with one addition operator and one multiplication operator.

Mathematical equations are generally evaluated based on operator precedence, moving from left to right. In this case, the multiplication operator takes precedence over the addition operator, so the first step is to multiply 3 times 4, which returns 12. Next, 2 and 12 are added together, resulting in a total of 14.

The normal rules of precedence can be overridden by enclosing a specific equation in parentheses:

(2 + 3) x 4

In this scenario, the 2 and 3 are first added together to return a sum of 5. The sum is then multiplied by 4, resulting in a total of 20.

Mathematical equations are often more complex than those shown in these examples. They might incorporate additional operators, such as subtraction (-) or division (¸ or /), or they might contain variables, functions or both. An equation's operands might also include exponents, such as 42. The following equation contains many of these elements:

a - f(x) / (3 x b2)

The equation includes four operands: the variable a, the function f and its argument x, the numeric value 3 and the variable b2. The equation also includes the parenthetical element (3 x b2). A parenthetical element is sometimes considered its own operand.

In addition, the equation contains three operators: subtraction, division and multiplication. The equation is evaluated according to the same rules of precedence that are used for equations with only numeric values:

1. parentheses
2. exponents
3. multiplication and division

The acronym PEMDAS is sometimes used to refer to the rules of precedence. One way to remember the acronym is to memorize the mnemonic phrase "Please Excuse My Dear Aunt Sally."

In some cases, operands are referred to by their more formal names, which are based on the specific type of operation. For example, an operand in an addition operation might be referred to as the addend or summand, and an operand in a multiplication operation might be called the factor or multiplier. If multiplier is used, it typically refers to the second operand in the multiplication equation.

## What is an operand in computing?

In computing, an operand can refer to an element in a programming language, such as C++ or Java, or to an element that is part of a computer's instruction code. In either case, the operand represents the data to be operated on or manipulated by some type of operator.

An operand in a programming language works much like an operand in mathematics. An operator issues a specific instruction to the computer to carry out an operation on one or more operands. However, a programming language typically supports more types of operators than in mathematics. In addition to arithmetic operators, it can include logical operators, comparison operators, assignment operators and several other types of operators.

An operand in a programming language can be a constant, a variable or the value returned by a function. For example, the following statement includes all three types of operands, along with four types of operators:

a = (b + c) * sqrt(d) / 27.599;

The operands include the variables a, b and c; the value returned by the function sqrt(d); and the constant 27.599. The first operator is an assignment operator (=) that assigns the value returned by the equation to the variable a. The other operators are arithmetic operators, much like those found in mathematics.

And, like mathematics, programming languages adhere to rules of precedence when evaluating statement operations. In the example above, the elements are evaluated in the following order:

2. returned function value
3. multiplication
4. division
5. variable assignment

Variable assignment is unique from the other steps because it is evaluated from right to left, rather than left to right. In programming languages, the direction of evaluation is referred to as an operator's associativity. Most operations are based on left-to-right associativity, as is the case with the first four steps in the example, but some operations require right-to-left evaluation, such as variable assignments. Because the associativity in this case is right to left, a value is not assigned to the variable until after the equation to the right of the equal sign has been evaluated.

Precedence and associativity rules are specific to each programming language. Although there are many similarities between different languages, it cannot be assumed that statement evaluation logic is implemented the same way between them.

Another way in which operands are used is in computer instruction code, particularly in assembly languages. An instruction typically includes operation code (opcode) and one or more operands. The opcode supplies the instruction details to the processor, and the operand provides the necessary data. An operand might contain the data or an address for where the data can be found, such as a location in a register or in system memory. The exact approach to handling opcodes and operands depends on the system where the instruction code is running.

This was last updated in November 2022

• personally identifiable information (PII)

Personally identifiable information (PII) is any data that could potentially identify a specific individual.

• zero-day vulnerability

A zero-day vulnerability is a security loophole in software, hardware or firmware that threat actors exploit before the vendors ...

• DNS attack

A DNS attack is an exploit in which an attacker takes advantage of vulnerabilities in the domain name system.

• data collection

Data collection is the process of gathering data for use in business decision-making, strategic planning, research and other ...

• chief trust officer

A chief trust officer (CTrO) in the IT industry is an executive job title given to the person responsible for building confidence...

• green IT (green information technology)

Green IT (green information technology) is the practice of creating and using environmentally sustainable computing resources.

• diversity, equity and inclusion (DEI)

Diversity, equity and inclusion is a term used to describe policies and programs that promote the representation and ...

ADP Mobile Solutions is a self-service mobile app that enables employees to access work records such as pay, schedules, timecards...

• director of employee engagement

Director of employee engagement is one of the job titles for a human resources (HR) manager who is responsible for an ...

• digital marketing

Digital marketing is the promotion and marketing of goods and services to consumers through digital channels and electronic ...