NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Wrong Endian platform suggestions



On Mon, 08 Aug 2016 15:07:32 +0000, Riccardo Mottola wrote:
> Hi,
...
> apart that my personal feeling is that BigEndian is correct and 
> LittleEndian is wrong...

BigEndian looks best when used in protocols, yet there is
the argument that it is inconsistent in bit and byte addressing.

In little endian

   (1 << (n % (8 * sizeof(*p)) & p [n / (8 * sizeof(*p)]

always masks the nth bit of a number stored at p,
regardless of the size of the integer type pointed at by p.

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800


Home | Main Index | Thread Index | Old Index