little endian and big endian(zz)
来源:互联网 发布:西方马克思主义 知乎 编辑:程序博客网 时间:2024/06/08 05:05
简而言之:
Big endian machine: It thinks the first byte it reads is the biggest.
Little endian machine: It thinks the first byte it reads is the littlest.
举个例子,从内存地址0x0000开始有以下数据
0x0000 0x12
0x0001 0x34
0x0002 0xab
0x0003 0xcd
如果我们去读取一个地址为0x0000的四个字节变量,若字节序为big-endian,则读出
结果为0x1234abcd;若字节序位little-endian,则读出结果为0xcdab3412.
如果我们将0x1234abcd写入到以0x0000开始的内存中,则结果为
big-endian little-endian
0x0000 0x12 0xcd
0x0001 0x23 0xab
0x0002 0xab 0x34
0x0003 0xcd 0x12
x86系列CPU都是little-endian的字节序.
Big endian machine: It thinks the first byte it reads is the biggest.
Little endian machine: It thinks the first byte it reads is the littlest.
举个例子,从内存地址0x0000开始有以下数据
0x0000 0x12
0x0001 0x34
0x0002 0xab
0x0003 0xcd
如果我们去读取一个地址为0x0000的四个字节变量,若字节序为big-endian,则读出
结果为0x1234abcd;若字节序位little-endian,则读出结果为0xcdab3412.
如果我们将0x1234abcd写入到以0x0000开始的内存中,则结果为
big-endian little-endian
0x0000 0x12 0xcd
0x0001 0x23 0xab
0x0002 0xab 0x34
0x0003 0xcd 0x12
x86系列CPU都是little-endian的字节序.
- little endian and big endian(zz)
- Big-endian and Little-endian
- big endian and little endian
- little-endian and big-endian
- Big endian and little endian
- Little-Endian and Big-Endian
- Big endian and Little endian
- Big Endian and Little Endian
- big endian and little endian
- Big endian and little endian
- Big endian and Little endian
- Big endian and Little endian
- little endian and big endian
- big endian and little endian
- Big endian and Little endian
- Big Endian and Little Endian
- little-endian and big endian
- Big-Endian and Little-Endian
- SQL SERVER 分页处理,自动识别标准SQL语句并生成适合分页的SQL语句
- Dojo学习笔记(6. dojo.io.IO & dojo.io.BrowserIO)
- 项目管理中的问题
- 关于薪资问题你应该知道的
- spring.net 学习一
- little endian and big endian(zz)
- 神州数码客户端alpha3版发布[神州数码认证客户端破解]
- MEPG,DAT转rmvb最好的工具 Easy RealMedia Producer应用要领
- Linux手机DIY.库文件专题.交叉编译的浮点问题
- 使用 xfire 快速发布 WebService
- TOMCAT完全攻略
- linus早期在新闻组上的Posts(03) 发贴答复关于gcc 1.40 for Minix-386的问题
- 2006网站设计风格总结分析
- 建立针对arm-linux的交叉编译环境