Siemens CPU 948 Programming Manual page 103

Simatic s5 s5-155u
Table of Contents

Advertisement

Arithmetic operations
Table 3-7
Arithmetic operations
Operation
Operand
+ F
-
F
x F
:
F
+ G
-
G
x G
:
G
CPU 948 Programming Guide
C79000-G8576-C848-04
Function
Add two fixed point numbers (16 bits)
Subtract one fixed point number from another (16 bits)
Multiply two fixed point numbers (16 bits)
Divide one fixed point number by another (16 bits):
quotient in ACCU-1-L, remainder in ACCU-1-H
Add two floating point numbers (32 bits)
Subtract one floating point number from another (32 bits)
Multiply two floating point numbers (32 bits)
Divide one floating point number by another (32 bits)
Arithmetic operations logically combine the contents of ACCU 1 and
ACCU 2 (e.g. ACCU 2 - ACCU 1). The result is then contained in
ACCU 1. An arithmetic operation changes the arithmetic registers as
follows (in fixed point operations only the low word):
ACCU 1
before:
<ACCU 1> <ACCU 2> <ACCU 3> <ACCU 4>
after:
<result>
Note
Within the supplementary operations, there are operations for
subtraction and addition of double word fixed point numbers.
Basic Operations
ACCU 2
ACCU 3
<ACCU 3> <ACCU 4> <ACCU 4>
ACCU 4
3 - 31

Advertisement

Table of Contents
loading

Table of Contents