EasyManuals Logo

Omron CJ - INSTRUCTIONS User Manual

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
Page #426 background imageLoading...
Page #426 background image
3. Instructions
388
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
Hint
• This operation (reversing the status of the bits and adding 1) is equivalent to subtracting the content
of S/S+1 and S from 0000/0000 0000.
Example Programming
When CIO 0.00 is ON in the following example, NEG(160) calculates the 2's complement of the content
of D100 and writes the result to D200.
When CIO 0.00 is ON in the following example, NEGL(161) calculates the 2's complement of the
content of D101 and D100 and writes the result to D201 and D200.
z NEG
NEG(160) calculates the 2's complement of S and writes the result to R. The
2's complement calculation basically reverses the status of the bits in S and
adds 1.
Note The result for 8000 hex will be 8000 hex.
z NEGL
NEGL(161) calculates the 2's complement of S+1 and S and writes the
result to R+1 and R. The 2's complement calculation basically reverses the
status of the bits in S+1 and S and adds 1.
Note The result for 8000 0000 hex will be 8000 0000 hex.
(S) (R)
2's complement
(Complement + 1)
(S+1, S) (R+1, R)
2's complement
(Complement + 1)
−)
Add 1
Actual
calculation
Equivalent
subtraction
Reverse bit status
D100
D200
D100
D200
0.00
−)
Add 1
Actual
calculation
Equivalent
subtraction
Reverse bit status
D100
D101 D100
D201 D200
D200
0.00

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ - INSTRUCTIONS and is the answer not in the manual?

Omron CJ - INSTRUCTIONS Specifications

General IconGeneral
BrandOmron
ModelCJ - INSTRUCTIONS
CategoryController
LanguageEnglish

Related product manuals