Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 47

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Programming Concepts
Data type
Single-pre-
31 30 29
cision
floating-
point deci-
mal
Sign of
Exponent
mantissa
Value = (−1)
Sign (bit 31)
Mantissa
Exponent
Note This format conforms to IEEE754 standards for single-precision floating-
point data and is used only with instructions that convert or calculate float-
ing-point data. It can be used to set or monitor from the I/O memory Edit
and Monitor Screen on the CX-Programmer. As such, users do not need to
know this format although they do need to know that the formatting takes
up two words.
Double-
63 62 61
precision
floating-
point deci-
mal
Sign of
Exponent
mantissa
Value = (−1)
Sign (bit 63)
Mantissa
Exponent
Note This format conforms to IEEE754 standards for double-precision floating-
point data and is used only with instructions that convert or calculate float-
ing-point data. It can be used to set or monitor from the I/O memory Edit
and Monitor Screen on the CX-Programmer. As such, users do not need to
know this format although they do need to know that the formatting takes
up four words.
14
Data format
23
22
21
20 19 18 17
Mantissa
Binary
Exponent
Sign
x 1.[Mantissa] x 2
1: negative or 0: positive
The 23 bits from bit 00 to bit 22 contain the mantissa,
i.e., the portion below the decimal point in 1.@@@.....,
in binary.
The 8 bits from bit 23 to bit 30 contain the exponent.
The exponent is expressed in binary as 127 plus n in
n
2
.
52
51 50 49 48 47 46
Mantissa
Binary
Sign
Exponent
x 1.[Mantissa] x 2
1: negative or 0: positive
The 52 bits from bit 00 to bit 51 contain the mantissa,
i.e., the portion below the decimal point in 1.@@@.....,
in binary.
The 11 bits from bit 52 to bit 62 contain the exponent
The exponent is expressed in binary as 1023 plus n
n
in 2
.
Signed Binary Data
In signed binary data, the leftmost bit indicates the sign of binary 16-bit data.
The value is expressed in 4-digit hexadecimal.
Positive Numbers: A value is positive or 0 if the leftmost bit is 0 (OFF). In 4-
digit hexadecimal, this is expressed as 0000 to 7FFF hex.
Negative Numbers: A value is negative if the leftmost bit is 1 (ON). In 4-digit
hexadecimal, this is expressed as 8000 to FFFF hex. The absolute of the neg-
ative value (decimal) is expressed as a two's complement.
3
2
1
0
3
2
1
0
Section 1-1
Decimal
4-digit
hexadecimal
---
---
---
---

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents