[OT] The Usual Arithmetic Confusions
Walter Bright
newshound2 at digitalmars.com
Fri Feb 4 23:49:07 UTC 2022
Amusingly, how signed division is done when a signed divide instruction is not
available is to save the signs of the operands, negate them to unsigned, do the
unsigned divide, then negate the result according to the original signs.
Unsigned operations are the core of how CPUs work, the signed computations are
another layer on top of that.
More information about the Digitalmars-d
mailing list