Specifications
10. Additional Special Devices and Instructions
10-6
Program example:
M0
M1
DLOG D10 D12
M2
DEBCD D20 D30
D20
DFLT
D12D2
DFLT D0
D10
RST M1081
Ϩʳ When M0 is ON, the data of (D0, D1) and (D2, D3) are converted to
decimal of binary number system and the result are stored in the 32-bit
register, (D10, D11) and (D12, D13).
Ϩʳ When M1 is ON, use the 32-bit register, (D10, D11) and (D12, D13) to
perform the LOG operation. The result will be the decimal of binary
number system and stored in the 32-bit register, (D20, D21).
Ϩʳ When M2 is ON, the data of (D20, D21) is converted from binary to
decimal and the result is stored in (D30, D31) register. (At that time, the
result=D30 x 10
D31
)
D
128 POW
S1 S2 D
Convert decimal of
binary number
system to perform
power operation
Bit device Word device
Device
Operand
X Y M S K H KnX KnY KnM KnS T C D E F
S1
Ϩ
S2
Ϩ
D
Ϩ
S1
: the base device
S2
: the exponential device
D
: operation result device
The floating point data of
S1
and
S2
are multiplied in an
exponential manner and the result is stored in
D
device.
pow [
S1
+1,
S1
]^[
S2
+1,
S2
]=
D
Only the positive value of the content of
S1
and
S2
are valid. Be
sure to use 32-bit data format to assign the
D
register. Because
using the floating point format to perform the LOG operation is
necessary,
S1
and
S2
have to be converted to the floating point
value.
S1
S2
=D, obtain the value of D
When knowing S1=5,S2=3, obtain D=5
3
=?
D=5
3
=125