2
$\begingroup$

I'm struggle on this practice question from this site....

Calculate the number of bits required in the address for memory having size of 16 GB. Assume the memory is 4-byte addressable.

MY QUESTION IS: what is the difference between an "address" and "the memory is 4 byte addressable"?

I understand an address would be its location in memory that is represented by bits, such as 2^n, where n is the number of bits in the address. But I'm confused about addressable in this question and how that's different than address

2^n * 4 bytes = 2^34 The solution is 32 bits

$\endgroup$
4
  • $\begingroup$ On further research I think that the address is the unique location of the memory, and the addressable is how much data can be stored at that address.... that's what I got from this site: leescomputingblog.wordpress.com/2011/12/07/… $\endgroup$ Aug 23 '20 at 13:15
  • 2
    $\begingroup$ Address is a label that identifies a memory location. The memory is $4$ byte addressable means that you have labels that refer to memory locations of size $4$ bytes. You don't have names for smaller sizes. For example, if we have a memory of $12$ bytes and the memory is $4$ byte addressable, then we can have $3$ blocks of memory to which we can assign an address. Their addresses could be Memory block 1, The glorious block 2 and Ceres. Instead of fancy long name what is common is for the addresses to be binary numbers. Since there are $3$ addresses, then we need at least $2$ bits. $\endgroup$
    – plop
    Aug 23 '20 at 13:37
  • 1
    $\begingroup$ In your problem, instead of $12$ bytes, you have $16$ GB ${}=2^{10}$ bytes. The memory is $4$ byte addressable. So, we can have $2^{10}/4=2^8$ different addresses. So, we need $8$ bits to encode all addresses. $\endgroup$
    – plop
    Aug 23 '20 at 13:41
  • 2
    $\begingroup$ @plop Make an answer? $\endgroup$ Aug 23 '20 at 15:11
8
$\begingroup$

Address is a label that identifies a memory location. The memory is $4$ byte addressable means that you have labels that refer to memory locations of size $4$ bytes. You don't have names for smaller sizes. For example, if we have a memory of $12$ bytes and the memory is $4$ byte addressable, then we can have $3$ blocks of memory to which we can assign an address. Their addresses could be Memory block 1, The glorious block 2 and Ceres. Instead of fancy long names what is common is for the addresses to be binary numbers. Since there are $3$ addresses, then we need at least $2$ bits.

In your problem, instead of $12$ bytes, you have $16$ GB ${}=2^{34}$ bytes. The memory is $4$ byte addressable. So, we can have $2^{34}/4=2^{32}$ different addresses. So, we need $32$ bits to encode all addresses.

$\endgroup$
3
  • 1
    $\begingroup$ 16GB = 2^34 bytes or I'm missing something ? $\endgroup$
    – RiaD
    Aug 23 '20 at 21:24
  • $\begingroup$ 210 bytes seems to be missing a superscript. $\endgroup$
    – Barmar
    Aug 23 '20 at 22:02
  • 4
    $\begingroup$ @plop Rejecting an edit and then making the same changes yourself instead is not typically considered good manners. I'm glad it's fixed though. $\endgroup$
    – isanae
    Aug 23 '20 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.