Search code examples
addressing

Address and data lines - how to calculate storage capacity


I have been asked the following question

A memory device has 16 address lines and 64 data lines. Calculate the storage capacity of the memory in bytes and kilobytes

I know that if there are 16 address lines, there are 2^16 = 65,536 addressable locations.

How do I use the number of data lines to calculate the storage capacity?

I thought that each addressable location can store 1 bit of information so I don't understand why the datalines are relevant at all


Solution

  • One memory location stores 1 byte (this is equal to 8 bits). Easy mistake to overlook:)

    Therefore using your example:

    2^address lines = addressable locations 2^16 = 65,536 addressable locations.

    Addressable locations * data lines = accessible storage
    65,536 * 64 = 4194304 bits

    Convert to bytes
    4194304 bits= 524,288 bytes

    Convert to KB 524,288/1024 = 512 KB

    Watch out when converting bytes to KB. People often make the mistake to divide by 1,000. However, in computer science/binary code we divide by 1,024. This is because computers use binary math instead of a decimal system. So there's 1024Bytes in KB, 1024KB in MB etc. etc.