
435
Conversion Instructions
Section 3-12
Examples
The following diagram shows an example of 8-digit BCD-to-binary conversion.
When CIO 000000 is ON in the following example, the hexadecimal value in
CIO 0011 and CIO 0010 is converted to a BCD value and stored in D00200
and D00201.
3-12-5 2’S COMPLEMENT: NEG(160)
Purpose
Calculates the 2’s complement of a word of hexadecimal data.
Ladder Symbol
Variations
Applicable Program Areas
Operand Specifications
R+1
R
×
16
3
×
16
2
×
16
1
×
16
0
×
16
7
×
16
6
×
16
5
×
16
4
×
10
3
×
10
2
×
10
1
×
10
0
×
10
7
×
10
6
×
10
5
×
10
4
3
2
0
A
0
0
2
D
x16
7
x16
6
x16
5
x16
4
S+1: CIO 0011
S: CIO 0010
1
9
3
0
0
2
9
6
x10
7
x10
6
x10
5
x10
4
x16
3
x16
2
x16
1
x16
0
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
S: Source word
R: Result word
NEG(160)
S
R
Variations
Executed Each Cycle for ON Condition
NEG(160)
Executed Once for Upward Differentiation
@NEG(160)
Executed Once for Downward Differentiation Not supported
Immediate Refreshing Specification
Not supported
Block program areas
Step program areas
Subroutines
Interrupt tasks
OK
OK
OK
OK
Area
S
R
CIO Area
CIO 0000 to CIO 6143
Work Area
W000 to W511
Holding Bit Area
H000 to H511
Auxiliary Bit Area
A000 to A959
A448 to A959
Timer Area
T0000 to T4095
Counter Area
C0000 to C4095
DM Area
D00000 to D32767
EM Area without bank
E00000 to E32767
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...