From mboxrd@z Thu Jan 1 00:00:00 1970 From: graeme.russ@gmail.com (Graeme Russ) Date: Mon, 20 Feb 2012 04:19:35 +1100 Subject: How to figure out the byteorder only with one byte number? In-Reply-To: <1329661442.3226.4.camel@thorin> References: <1329661442.3226.4.camel@thorin> Message-ID: <4F412F27.8080907@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On 02/20/2012 01:24 AM, Bernd Petrovitsch wrote: > On Sun, 2012-02-19 at 20:08 +0800, Tao Jiang wrote: > [...] >> Is there some difference of the storge between BE and LE machine inside a byte? > > No. At least TTBOMK there exists no such hardware. Using SHL/SHR would tell you - SHL normally results in a multiply by 2, SHR a divide by 2. If the byte was little endian, the results would be visa-versa But I agree, I doubt there is any such hardware Regards, Graeme