A byte
is 8 bits
. If it's byte
addressable, you can't reference an address by anything other than the start of some 8 bits
. That is, in a 2^2
byte
memory, you have 4 bytes
. The lowest address starts at 0 bytes
, and the highest address starts at 3 bytes
. (0, 1, 2, 3 = 4 bytes total)
If the bytes are contiguous (they are juxtaposed- touching each other rather than spread out) then you can fit all 4 bytes into a 4 byte memory perfectly.
a)
If you have 2^24
bytes
then you have 2^(24 + 3)
bits
because you're doing (2^24 * 2^3) = 2^(24+3)
. Thus you have 134,217,728 total bits
.
The highest address would be one byte before the end, so the address at 2^24 - 1
. Note that it's 2^24 - 1
and not 2^27 - 1
because you are addressing it by bytes
and not bits
. Lowest address would be 0.
Lowest address = 0
Highest address = 2^24 - 1
b)
A word
just means a grouping of bytes
. A 1-byte
word
is literally the same thing as a byte
, it just implies that the word
is some meaningful piece of data, whereas a byte
is not necessarily a meaningful piece of data.
A 16-bit
word
== a 2-byte
word
because 8 bits
are in a byte
, thus if you have 2^24
bytes
available, you only have a total of 2^23
words
.
Lowest address = 0
Highest address = max number of words - 1 = 2^23 - 1
.
c)
Same thing as with a 4-byte
word instead of 2. Thus:
2^22 bytes available
to store words.
Lowest address = 0
Highest address = max number of words - 1 = 2^22 - 1
.
Feel free to correct me if you see any errors. Hope I helped.