![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268607.webp)
568
Special Math Instructions
Section 3-14
Flags
Precautions
The content of S+1 and S must be less than 8000 0000.
The operands of this instruction (S+1, S, and R) are all treated as binary val-
ues. If the input data is BCD, use the ROOT(072) instruction.
Example
When CIO 000000 is ON in the following example, ROTB(620) calculates the
square root of the data in CIO 0002 and CIO 0001, and writes the integer por-
tion of the result in D00100.
3-14-2 BCD SQUARE ROOT: ROOT(072)
Purpose
Computes the square root of an 8-digit BCD number and outputs the integer
portion of the result to the specified result word.
Ladder Symbol
Variations
Applicable Program Areas
Operand Specifications
Name
Label
Operation
Error Flag
ER
ON if bit 15 of S+1 is 1 (ON).
OFF in all other cases.
Equals Flag
=
ON if the result is 0000.
OFF in all other cases.
Overflow Flag
OF
ON if the content of S+1 and S is 4000 0000 to
7FFF FFFF.
OFF in all other cases.
Underflow Flag
UF
OFF
Negative Flag
N
OFF
014B
5A91
1234
D00100
CIO 0002
CIO 0001
Square root computation
(remainder eliminated)
ROOT(072)
S
R
S
: First source word
R
: Result word
Variations
Executed Each Cycle for ON Condition
ROOT(072)
Executed Once for Upward Differentiation
@ROOT(072)
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 6142
CIO 0000 to CIO 6143
Work Area
W000 to W510
W000 to W511
Holding Bit Area
H000 to H510
H000 to H511
Auxiliary Bit Area
A000 to A958
A448 to A959
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...