How to figure out the byteorder only with one byte number?
From: Sri Ram Vemulpali <hidden>
Date: 2012-02-21 01:22:21
Guys, I was late to the party. But this whole discussion throughs me off. When you say byte order, it applied when the width of data is more than a byte, lets say our width is 4 bytes, a typical word length. Now how is that there will be byte order on a byte width data. Are you talking about nibble order. When you talk byte order -- either little endian or big endian, we are talking how is our data should be interpreted. Depending on order we start reading data from left or right a byte at a time. So, I am confused on your discussions. Please clarify. Thanks, Sri. On Mon, Feb 20, 2012 at 5:32 PM, THAI NGUYEN [off-list ref] wrote:
Just as an FYI, way back in the early '90s, Texas Instruments came out with a graphics processor (I believe the TMS340x0 praphics processor) that actually did do the little-ending and big-endian down to the bit level. ________________________________ From: Subramaniam Appadodharana <redacted> To: Tao Jiang <redacted> Cc: Graeme Russ <redacted>; Bernd Petrovitsch [off-list ref]; Peter Senna Tschudin [off-list ref]; kernelnewbies at kernelnewbies.org Sent: Monday, February 20, 2012 8:53:10 AM Subject: Re: How to figure out the byteorder only with one byte number? Hi Tao, On Mon, Feb 20, 2012 at 5:25 AM, Tao Jiang [off-list ref] wrote:quoted
Hi: Thank you all. Take a byte number 0b00000001 for example ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^ ? ? ? ? ? ? ^ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? high bit ? ? low bit I used to think in a LE machine it will be stored as 0b10000000 low bit first ? ? ? ? ? ?^ ? ? ? ? ? ? ^ ? ? ? ?low bit ? ? high bit and in a BE machine will be 0b00000001 high bit first ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^ ? ? ? ? ? ? ^ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? high bit ? ?low bit not only the byteorder is different, but inside a byte is also different. But actually they are the same, right?yes they are same. In fact it is termed as 'byte' order not 'bit' order. Hope this helps.quoted
Thank you. 2012/2/20 Graeme Russ [off-list ref]:quoted
On 02/20/2012 01:24 AM, Bernd Petrovitsch wrote:quoted
On Sun, 2012-02-19 at 20:08 +0800, Tao Jiang wrote: [...]quoted
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_______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies_______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies _______________________________________________ Kernelnewbies mailing list Kernelnewbies at kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Regards, Sri.