4 ms·
Was that ever really a reason for signed magnitude, or did people just make use of the 2nd representation of zero because because it was available and they coul
by lopmotr 8y ago
Was that ever really a reason for signed magnitude, or did people just make use of the 2nd representation of zero because because it was available and they couldn't be bothered putting that information in another variable or using floating point or fixed point, or anything else that would have achieved the same result?
- userbinator 8y agoI have a feeling signed-magnitude predates binary and complement arithmetic --- it is, after all, the "natural" way humans work with numbers. A lot of the early non-binary computers used some form of sign-magnitude, all the way back to punch card formats: https://en.wikipedia.org/wiki/Signed_overpunch https://en.wikipedia.org/wiki/Signed_overpunch On the other hand (no pun intended), early mechanical (decimal) manual adding machines made use of complement arithmetic too: https://en.wikipedia.org/wiki/Comptometer https://en.wikipedia.org/wiki/Comptometer https://en.wikipedia.org/wiki/Method_of_complements https://en.wikipedia.org/wiki/Method_of_complements
- Phrodo_00 8y agoTIL about signed overpunch Except the "natural" way also recognizes a single zero with no sign, so it's still not accurately modeling that. If you wanted to model natural arithmetic accurately you'd need 2 bits for the sign (positive, negative, unsigned). At that point, all of single bit signed magnitude, and complements are compromises.
- Animats 8y agoBurroughs 5xxx and 6xxx machines used signed-magnitude. Burroughs had a unique numeric representation. Numbers were 48 bits. Sign, sign of exponent, exponent, mantissa, with the binary point at the low end. Integers were thus valid floating point numbers. The math operations would maintain a value as an integer, with a zero exponent, if possible. IEEE floating point also maintains integer values as integers until they don't fit, but the representation is not integer-like.