Question 4 Chapter 4 How many bits are required to address a
Question 4 (Chapter 4)
How many bits are required to address a 4M × 16 main memory if
a) Main memory is byte-addressable?
b) Main memory is word-addressable (Note each word is 16 bits in size)?
Solution
Please follow the data and description :
4M x 16 main memory :
Here 4M x 16 refers to the size 64Mb of memory that implies 67108864 bytes of data or 33554432 words where a word is usually of 2 bytes.
a) For Main memory is byte-addressable :
So calculating the data,
4M * 16 = 2^2 * 2^20 * (2^4 / 2^3) As considered 16 bits / 8 bits is a byte.
we have,
2^2 * 2^20 * 2^1 = 2^23
So from the power of 2 it implies that the number of bits that are required to address a 4M x 16 main memory if so a main memory is byte-addressable is => 23 bits.
b) For Main memory is word-addressable :
As given, assuming a word is of 16 bits or simply a 2 bytes long. We could calculte as,
4M * 16 = 2^2 * 2^20 * (2^4 / 2^4) As considered 16 bits / 16 bits is a word.
We have,
2^2 * 2^20 * 2^0 = 2^22
So from the power of 2 it implies that the number of bits that are required to address a 4M x 16 main memory if so a main memory is word-addressable is => 22 bits.
Hope this is helpful.
