At 2:52 Mike refers to the storage as little-endian representing the integer 8. However the 08 is stored in the leftmost byte, so this would make the representation big-endian. In fact Mike contradicts the initial statement almost immediately by saying if it was little-endian that it would be stored in the rightmost byte. This is a bit confusing. In any case it doesn’t strike me as being a particularly good example as Intel machines and current Apples (to the best of my knowledge) both store integer values from the right and are hence little-endian. While this might not be a major issue for most users, it may be relevant if they are trying to decipher a hex dump while debugging.
That’s incorrect. Little endian puts the least significant byte first which would be 08
in this case.
https://godbolt.org/z/AVyj7x
This is the actual mistake. Thanks for bringing it up.
Fair enough, I misunderstood the initial statement, my bad. In my younger days I used to work on IBM mainframes, so looking at memory dumps where the least significant byte is to the right (highest memory address) feels natural to me. Apologies if I added to the confusion. It might be best if you remove this question so that I don’t confuse others.
I’m sure some will like knowing history like that .
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.