🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.protocols.misc
Article #901

Re: big endians are good for networking, huh?

#901
From: Ron Natalie
Date: Thu, 26 Jan 1989 17:08
24 lines
1909 bytes
[ Some kind people pointed out that in addition to some wierd margin sizes
  I inadvertently messed up right and left a couple of times.  This is a
  reviced posting ]

> 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
"left" direction moves bits towards the more significant part of the
word and the "right" 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.
Technical Details
Message-ID: <Jan.26.12.08.34.1989.670@ron.rutgers.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!tut.cis.ohio-state.edu!rutgers!elbereth.rutgers.edu!ron.rutgers.edu!ron
References: <VIXIE.89Jan25033452@bacchus.pa.dec.com> <Jan.25.13.11.16.1989.271@ron.rutgers.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!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.26.12.08.34.1989.670@ron.rutgers.edu>
Date: 26 Jan 89 17:08:38 GMT
References: <VIXIE.89Jan25033452@bacchus.pa.dec.com> <Jan.25.13.11.16.1989.271@ron.rutgers.edu>
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 24