Skip to content
Archive of posts tagged cpp

Endianness: Big Endian vs. Little Endian; Shifting and Casting Examples

Background I ran into a bug recently where I was trying to extract the lower 32 bits from a 64 bit pointer referencing two contiguous 32 bit variables in memory.   They were taken out opposite what was expected due to my confusion with the way data is stored.  There is a fairly good writeup […]