4 ms·
10!=01 and 09!=90 The endian-ness is only the in-memory layout of the bits and has nothing to do with how VALUES are treated. 1+9=10, regardless of how those
by rkeene2 9y ago
10!=01 and 09!=90
The endian-ness is only the in-memory layout of the bits and has nothing to do with how VALUES are treated. 1+9=10, regardless of how those values are stored, similarly 1<<9=512, regardless of how the CPU internally arranges those bits. The same holds true for inverting the value, the internal arrangement of the bits is irrelevant.
Really you only care about endianness when you fail to treat numbers as numbers, for example by treating them as bytes.