3 arithmetic operation instructions – MITSUBISHI ELECTRIC 700 Series User Manual

Page 149

Advertising
background image

144

Basic Instructions

3.26.3 Arithmetic Operation Instructions

The arithmetic operation instructions are instructions which perform the addition,
subtraction, multiplication, and division of two BIN data.

(1) Arithmetic operation with BIN (Binary)

• If the operation result of an addition instruction exceeds 32767 , the result

becomes a negative value.

• If the operation result of a subtraction instruction is less than - 32768 , the result

becomes a positive value.

• The operation of a positive value and a negative value is as follows:

5 + 8

13

5 - 8

-3

5 x 3

15

-5 x 3

-15

-5 x (-3)

15

-5 / 3

-1 and remainder -2

5 / (-3)

-1 and remainder 2

-5 / (-3)

1 and remainder -2

Advertising