Home

operandos

An operand is a value or quantity on which an operator acts in mathematics and computer science. In an expression, operands are the elements surrounding an operator. The number of operands required by an operator is its arity: unary operators take one operand, binary operators take two, and ternary operators take three.

In mathematics, operands can be numbers, variables, or more complex expressions. For example, in 3 × x

In programming languages, operands appear in expressions and can be literals (constants), variables, or memory references.

In computer architecture and assembly language, an instruction encodes an opcode and one or more operands.

Overall, operands are fundamental to evaluating expressions, generating code, and encoding machine instructions, reflecting the values

+
2,
the
operands
of
×
are
3
and
x,
while
the
operands
of
+
are
(3
×
x)
and
2.
Operator
precedence
and
associativity
determine
the
order
in
which
operands
are
combined
to
produce
a
result.
Some
languages
also
use
immediate
operands
that
embed
values
directly
in
the
instruction
or
expression.
For
instance,
in
the
expression
y
=
a
+
5,
the
value
5
is
an
immediate
operand,
and
a
is
an
operand
whose
value
may
come
from
a
variable
or
memory.
Operands
may
specify
registers,
memory
addresses,
or
immediate
values.
Terms
such
as
source
operands
and
destination
operands
describe
where
data
are
read
from
and
where
results
are
written.
Some
instruction
set
architectures
use
two-operand,
three-operand,
or
other
formats,
affecting
how
results
are
computed
and
stored.
that
operators
manipulate
in
different
contexts.