Types of endianness

后端 未结 8 1261
情话喂你
情话喂你 2020-12-04 22:57

What is the difference between the following types of endianness?

  • byte (8b) invariant big and little endianness
  • half-word (16b) invariant big and litt
8条回答
  •  孤城傲影
    2020-12-04 23:37

    There's also middle or mixed endian. See wikipedia for details.

    The only time I had to worry about this was when writing some networking code in C. Networking typically uses big-endian IIRC. Most languages either abstract the whole thing or offer libraries to guarantee that you're using the right endian-ness though.

提交回复
热议问题