不同字节序的好处是什么? [英] What are the benefits of the different endiannesses?

查看:71
本文介绍了不同字节序的好处是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么某些处理器制造商决定使用

Why did some processor manifacturers decide to use


  • 小尾数

  • 大尾数

  • 中间字节序

  • 还有其他人吗?

  • Little endian
  • Big endian
  • Middle endian
  • Any others?

我听说使用大尾数法可以更快地发现数字是否为正或负,因为该位是第一个。 (在现代CPU上这无关紧要,因为不再可以访问单个位。)

I've heard that with big endian one can find out faster, if a number is negative or positive, because that bit is the first one. (This doesn't matter on modern CPUs, as individual bit can't be accessed anymore.)

推荐答案

endianness是变量可以使用相同的地址读取为任意长度。

The benefit of little endianness is that a variable can be read as any length using the same address.

例如,可以将32位变量读取为8位或16位变量而无需更改地址。这几天的收益可能有限,但是在汇编程序和有限的内存时代,这可能是一个显着的优势。

For example a 32 bit variable can be read as an 8 bit or 16 bit variable without changing the address. This may have limited benefit these days, but in the days of assembler and limited memory it could be a significant advantage

这篇关于不同字节序的好处是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆