🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.protocols.misc
Article #900

Re: big endians are good for networking, huh?

#900
From: Ron Natalie
Date: Wed, 25 Jan 1989 18:11
19 lines
1714 bytes
> On a 68000 or MIPSM, "up" is "right" and since the "<<" is "up" it's actually
> "right" on those machines.  In my case, if I compared "longports" to something
> extracted via the "overlay the u_long array" method, it would be different.

Untrue, C is not little endian by nature.  On the 68000 (and with every other machine
that I've seen) the bits in a word are presented as if they were a binary number.
That is, the least significant bits are on the right, the most significant on the
right.  Shifts and rotates are referenced to this.  On the 68000, the rotate left/right
instructions behave as you would expect with this implementation.  Moving in the "right"
direction moves bits towards the more significant part of the word and the "left"
direction is towards the least signficant part.

While various machines number their bits differently (for example, IBM numbers the
most significant bit 0 and the least 31, where as 68000's and VAX's use little numbers
for low order bits, and I think that the Univac numbers them from 1 rather than 0),
they all represent them as having the LSB on the RIGHT.   What makes them big or
little endian is how they map this representation into the machines address space.

-Ron
Technical Details
Message-ID: <Jan.25.13.11.16.1989.271@ron.rutgers.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!cwjcc!mailrus!tut.cis.ohio-state.edu!rutgers!elbereth.rutgers.edu!ron.rutgers.edu!ron
References: <VIXIE.89Jan25033452@bacchus.pa.dec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!cwjcc!mailrus!tut.cis.ohio-state.edu!rutgers!elbereth.rutgers.edu!ron.rutgers.edu!ron
From: ron@ron.rutgers.edu (Ron Natalie)
Newsgroups: comp.protocols.misc
Subject: Re: big endians are good for networking, huh?
Message-ID: <Jan.25.13.11.16.1989.271@ron.rutgers.edu>
Date: 25 Jan 89 18:11:19 GMT
References: <VIXIE.89Jan25033452@bacchus.pa.dec.com>
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 19