-2

Forgive me for being naive to ask this question.

How can 4 GB be equal to 32 bits memory address? If i am not mistaken, 4GB * 1024 * 1024 * 1024 = 4,294,697,296 bytes of memory cells. So, why we don't multiply this with 8 in order to bring it down to bits provided that 1 byte = 8 bits.

4
  • There is NO addresses of bits. There exists addresses for bytes only. So we must count and address bytes, not bits. So we must not multiply by 8.
    – Akina
    Aug 1, 2018 at 7:29
  • Read this answer and comments.
    – gronostaj
    Aug 1, 2018 at 7:31
  • So, why we say that 32 bits have 4,294,697,296 memory addresses? While infact, 2^32 bytes = 4,294,697,296
    – Qureshi
    Aug 1, 2018 at 7:38
  • 32-bit address can store 2^32 = 4,294,697,296 different addresses. Each value addresses a single byte => 4GB. There was a exact duplicate of this before but I can't find it to close this question
    – phuclv
    Aug 1, 2018 at 8:12

1 Answer 1

2

Because it makes no real sense to address memory on a bit by bit basis. It is a lot faster and more efficient to request a byte of memory at once rather than requesting each bit individually.

The internal operation time to process data in a CPU is measured in nanoseconds. The time taken to select a memory address, wait for the data at that address to appear at the bus and then to be usable is upwards of microseconds (several orders of magnitude slower).

Given that you would have to have 8 times the delay of getting a full byte of usable data if you use bit addressing it places an unreasonable amount of extra work and delay on getting data. All the while you are waiting on bits of data to arrive your program is effectively stalled.

By using a larger basic unit (the byte) we reduce the time for data access by a bit less than an order of magnitude and transfer more useful data at once.

That would have been the original reason for the choice of memory addressing using bytes.

We still use byte addressing for the sake of simplicity, it is still a very useful small block of data, but modern memory now transfers larger blocks of data in bursts to maintain the performance as we have gone beyond the point where transferring single bytes is "efficient".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .