On Oct 29, 2008, at 16:32, Mike Walter wrote:

That X2D conversion works "as expected" in rexx.  E.g. FFFF = 65535
But with SPECS X2D, FFFF = -127
Obviously, it's respecting the high order bit.
High astonishment factor.

FSVO "respecting".  There are cultural norms that ought to be
paid greater respect:

o We come from a background of 2's complement hardware.  In
  2's complement, FFFF = -1 is a plausible conversion.
  FFFF = -127 is not.

o We come from a background of Rexx.  The Rexx convention,
  FFFF = 65535 is plausible.  FFFF = -127 is not.

o I haven't checked the doc.  If X2D is limited to 2 hex
  digits, the processor ought to have reported an error on
  a 4-digit value.

Apparently the processor takes the high-order bit as a sign
and 7 other bits (but which 7?) as a magnitude.  Sign-magnitude
representation is traditional elswhere, but not among descendants
of the IBM 360.

Rationale?

-- gil

Reply via email to