EasyManuals Logo

Siemens CPU 948 User Manual

Siemens CPU 948
548 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #39 background imageLoading...
Page #39 background image
16-bit and 32-bit fixed
point numbers
Fixed point numbers are whole binary numbers with a sign.
Coding of fixed point numbers
Fixed point numbers are 16 bit (= 1 word) or 32 bit (= 2 words) in
binary representation. Bit 15 or bit 31 contains the sign.
•• ’0’ = positive number
•• ’1’ = negative number
The two’s complement representation is used for negative numbers.
PG input
Input of 16-bit fixed point number data format at the PG:KF
Input of 32-bit fixed point number data format at the PG:DH
Permitted numerical range
16-bit fixed point number
-32768 to +32767 (16 bits)
32-bit fixed point number
-2147483648 to +2147483647 (32 bits)
(8000 0000H to 7FFF FFFFH)
Using fixed point numbers
Use fixed point numbers for simple calculations and for comparing
number values. Since fixed point numbers are always whole numbers,
remember that the result of dividing two fixed point numbers is also a
fixed point number without decimal places.
Floating point numbers
Floating point numbers are positive and negative fractions. They
always occupy a double word (32 bits). A floating point number is
represented as an exponential number. The mantissa is 24 bits long
and the exponent is 8 bits long.
In the CPU 948, the default mantissa is 24 bits long (bits 0 to 23) for
adding, subtracting, multiplying and dividing.
The exponent indicates the order of magnitude of the floating point
number. The sign of the exponent tells you whether the value of the
floating point number is greater or less than 0.1.
STEP 5 Programming Language
CPU 948 Programming Guide
C79000-G8576-C848-04
2 - 9

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens CPU 948 and is the answer not in the manual?

Siemens CPU 948 Specifications

General IconGeneral
BrandSiemens
ModelCPU 948
CategoryController
LanguageEnglish

Related product manuals