Technical data

6.22 OB 220: Sign Extension
Application
A sign extension is necessary to extend a negative 16-bit fixed point
number to a 32-bit fixed point number before performing a fixed
point-floating point conversion (32 bits, operation FDG).
Function
This special function extends the sign of a 16-bit fixed point number
in ACCU-1-L to the more significant word (ACCU-1-H):
If bit 2
15
= 0 (positive number), the more significant word is
loaded with KH = 0000.
If bit 2
15
= 1 (negative number), the more significant word is
loaded with KH = FFFF.
Parameters
ACCU-1-L
16-bit fixed point number
Result
ACCU-1-H is loaded into ACCU-1-L according to the sign of the
fixed-point number (see above).
Possible errors
none
OB 220: Sign Extension
CPU 928B Programming Guide
6 - 90 C79000-B8576-C898-01