![Omron CJ1G-CPU series Programming Manual Download Page 52](http://html1.mh-extra.com/html/omron/cj1g-cpu-series/cj1g-cpu-series_programming-manual_742489052.webp)
31
Basic Concepts
Section 2-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
negative value (decimal) is expressed as a two’s complement.
Example: To treat –19 in decimal as signed binary, 0013 Hex (the absolute
value of 19) is subtracted from FFFF Hex and then 0001 Hex is added to yield
FFED Hex.
Single-pre-
cision
floating-
point deci-
mal
---
---
Double-
precision
floating-
point deci-
mal
---
---
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
Value = (
−
1)
Sign
x 1.[Mantissa] x 2
Exponent
Binary
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
.
Note
This format conforms to IEEE754 standards for single-precision floating-point
data and is used only with instructions that convert or calculate floating-point
data. It can be used to set or monitor from the I/O memory Edit and Monitor
Screen on the CX-Programmer (not supported by the Programming Consoles).
As such, users do not need to know this format although they do need to know
that the formatting takes up two words.
63 62 61
52
51
50
49 48
47 46
3
2
1
0
Sign of
mantissa
Exponent
Mantissa
Value = (
−
1)
Sign
x 1.[Mantissa] x 2
Exponent
Binary
Sign (bit 63)
Mantissa
Exponent
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
.
Note This format conforms to IEEE754 standards for double-precision floating-point
data and is used only with instructions that convert or calculate floating-point
data. It can be used to set or monitor from the I/O memory Edit and Monitor
Screen on the CX-Programmer (not supported by the Programming Consoles).
As such, users do not need to know this format although they do need to know
that the formatting takes up four words.
.
Summary of Contents for CJ1G-CPU series
Page 3: ...iv...
Page 5: ...vi...
Page 21: ...xxii Conformance to EC Directives 6...
Page 169: ...148 Task Control Instructions Section 3 32...
Page 203: ...182 Programming Device Operations for Tasks Section 4 4...
Page 253: ...232 Using File Memory Section 5 3...
Page 337: ...316 Other Functions Section 6 11...
Page 347: ......
Page 369: ......
Page 373: ......
Page 379: ......
Page 381: ...360 Revision History...