intel MCS BASIC-52 — Intel MCS BASIC-52 Versions 1 & 1.1 Operating and Reference Manual PDF (EN)

int e l CHAPTER 5 Description of Arithmetic / Logic Operators and Expressions 5.1 DUAL OPERAND OPERATORS MCS BASIC-52 contains a complete set of arithmetical and logical operators. Operators are divided into two groups, dual operand or dyadic operators and single operand or unary operators. The generalized form of all dual operand instructions is as follows: [expr] OP [exprl, where OP is one of the following operators: + ADDITION OPERATOR EXAMPLE: PRINT 3+2 5 / DIVISION OPERATOR EXAMPLE: PRINT 100/5 20 ** EXPONENTIATION OPERATOR Raises the first expression to the power of the second expression. The power any number can be raised to is limited to 255.

The notation ** was chosen instead of the sometimes used ^ symbol because the "up arrow" symbol appears different on various terminals. To eliminate confusion the ** notation was chosen. EXAMPLE: PRINT 2**3 8 * MULTIPLICATION OPERATOR EXAMPLE: PRINT 3*3 9 - SUBTRACTION OPERATOR EXAMPLE: PRINT 9-6 3 - 74 -