389
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Conversion Instructions
3
SIGN
SIGN
Applicable Program Areas
Operands
R: First result word
R: Contents of S
R+1: #0000 or #FFFF (hex)
Note R and R+1 must be in the same data area.
z Operand Specifications
Flags
Instruction Mnemonic Variations
Function
code
Function
16-BIT TO 32-BIT SIGNED
BINARY
SIGN @SIGN 600
Expands a 16-bit signed binary value to its 32-bit
equivalent.
Symbol
SIGN
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
S Source word WORD 1
R First result word DINT 2
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
S
OK OK OK OK OK OK OK OK OK OK
OK OK
--- OK --- --- --- ---
R --- ---
Name Label Operation
Error Flag ER OFF
Equals Flag = • ON if the result is 0000 0000.
• OFF in all other cases.
Negative Flag N • ON if bit 15 of R+1 is ON.
• OFF in all other cases.
S: Source word
R: First result word
SIGN(600)
S
R