4 ms·
Pushing it off to the negatives does not solve the issue of overflow.
by reificator 7y ago
Pushing it off to the negatives does not solve the issue of overflow.
- deleted 7y ago[deleted]
- xxs 7y ago> Pushing it off to the negatives does not solve the issue of overflow. it allows for comparison with errors. Working with unsigned numbers is error prone... and I started with 6502 that didn't have signed numbers. The idea is preventing the overflow by being able to check for negatives easily. Having negative gold is likely better than leaving someone with 4billons of. For instance stuff like "max(0, balance)" just doesn't work with unsigned ones.
- dTal 7y agoIf the domain is known to be positive, you can use the sign bit as an overflow flag.