system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why does memory come in specific sizes? (i.e.8 GB, 16 GB, 32 GB, 64 GB, etc)?

Sorry if it's a newb  question, I just want to know.

And memory is in the ones on SD cards, MicroSD cards, harddrives, etc.

Thanks!
gpt
Memory takes more than just the physical space. You also have some sort of controller which takes read and write request and applies them to the memory. This controller handles the address of the memory you want to access.

Every byte must be accessible, so they need an address.

You controller will handle a certain amount of bit for an address.

If your physical memory is just 2 bytes, 1 bit of address will be enough. The first byte could be addressed with a 0 and the second with a 1.

If you now add a bit to your address you can address 4 different bytes as:

* 00
* 01
* 10
* 11

If you add another bit to the address you can already access 8 bytes. This is exponentioal growth with 2^x where x is the amount of bits available.

At 30 bit of address you can access up to 1gb of memory. With 31 you can access 2gb of memory... etc. Since every bit you process for addresses doubles the possible access space you get those 1,2,4,8... numbers.

Now why waste valuable address space by not having the possible physical amount? You would also have to handle the possiblity, that the computer will send you an address which will still use only as many bits as your memory expects but at the same time lies outside of the physical memory. That sort of exception has to be handled aswell. Every non 2^x value needs his own controller which knows the max limit for his address space. It is easy to generally just ignore additional bits after a certain one (for example you can just ignore the last bits and start from the beginning). This isn't so easy to do when you have to check if it is bigger than a specific 1-0 sequence.

That specificly built controller is probably more expensive for the manufacturer than just build in a bit more of memory especially since more memory will also sell better.