为什么RAM以2的幂数表示? [英] Why is RAM in powers of 2?

查看:104
本文介绍了为什么RAM以2的幂数表示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么RAM的数量总是2的幂?

Why is the amount of RAM always a power of 2?

512、1024等

具体来说,Android模拟器使用512、768和1024 RAM有什么区别?

Specifically, what is the difference between using 512, 768, and 1024 RAM for an Android emulator?

推荐答案

内存与CPU紧密相关,因此使其大小为2的幂 意味着可以打包多个模块,而所需的逻辑最少 为了在它们之间切换;最后只需要一点点 被检查(因为大小的二进制表示是1000 ... 0000 不管它的大小如何)而不是更多的位数,这不是一种力量 的两个.

Memory is closely tied to the CPU, so making their size a power of two means that multiple modules can be packed requiring a minimum of logic in order to switch between them; only a few bits from the end need to be checked (since the binary representation of the size is 1000...0000 regardless of its size) instead of many more bits were it not a power of two.

硬盘驱动器未绑定到CPU,并且没有以相同的方式打包, 因此不需要其大小的准确性.

Hard drives are not tied to the CPU and not packed in the same manner, so exactness of their size is not required.

来自.谢谢布拉吉!

这篇关于为什么RAM以2的幂数表示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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