Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 631

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Floating-point Math Instructions
Numbers Expressed as Floating-point Values
Normalized Numbers
Non-normalized Numbers
It is not necessary for the user to be aware of the IEEE754 data format when
reading and writing floating-point data. It is only necessary to remember that
floating point values occupy two words each.
The following types of floating-point numbers can be used.
Mantissa (f)
0
Not 0
Note A non-normalized number is one whose absolute value is too small to be
expressed as a normalized number. Non-normalized numbers have fewer sig-
nificant digits. If the result of calculations is a non-normalized number (includ-
ing intermediate results), the number of significant digits will be reduced.
Normalized numbers express real numbers. The sign bit will be 0 for a positive
number and 1 for a negative number.
The exponent (e) will be expressed from 1 to 254, and the real exponent will
be 127 less, i.e., –126 to 127.
The mantissa (f) will be expressed from 0 to 2
the real mantissa, bit 2
Normalized numbers are expressed as follows:
(sign s)
(exponent e)–127
(–1)
x 2
Example
31 30
1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Sign:
Exponent:
128 – 127 = 1
Mantissa:
1 + (2
Value:
–1.75 x 2
Non-normalized numbers express real numbers with very small absolute val-
ues. The sign bit will be 0 for a positive number and 1 for a negative number.
The exponent (e) will be 0, and the real exponent will be –126.
The mantissa (f) will be expressed from 1 to 2
the real mantissa, bit 2
Non-normalized numbers are expressed as follows:
(sign s)
–126
(–1)
x 2
Example
31 30
0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Sign:
Exponent:
–126
Mantissa:
0 + (2
Value:
–0.75 x 2
15
7
n
f
n+1
s
e
Exponent (e)
0
0
Normalized number Infinity
Non-normalized
number
33
is 1 and the binary point follows immediately after it.
x (1 + mantissa x 2
23 22
22
21
–23
+ 2
) x 2
= 1 + (2
1
= –3.5
33
is 0 and the binary point follows immediately after it.
–23
x (mantissa x 2
)
23 22
22
21
–23
+ 2
) x 2
= 0 + (2
–126
Section 3-15
6
0
Not 0 and
All 1's (255)
not all 1's
NaN
33
– 1, and it is assume that, in
–23
)
0
–1
–2
+ 2
) = 1 + 0.75 = 1.75
33
– 1, and it is assume that, in
0
–1
–2
+ 2
) = 0 + 0.75 = 0.75
591

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents