赞
踩
MSB : 最高有效位
最高有效位(the Most Significant Bit,msb),是指一个n位二进制数字中的n-1位,具有最高的权值2^n − 1。在大端序中,msb即指最左端的位。
LSB :最低有效位
最低有效位(the least significant bit,lsb)是指一个二进制数字中的第0位(即最低位),具有权值为2^0,可以用它来检测数的奇偶性。指的是二进制最右侧的位。
(MSB)100 0011(LSB)
转:Big Endian 和 Little Endian 详解 https://blog.csdn.net/waitingbb123/article/details/80504093
对于字节序列的存储格式,目前有两大阵营,那就是Motorola的PowerPC系列CPU和Intel的x86系列CPU。
PowerPC系列采用big endian方式存储数据,而x86系列则采用little endian方式存储数据。
那么究竟什么是big endian,什么又是little endian呢?
1)Little-endian:将低序字节存储在起始地址(低位编址)
2)Big-endian:将高序字节存储在起始地址(高位编址)
以数字0xB4(10110100)用图加以说明
Big Endian
msb------------------------>lsb
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Little Endian
lsb-------------------------->msb
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。