EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 47

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
14
Programming Concepts Section 1-1
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.
Single-pre-
cision
floating-
point deci-
mal
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-
precision
floating-
point deci-
mal
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.
--- ---
Data type Data format Decimal 4-digit
hexadecimal
31 30 29 23 22 21 20 19 18 17 3 2 1 0
Sign of
mantissa
Exponent
Mantissa
x 1.[Mantissa] x 2
Exponent
Sign (bit 31)
Mantissa
Exponent
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
2
n
.
Value = (1)
Sign
Binary
63 62 61 52 51 50 49 48 47 46 3 2 1 0
Exponent Mantissa
x 1.[Mantissa] x 2
Exponent
Sign (bit 63)
Mantissa
Exponent
Sign
Value = (1)
Sign of
mantissa
Binary
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
in 2
n
.

Table of Contents

Related product manuals