🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #517

Re: two's complement and Flags (Re: arithmetic and endian history)

#517
From: MitchAlsup
Date: Tue, 03 Nov 2026 01:34
29 lines
1945 bytes
quadibloc@invalid.com (John Savard) posted:

> On Mon, 02 Nov 2026 20:00:28 GMT, MitchAlsup
> <user5857@newsgrouper.org.invalid> wrote:
> 
> >In what kind of arithmetic world does -i == i ???
> 
> Unless i=0, -i never equals i, that's true.
> 
> On the other hand, if you use that letter in it's usual meaning as a
> constant, while i doesn't _equal_ -i, i is _isomorphic_ to -i... and
> to j, -j, k, and -k, if you want to include Hamilton's quaternions.

I is just an integer.

signed char i = 0xFF;
signed char j = -i;

if( i == j ) // WTF

NEGMAX == -NEGMAX in 2-s complement.

I submit this is a lot stranger than having 2 zeros.

> Except for some specific functions that explicitly use i in their
> definitions, just about everything in mathematics would be the same if
> you consistently swapped i and -i everywhere they were used.
> 
> John Savard
Technical Details
Message-ID: <1793669667-5857@newsgrouper.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
References: <10uks4f$1dqo$1@gal.iecc.com> <2026Oct3.191827@mips.complang.tuwien.ac.at> <1791071365-5857@newsgrouper.org> <11cai8f$32ue7$1@dont-email.me> <11caljv$jeo$1@gal.iecc.com> <1793649628-5857@newsgrouper.org> <6ae8f1c8.36096890@news.eternal-september.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!newsgrouper.org!.POSTED!not-for-mail
From: MitchAlsup <user5857@newsgrouper.org.invalid>
Newsgroups: comp.arch
Subject: Re: two's complement and Flags (Re: arithmetic and endian history)
References: <10uks4f$1dqo$1@gal.iecc.com> <2026Oct3.191827@mips.complang.tuwien.ac.at> <1791071365-5857@newsgrouper.org> <11cai8f$32ue7$1@dont-email.me> <11caljv$jeo$1@gal.iecc.com> <1793649628-5857@newsgrouper.org> <6ae8f1c8.36096890@news.eternal-september.org>
Date: Tue, 03 Nov 2026 01:34:27 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <1793669667-5857@newsgrouper.org>
Injection-Info: newsgrouper.org; mail-complaints-to="newsgrouper@yahoo.com"; posting-account=user5857
Injection-Date: Tue, 03 Nov 2026 01:34:27 GMT
User-Agent: Newsgrouper/0.9.0