All Topics  
Operand

 

   Email Print
   Bookmark   Link






 

Operand



 
 
An operand is one of the inputs (arguments) of an operator
Operator

In mathematics, an operator is a function which operates on another function. Often, an "operator" is a function which acts on functions to produce other functions ; or it may be a generalization of such a function, as in linear algebra, where some of the terminology reflects the origin of the subject in operations on the functions which ar...
 in mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
. The following arithmetic
Arithmetic

Arithmetic or arithmetics is the oldest and most elementary branch of mathematics, used by almost everyone, for tasks ranging from simple day-to-day counting to advanced science and business calculations....
 expression shows an example of operators and operands:

3 + 6 = 9


Here '+' is the operator and '3' and '6' are the operands.

ands may be complex, and may consist of expressions also made up of operators with operands.

x 2

In the above expression '(3 + 5)' is the first operand for the multiplication operator and '2' the second.






Discussion
Ask a question about 'Operand'
Start a new discussion about 'Operand'
Answer questions from other users
Full Discussion Forum



Encyclopedia


An operand is one of the inputs (arguments) of an operator
Operator

In mathematics, an operator is a function which operates on another function. Often, an "operator" is a function which acts on functions to produce other functions ; or it may be a generalization of such a function, as in linear algebra, where some of the terminology reflects the origin of the subject in operations on the functions which ar...
 in mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
. The following arithmetic
Arithmetic

Arithmetic or arithmetics is the oldest and most elementary branch of mathematics, used by almost everyone, for tasks ranging from simple day-to-day counting to advanced science and business calculations....
 expression shows an example of operators and operands:

3 + 6 = 9


Here '+' is the operator and '3' and '6' are the operands.

Notation


Expressions as operands

Operands may be complex, and may consist of expressions also made up of operators with operands.

x 2

In the above expression '(3 + 5)' is the first operand for the multiplication operator and '2' the second. The operand '(3 + 5)' is an expression in itself, which contains an addition operator, with the operands '3' and '5'.

Order of operations
Order of operations

In algebra and computer programming, when a number or expression is both preceded and followed by an operator such as minus or multiplication, a rule is needed to specify which operator should be applied first; this rule is known as a precedence rule, or more informally order of operation....
 

Rules of precedence affect which values form operands for which operators: j

3 + 5 x 2


In the above expression, the multiplication operator has the higher precedence than the addition operator, so the multiplication operator has operands of '5' and '2'. The addition operator has operands of '3' and '5 x 2'.

Positioning of operands

Depending on the mathematical notation
Mathematical notation

A mathematical notation is a system of symbolic representations of mathematical objects and ideas. Mathematical notations are used in mathematics and the physical sciences, engineering and economics....
 being used the position of an operator in relation to its operand(s) may vary. In everyday usage infix notation
Infix notation

Infix notation is the common arithmetic and logical formula notation, in which operators are written infix-style between the operands they act on ....
 is the most common, however other notations also exist, such as the prefix and postfix notations. These alternate notations are most common within computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
.

Below is a comparison of three different notations — all represent an addition of the numbers '1' and '2'
1 + 2 (infix notation)
+ 1 2 (prefix notation)
1 2 + (postfix notation)


Arity

The number of operands of an operator is called its arity
Arity

In logic, mathematics, and computer science, the arity of a function or operation is the number of arguments or operands that the function takes. The arity of a relation is the number of domains in the corresponding Cartesian product....
. Based on arity, operators are classified as nullary (no operands), unary
Unary operation

In mathematics, a unary operation is an operation with only one operand, i.e. an operation with a single input, or in other words, a function of one variable ....
 (1 operand), binary
Binary operation

In mathematics, a binary operation is a calculation involving two operands, in other words, an operation whose arity is two. Binary operations can be accomplished using either a binary function or binary operator....
 (2 operands), ternary
Ternary operation

In mathematics, a ternary operation is an n-ary operation with n = 3. A ternary operation on a set A takes any given three elements of A and combines them to form a single element of A....
 (3 operands) etc.

Computer science

In computer programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
s, the definitions of operator
Operator (programming)

Programming languages generally support a set of operators that are similar to operator. A language may contain a fixed number of built-in operators or it may allow the creation of programmer-defined operators ....
 and operand are almost the same as in mathematics.

Additionally, in assembly language
Assembly language

An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture....
, an operand is a value (an argument) on which the instruction
Instruction (computer science)

In computer science, an instruction is a single operation of a central processing unit defined by an instruction set architecture. In a broader sense, an "instruction" may be any representation of an element of an executable program, such as a bytecode....
, named by mnemonic
Mnemonic

A mnemonic device is a memory aid. Commonly met mnemonics are often verbal, something such as a very short poem or a special word used to help a person remember something, particularly lists, but may be visual, kinesthetic or auditory....
, operates. The operand may be a processor register
Processor register

In computer architecture, a processor register is a small amount of Computer storage available on the CPU whose contents can be accessed more quickly than storage available elsewhere....
, a memory address
Memory address

In computer science, a memory address is an identifier for a computer memory location, at which a computer program or a hardware device can store a piece of data and later retrieve it....
, a literal constant, or a label. A simple example (in the x86 architecture) is

MOV
MOV (x86 instruction)

In the x86 assembly language, the MOV instruction is a mnemonic for the copying of data from one location to another. The x86 assembly language actually contains a number of different opcodes that perform a move....
   DS, AX


where the value in register operand 'AX' is to be moved into register 'DS'. Depending on the instruction
Instruction set

An instruction set is a list of all the instruction , and all their variations, that a processor can execute.Instructions include:* Arithmetic such as add and subtract...
, there may be zero, one, two, or more operands.

See also

  • Instruction set
    Instruction set

    An instruction set is a list of all the instruction , and all their variations, that a processor can execute.Instructions include:* Arithmetic such as add and subtract...