在字寻址系统中使用32位地址进行内存访问 [英] Memory Access using 32 bit address in a word-addressable system

查看:61
本文介绍了在字寻址系统中使用32位地址进行内存访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是在检查以确保我对内存访问的工作方式有正确的了解.

I'm just checking to make sure I have a proper understanding of how memory access works.

说我有一个带有64位单词的单词可寻址存储系统.
使用32位地址大小可以访问多少内存?

Say I have a word-addressable memory system with 64-bit words.
How much memory could be accessed using a 32-bit address size?

64位字是8个字节,因此我们要处理8个字节的字.
一个8字节的字最多可容纳2 ^ 8(256).

A 64 bit word is 8 bytes, so we're dealing with an 8 byte word.
An 8 byte word can hold up to 2^8 (256).

鉴于我们有一个32位地址,所以我们有2 ^ 32,但是由于每个字占用了其中的256个字节,因此(2 ^ 32)/256 = 1677216字节.

Given that we have a 32 bit address, we have 2^32, but since each word is taking up 256 of those, (2^32)/256 = 1677216 bytes.

用公制术语表示,我们有2 ^ 24 =(2 ^ 4)*(2 ^ 20)= 16 Mb.

To put that into metric terms, we have 2^24 = (2^4) * (2^20) = 16 Mb.

这是这样做的正确方法吗?

Is this the proper way of doing this?

推荐答案

32位地址提供了4,294,967,296个可能的地址.如果最小的可寻址元素是一个64位== 8字节的字(相对于一个字节),那么可寻址空间的总量将是4,294,967,296 x 8 = 34,359,738,368字节= 34GB.

A 32 bit address provides 4,294,967,296 possible addresses. If the smallest addressable element is a 64 bit == 8 byte word (versus a byte), then the total amount of addressable space would be 4,294,967,296 x 8 = 34,359,738,368 bytes= 34GB.

关于8字节字的容量,它是8字节,而不是2 ^ 8 = 256字节.

As for the capacity of an 8 byte word, it's 8 bytes, not 2^8 = 256 bytes.

请注意,某些旧计算机确实具有仅寻址单词的基本寻址系统.字节访问需要一个字节索引或相对于基于字的地址的偏移量.我认为当前没有任何计算机使用这种方案.

Note some old computers did have a basic addressing system that only addressed words. Byte accessing required a byte index or offset from a word based address. I don't think any current computers use such a scheme.

这篇关于在字寻址系统中使用32位地址进行内存访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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