如果2³²位= 40亿位而不是字节,那么32位如何寻址4GB? [英] How does 32-bit address 4GB if 2³² bits = 4 Billion bits not Bytes?

查看:125
本文介绍了如果2³²位= 40亿位而不是字节,那么32位如何寻址4GB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从本质上讲,4Gb如何变成4GB?如果内存正在寻址 Bytes ,可能性是否应该为2 (32/8)?

Essentially, how does 4Gb turn into 4GB? If the memory is addressing Bytes, should not the possibilities be 2(32/8)?

推荐答案

这取决于您如何处理数据.

It depends on how you address the data.

如果使用32位寻址每个 bit ,则可以寻址2 32 位或4Gb = 512MB.如果像大多数当前体系结构一样处理 bytes (字节),它将为您提供4GB.

If you use 32 bits to address each bit, you can address 232 bits or 4Gb = 512MB. If you address bytes like most current architectures it will give you 4GB.

但是,如果要处理更大的块,则需要较少的位来寻址4GB.例如,如果您寻址每个512字节块(2 ^ 9字节),则可以使用23位寻址4GB. FAT16 使用16位来寻址(最大)64KB群集,因此可以寻址最大4GB体积. Java中也使用了相同的方法压缩的操作,您可以在其中使用32位引用寻址32GB的内存.

But if you address much larger blocks you will need less bits to address 4GB. For example if you address each 512-byte block (2^9 bytes) you can address 4GB with 23 bits. FAT16 uses 16 bits to address (maximum) 64KB clusters and therefore can address a maximum 4GB volume. The same is used in Java Compressed Oops where you can address 32GB of memory with 32-bit reference.

某些较旧的体系结构甚至使用字可寻址的内存,而不是像当今大多数字节那样使用字节.具有大于八位字节的最小可寻址单元的现代体系结构主要出现在DSP中.还有一些具有位可寻址内存的架构,例如Intel 8051

Some older architectures even use word-addressable memory instead of byte like most do nowadays. Modern architectures that have a minimum addressable unit bigger than an octet are mainly found in DSPs. There also a few architectures with bit-addressable memory like Intel 8051

这篇关于如果2³²位= 40亿位而不是字节,那么32位如何寻址4GB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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