You must also adjust by 65536 to simulate a signed 16-bit value.
Print ConvertSignedShort( $0200 ) Print ConvertSignedShort( $0100 ) Print ConvertSignedShort( $0000 ) Print ConvertSignedShort( $FFFF ) Print ConvertSignedShort( $FEFF ) WaitKey Function ConvertSignedShort( ss ) ; bottom two bytes of an Int. ss = ( ( ss And $ff00 ) Shr 8 ) Or ( ( ss And $ff ) Shl 8 ) If ss < $8000 Return ss Else Return ss - $10000 End If End Function