On Mon, 28 Apr 2025 16:32:40 +0000, Schmitt, Michael  wrote:

>    ...
>C: positive
>D: negative
>F: unsigned
>
>If all your code has preferred signs then it can generate more efficient code, 
>by using CLC and MVC for example instead of packed decimal instructions.
>
An "unsigned" sign is an oxymoron.

In C, if an integral type is declared unsigned, all bits of such an
object represent the magnitude, none a sign.  Packed decimal
provides no such economy of storage.  But since all digits are in
the range 0-9 and signs in A-F, the final nybble could be used in
the magnitude of an unsigned number with no ambiguity.

Even as IBM, wisely IMO, chose twos complement representation
for fixed point objects, they could have used tens complement for
packed decimal.  That would have provided a greater magnitude
range and avoided the need for a recomplement pass when the
operand complemented turned out to have the greater magnitude,
which can not be recognized until the addition is complete.

FORTRAN on the IBM 7* and some CDC computers read  blank
input fields as "-0".  no such representation is available on s/360.
This was regarded as a limitation by programmers who no longer
had a way to detect omitted data.

-- 
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to