A-1-12 Special Math Instructions - Omron CJ2 CPU - REV 10-2010 User Manual

Cj2 cpu unit software
Table of Contents

Advertisement

A-1-12
Special Math Instructions
Instruction
Mnemonic
BINARY ROOT
ROTB
620
@ROTB
BCD SQUARE
ROOT
072
ROOT
@ROOT
ARITHMETIC
APR
069
PROCESS
@APR
FLOATING
FDIV
079
POINT DIVIDE
@FDIV
BIT COUNTER
BCNT
067
@BCNT
CJ2 CPU Unit Software User's Manual
Code
Symbol/Operand
ROTB(620)
S
R
S: 1st source word
R: Result word
ROOT(072)
S
R
S: 1st source word
R: Result word
APR(069)
C
S
R
C: Control word
S: Source data
R: Result word
FDIV(079)
Dd
Dr
R
Dd: 1st dividend
word
Dr: 1st divisor
word
R: 1st result word
BCNT(067)
N
S
R
N: Number of
words
S: 1st source word
R: Result word
Function
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.
S+1
S
Binary data (32 bits)
Computes the square root of an 8-digit BCD number
and outputs the integer portion of the result to the
specified result word.
S+1
S
BCD data (8 digits)
Calculates SIN, COS, or linear extrapolation.
SIN or COS calculation: Calculates the SIN or COS from
angle data (0° to 90°) and outputs the result in BCD to
four places below the decimal.
Linear extrapolation: Calculates and outputs a linear
extrapolation in binary from the specified input data.
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
Dr+1
Dr
Dd+1
Counts the total number of ON bits in the specified
word(s).
N words
Counts the number of
ON bits.
to
S+(N
1)
R
Appendices
Execution
Location
condition
Output
Required
R
Binary data (16 bits)
Output
Required
R
BCD data (4 digits)
Output
Required
Output
Required
Quotient
R
Dd
Output
Required
Binary
result
A-37

Advertisement

Table of Contents
loading

Table of Contents