0
votes

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

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

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).

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.

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

Is this the proper way of doing this?

2
Values don't "take up" address space. You've got 2^32 mailboxes, with 64 on/off switches stored in each of them. How many switches have you got in total?doynax

2 Answers

2
votes

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.

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.

0
votes

You are taking 32 bit address which means 2^32 bits can be addressed but if you want how many bytes can be address then just divide it like 2^32/8=2^29 because 1 byte have 8 bit and if you want how many words can be addressed then 2^29/8 because 1 word contains 8 bytes so 2^26 words can be addressed.

And since one word is 8 byte so we can address (2^26)*8 bytes. Hope it might help!