Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is byte order?

byte
0
Posted

What is byte order?

0

There are different ways how to map a multi-byte primitive to memory, disk or network. The most usual mappings (out of all [possible] permutations [e.g. totally 24 with 32-bit/4-byte integers]) are little endian byte order (encoding in ascending significance, least-significant byte is encoded first: 0 1 2 3) and big endian byte order (encoding in descending significance, most-significant byte is encoded first: 3 2 1 0). Note that most of the other permutations are not seen at all; however one-bytes ‘groups’ can be handled differently from two-bytes groups, etc. (1 0 3 2 and 2 3 0 1 in the 32bit case, sometimes called ‘mixed endian’), this is however rarely seen. Some CPUs (e.g. MIPS) can serve different endianesses (to enable compatibility to different operating systems), however usually set only at boot time.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123