22.10.4 Notes on Operation Results
Overflowing Digits
Overflowing digits resulting from operations are truncated.
16-bit, undefined type, and unsigned
-
65535 + 1 = 0 (Produces overflowing digits)
-
(65534 * 2) / 2 = 32766 (Produces overflowing
digits)
-
(65534 / 2) * 2 = 65534 (No overflowing
digits)
Difference in Residual Processing
The result of residual processing depends on whether the left
and right sides are signed or unsigned.
Truncated Decimal Places
Fractional values resulting from division are truncated.
-
10 / 3 * 3 = 9
-
10 * 3 / 3 = 10
Notes on Operating BCD Data
A BCD-data operation which produces overflowing digits does not
give the correct result.
|