Definitions:
Instruction
is just atomic parts of assembly language like
MOV EAX, EBX
Now let's say we have the following code written in C++ language:
int a = 1;
int b = a + 3;
Here =
and +
are operators
.
In mathematics, an operation
is a function which takes zero or more input values (called operands) to a well-defined output value.
As far as I understand, we can not execute operator
without assignment (basically we can write b > c;
but it makes no sense), even increment and decrement work internally as x = x + 1
.
So it seems to me that in computer science operation
is always a result of some single operator execution. For example:
c = 1 + 2; // this is operation since we have single + operator
c = 1 + 2 + 3; // here we have two operations 1 + 2, and result of it + 3
Now. Not every single line of code can be translated into single instruction, for example:
int a = 1; // MOV EAX, 1
int b = a + 3; // ADD EAX, 3
// ADD EBX, EAX
So it correct to give operation
the following definition (for x86):
operation
is the result of the operator execution. And it transforms into 1 or more instructions.