Re: How to figure out the byteorder only with one byte number?

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

 




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 <c.a.subramaniam@xxxxxxxxx>
To: Tao Jiang <jiangtao.jit@xxxxxxxxx>
Cc: Graeme Russ <graeme.russ@xxxxxxxxx>; Bernd Petrovitsch <bernd@xxxxxxxxxxxxxxxxxxx>; Peter Senna Tschudin <peter.senna@xxxxxxxxx>; kernelnewbies@xxxxxxxxxxxxxxxxx
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 <jiangtao.jit@xxxxxxxxx> wrote:
> 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.
> Thank you.
>
>
>
> 2012/2/20 Graeme Russ <graeme.russ@xxxxxxxxx>:
>> 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
>>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux