Following snippet run on a VAX
HERMES> type ENDIAN.PLI
endian: proc options(main);
dcl bs bit(16) initial('0010000000000000'B);
dcl fb fixed bin(15) defined(bs);
put skip list(fb);
HERMES> run endian
>From: firstname.lastname@example.org [mailto:email@example.com]
>Sent: Tuesday, November 25, 2003 6:05 AM
>Subject: Re: Backwards File Dump
>In article <bpvadl$1td2vf$1@ID-120847.news.uni-berlin.de>, "John
>Travell" <firstname.lastname@example.org> writes:
>> "Tom Linden" <email@example.com> wrote in message
>>> The fact of the matter is that if I overlay a 16 bit integer on
>>> the the bit string '0000000000000010'B on a Big endian machine
>>> it displays as 2. If I do it on a little endian it displays as
>> No, you have it backwards.
>> A LITTLEendian machine '0000000000000010'B as 2
>> to BIGendian this is 2**14
>Little endian. First bit low order. '0100000000000000'B = 2.
>Big endian. Last bit low order. '0000000000000010'B = 2
>>> It is customary to associate left with most significant and right
>>> with least.
>> Yes, in LITTLEendian. BIGendian has left=LSB, right=MSB.
>In both big endian and little endian, integers are generally presented
>with msb left and lsb right.
>In little endian, bit strings may be displayed with first bit left
>and last bit right. When aliased as binary coded integers, this
>means that the same display will have lsb left and msb right.
> John Briggs
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.542 / Virus Database: 336 - Release Date: 11/18/2003
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.542 / Virus Database: 336 - Release Date: 11/18/2003
||11/25/2003 3:00:14 PM