News for hackers. Stuff that matters.
Re:Signed Integers Are Two’s Complement by userbinator on Wednesday May 30, 2018 @11:54PM (#17193823)
I 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

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/Method_of_complements

Re:Signed Integers Are Two’s Complement by Animats on Thursday May 31, 2018 @01:55AM (#17194256)
Burroughs 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.

Re:Signed Integers Are Two’s Complement by Phrodo_00 on Thursday May 31, 2018 @01:22AM (#17194150)
TIL 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.