![Omron CVM1D Operation Manual Download Page 216](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532216.webp)
(104)
NEG 0005 D00020
0000
08
211
3
2
0
A
0
0
2
D
x16
7
x16
6
x16
5
x16
4
S+1: CIO 0011
S: CIO 0010
x16
3
x16
2
x16
1
x16
0
1
9
3
0
0
2
9
6
x10
7
x10
6
x10
5
x10
4
x10
3
x10
2
x10
1
x10
0
2X16
5
+13X16
4
+3X16
3
+2X16
2
+10=2961930
R+1: D00101
R: D00100
MBS
MBS
LSB
LSB
5-17-5 2’S COMPLEMENT: NEG(104)
(104)
NEG
S
R
R: Result word
CIO, G, A, DM, DR, IR
S: Source word
CIO, G, A, T, C, #, DM, DR, IR
Operand Data Areas
Ladder Symbol
Variations
j
NEG(104)
When the execution condition is OFF, NEG(104) is not executed. When the
execution condition is ON, NEG(104) converts the 4-digit hexadecimal content
of the source word (S) to its 2’s complement and outputs the result to the result
word (R). This operation is effectively the same as subtracting S from $0000 and
outputting the result to R.
Refer to page 101 for general precautions on operand data areas.
Flags
ER (A50003):
Content of
*
DM word is not BCD when set for BCD.
EQ (A50006):
Content of S is 0 (the content of R will also be 0 after execu-
tion)
N (A50008):
Shows the status of bit 15 of R after execution.
Example
When CIO 000008 is ON in the following example, the 4-digit hexadecimal con-
tent of CIO 0005 is converted to its 2’s complement equivalent and stored in
D00020.
Address
Instruction
Operands
00000
LD
000008
00001
NEG(104)
0005
D00020
0
0005
0
0
1
0
D00020
0
0
0
0
0005
0
0
1
F
D00020
F
F
F
befor
execution
after
execution
The bit contents of word 0005 and word D00020 after execution is as follows.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0
0
0
1
0005
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
F
F
F
F
D00020
Description
Precautions
Conversion Instructions
Section 5-17
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...