当前位置: 代码迷 >> 汇编语言 >> 存储器编址单位?解决办法
  详细解决方案

存储器编址单位?解决办法

热度:2175   发布时间:2013-02-26 00:00:00.0
存储器编址单位??
引用:在一个给定的构架中,连续的地址值对应连续的存储器单位;该单位就是编址单位。在大部分计算机中,这个单位或者是一个字符(例如:字节)或者是一个字(少部分计算机也使用位(bit)编址单位)。如果单位是字,那么用指定长度的地址就可以访问较大数量的存储空间。另一方面,如果单位是字节,那么就可以访问单个的字符 (i.e. selected during the memory operation)。

为什么大部分计算机要用字节或字作为编制单位呢??怎么不用位(bit)??这样不是可以操作每一位的0还是1的状态么

------解决方案--------------------------------------------------------
探讨
引用:在一个给定的构架中,连续的地址值对应连续的存储器单位;该单位就是编址单位。在大部分计算机中,这个单位或者是一个字符(例如:字节)或者是一个字(少部分计算机也使用位(bit)编址单位)。如果单位是字,那么用指定长度的地址就可以访问较大数量的存储空间。另一方面,如果单位是字节,那么就可以访问单个的字符 (i.e. selected during the memory operation)。

……

------解决方案--------------------------------------------------------
用bit不利于跟高级语言变量类型对应。 比如说一个c语言中的char类型,对应二进制的8bit,很方便寻址,如果寻址单位以bit为单位,那么就需要做8次memory寻址才能读出一个char类型,效率太低,严重影响系统性能。

建议看看处理器架构类的书就明白了。
------解决方案--------------------------------------------------------
The size of a byte was at first selected to be a multiple of existing teletypewriter codes, particularly the 6-bit codes used by the U.S. Army (Fieldata) and Navy. A number of early computers were designed for 6-bit codes, including SAGE, the CDC 1604, IBM 1401, and PDP-8. Historical IETF documents cite varying examples of byte sizes. RFC 608 mentions byte sizes for FTP hosts as the most computationally efficient size of a given hardware platform.[5] In 1963, to end the use of incompatible teleprinter codes by different branches of the U.S. government, ASCII, a 7-bit code, was adopted as a Federal Information Processing Standard, making 6-bit bytes commercially obsolete. In the early 1960s, AT&T introduced digital telephony first on long-distance trunk lines. These used the 8-bit µ-law encoding. This large investment promised to reduce transmission costs for 8-bit data. IBM at that time extended its 6-bit code "BCD" to an 8-bit character code, "Extended BCD" in the System/360. The use of 8-bit codes for digital telephony also caused 8-bit data "octets" to be adopted as the basic data unit of the early Internet. Since then, general-purpose computer designs have used eight bits in order to use standard memory parts, and communicate well, even though modern character sets have grown to use as many as 32 bits per character
------解决方案--------------------------------------------------------
貌似在高级语言出来之前,字节就已经有了吧?

探讨

用bit不利于跟高级语言变量类型对应。 比如说一个c语言中的char类型,对应二进制的8bit,很方便寻址,如果寻址单位以bit为单位,那么就需要做8次memory寻址才能读出一个char类型,效率太低,严重影响系统性能。

建议看看处理器架构类的书就明白了。
  相关解决方案