3 ms·
They are talking about bit-endianess here not the usual byte-endianess when they mention MSB-first and LSB-first. The bit-endianesss you chose greatly impacts
by BeeOnRope 9y ago
They are talking about bit-endianess here not the usual byte-endianess when they mention MSB-first and LSB-first.
The bit-endianesss you chose greatly impacts how your bit-reading loop will be implemented. In particular, if you want to use some bits, you want them in the low bits: if you write the value 42 into a 7-bit field, and then later I give you back (42 << 56) or something, you are going to be very confused: you expect to get back 42 (i.e., the return value equals 42, or to be pedantic the 7-bit field should be right-aligned in the uint32_t or uint64_t return value).
- ghusbands 9y agoOh my. You're right, I entirely misunderstood. How embarrassing. I wish I could delete my comments.