-
Identifying Big Endian or Little Endian Progmatically
Most (99%+) of microprocessors available to the consumer and/or embedded market are either Big Endian or Little Endian; this almost never actually matters. However, sometimes one needs to write endian specific code. Here’s how to have code identify if it’s running on a big endian or little endian machine: