Reputation: 91
If I am flipping endianess of the value 0xA1A2A3A4
I will result in 0xA4A3A2A1
.
But I don't understand why the rule seems to stop at the per-byte level. Ie if I had a single byte 0xA1
I can't flip it. It is the same for a big and little machine.
Yet if we look at 0xA1
in binary it is 10100001
and we could flip that to 01011110
but that is 0x5E
. So, I don't understand. Is endianess not about binary? Is it at the registry level (or whatever we want to call the level above binary, per-byte level)? If we have a 32 bit CPU is it actually still 8 bit registers just grouped into 4? If we operate on a single byte of 8 bits, why doesn't endianess matter?
Upvotes: 0
Views: 33
Reputation: 153
Probably because the endianess is related to the memory addresses, not to the content itself.
Endianess is the order of the bytes in the computer memory.
Upvotes: 1