![background image](http://html1.mh-extra.com/html/omron/cj1g-cpu-series/cj1g-cpu-series_programming-manual_742489128.webp)
107
Special Math Instructions
Section 3-12
3-12 Special Math Instructions
Instruction
Mnemonic
Code
Symbol/Operand
Function
Location
Execution
condition
BINARY ROOT
ROTB
@ROTB
620
Output
Required
BCD SQUARE
ROOT
ROOT
@ROOT
072
Output
Required
ARITHMETIC
PROCESS
APR
@APR
069
Calculates the sine, cosine, or a linear extrapolation of the source data.
The linear extrapolation function allows any relationship between X and Y to be
approximated with line segments.
Output
Required
FLOATING
POINT DIVIDE
FDIV
@FDIV
079
Output
Required
BIT COUNTER
BCNT
@BCNT
067
Output
Required
S: 1st source
word
R: Result word
ROTB(620)
S
R
Computes the square root of the 32-bit binary content of the specified words
and outputs the integer portion of the result to the specified result word.
R
S+1
S
Binary data (32 bits)
Binary data (16 bits)
S: 1st source
word
R: Result word
ROOT(072)
S
R
Computes the square root of an 8-digit BCD number and outputs the integer
portion of the result to the specified result word.
R
S+1
S
BCD data (8 digits)
BCD data (4 digits)
C: Control word
S: Source data
R: Result word
APR(069)
C
S
R
Dd: 1st dividend
word
Dr: 1st divisor
word
R: 1st result word
FDIV(079)
Dd
Dr
R
Divides one 7-digit floating-point number by another. The floating-point
numbers are expressed in scientific notation (7-digit mantissa and 1-digit
exponent).
R+1 R
Quotient
Dd+1 Dd
Dr+1 Dr
N: Number of
words
S: 1st source
word
R: Result word
BCNT(067)
N
S
R
S+(N–1)
to
N words
Counts the number
of ON bits.
Binary result
R
Counts the total number of ON bits in the specified word(s).
Summary of Contents for CJ1G-CPU series
Page 3: ...iv...
Page 5: ...vi...
Page 21: ...xxii Conformance to EC Directives 6...
Page 169: ...148 Task Control Instructions Section 3 32...
Page 203: ...182 Programming Device Operations for Tasks Section 4 4...
Page 253: ...232 Using File Memory Section 5 3...
Page 337: ...316 Other Functions Section 6 11...
Page 347: ......
Page 369: ......
Page 373: ......
Page 379: ......
Page 381: ...360 Revision History...