Let L and B be two machines. L order its bits from LSB (Least Significant Bit) to MSB (Most Significant Bit) whil
Bit-shifting is not affected by endianness. Binary file I/O normally is, but not in your case since you are only writing a single byte.