...

/

Operations in the Arithmetic Expressions

Operations in the Arithmetic Expressions

Learn about the operations we can perform in the arithmetic expression, the priority of operations, and choosing a numeral system.

The operations in arithmetic expression

The following table shows the operations we can perform in arithmetic expressions.

Operation Description Example
Calculations
* Multiplication echo "$((2 * 9)) = 18"
/ Division echo "$((25 / 5)) = 5"
% The remainder of division echo "$((8 % 3)) = 2"
+ Addition echo "$((7 + 3)) = 10"
- Subtraction echo "$((8 - 5)) = 3"
** Exponentiation echo "$((4**3)) = 64"
Bitwise operations
...
Access this course and 1400+ top-rated courses and projects.