Endianness for length shorter than word but more than a byte

43 views Asked by At

There are 3 fields in a 4bytes of a packet of length 8, 12 and 12 bits. Each field should be encoded in little endian format. How do I reliably encode fields which are shorter than a word? Is reversing the bit the only option?

-- Thanks.

0

There are 0 answers