• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

64 bit endianness

How does one convert a little endian float to a big endian float?

Say you have this in little endian:
0xABCD1234

What would that be in big endian?

I tried Googling for information on 64 bit endianness and had no luck. Any links to articles on the matter would be appreciated.

The answer should be one of the following:
0x4321DCBA
oxDCBA4321

Basically, are all 8 bytes flipped or are the first 4 flipped separately from the second 4 bytes?
 
First off, each hexadecimal letter is four bits worth of info, so unless you're running on a machine that addresses every 4-bit chunk of ram you won't be re-ordering hexadecimal pairs.

In other words, if the little-endian word is 0xABCD then the big-endian word is 0xCDAB.

If the little endian double word is 0xABCDEFGH then the big-endian dword is 0xGHEFCDAB.

You can easily extend the exercise for quads.
 
Back
Top