Serialize each unit in the declared byte order
03Big-endian writes a 16-bit unit’s higher-order byte first. Little-endian writes its lower-order byte first; it does not reverse the order of the code units.
The same ordered units D808 DF45 become bytes 08 D8 45 DF. Reversing the whole four-byte sequence would be a different, wrong operation.
Source for this drawing: RFC 2781 · Read RFC source: § 3.1 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
The RFC’s numeric unit 0102 serializes as bytes 01 02 in big-endian and 02 01 in little-endian.
- The RFC’s numeric unit 0102 serializes as bytes 01 02 in big-endian and 02 01 in little-endian.
- A surrogate pair stays high unit then low unit in either byte order. Only the two bytes within each unit exchange order.
- A byte-order label describes the wire serialization, not the processor’s native hardware order.
Field widths are schematic. A code point, a 16-bit code unit and an eight-bit byte are different objects. No assumption about host memory order is needed for these chosen serializations.
Read the RFC section ↗