Endianness is an essential concept for Processors, and it often causes some terrible problems for programmers. This article briefly introduced the Endianness by a figure from GAMES104. What’s more, I know a Divide and Conquer method to reverse bits with O(1) for both space and time, so I modified and thus applied this method for reversing Endianness. The C++ code will be attached at the end.

Continue reading