We concern ourselves with endianness when dealing with streaming data from serialized devices. Some devices send their payloads with the most significant bit first, others with the most significant bit last. In order to read values from the stream of data we may need to reverse the endianness. This is done before reconstructing the payload from the bits received, afterward we place the bits into data-structure. This procedure may be referred to as bit banging.
michaelpatrickmcguirejr / reversing_endianness Goto Github PK
View Code? Open in Web Editor NEWReversing the endianness of 32-bit serialized data