EasyManua.ls Logo

Omron CJ - INSTRUCTIONS

Omron CJ - INSTRUCTIONS
1308 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
Loading...
1. Basic Understanding of Instructions
20
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Note 1. Complements
Generally the complement of base x refers to a number produced when all
digits of a given number are subtracted from x 1 and then 1 is added to
the rightmost digit.
(Example: The ten's complement of 7556 is 9999 7556 + 1 = 2444.)
A complement is used to express a subtraction and other functions as an
addition.
Example: With 8954 7556 = 1398, 8954 + (the ten's complement of 7556)
= 8954 + 2444 = 11398. If we ignore the leftmost bit, we get a subtraction
result of 1398.
2. Two's Complements
A two's complement is a base-two complement. Here, we subtract all digits
from 1 (2 1 = 1) and add one.
Example: The two's complement of binary number 1101 is 1111 (F Hex)
1101 (D Hex) + 1 (1 Hex) = 0011 (3 Hex). The following shows this value
expressed in 4-digit hexadecimal.
Single
precision
floating
point
decimal
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. As such, users do not need to know this for-
mat although they do need to know that the formatting takes up two words.
--- ---
Double
precision
floating
point deci-
mal
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. As such, users do not need to know this for-
mat although they do need to know that the formatting takes up four words.
--- ---
Data type Data format Decimal 4-digit
hexadecimal
30 31 29 23 2122 20 19 2 1 0
Sign of
mantissa
Exponent
Mantissa
× 1.[Mantissa] × 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
.
Binary
62 63 52 51 0
Exponent Mantissa
Sign (bit 63)
Mantissa
Exponent
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
.
× 1.[Mantissa] × 2
Exponent

Table of Contents

Related product manuals