Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

字节存储顺序主要分为大端序(Big-endian)和小端序(Little-endian),区别如下:

  • Big-endian:高位字节存入低地址,低位字节存入高地址
  • Little-endian:低位字节存入低地址,高位字节存入高地址

例如,将12345678h写入1000h开始的内存中,以大端序和小端序模式存放结果如下:

Alt text

一般来说,x86系列CPU都是Little-endian字节序,PowerPC通常是Big-endian字节序。
因为网络协议也都是采用Big-endian方式传输数据的,所以有时也把Big-endian方式称为网络字节序。

评论