EasyManua.ls Logo

Omron SYSMAC CV Series - 2 S Complement: Neg(104)

Omron SYSMAC CV Series
636 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...
(104)
NEG 0005 D00020
0000
08
223
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 AreasLadder 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 115 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
00005 0 0 1
0D00020 0 0 0
00005 0 0 1
FD00020 F F F
befor
execution
after
execution
The bit contents of word 0005 and word D00020 after execution is as follows.
0000000000000001
0001
0005
1111111111111111
FFFF
D00020
Description
Precautions
Conversion Instructions Section 5-17

Table of Contents

Related product manuals