[ad_1]

Why does digital storage always have the same values eg. 32gb, 64gb, 128gb, 256gb etc. and why do they double every time they go up in size? Is this a limitation or just a standard?

In: Technology

[ad_2]

As you probably know digital computers and storage are implemented using binary logic circuitry and this makes it convenient to work with numbers that are powers of two. In the case of storage, adding 1 bit to the range of your addressable storage also doubles the storage size. It is probably also convenient for the circuit layout to simply widen or mirror in a symmetric way (two paths instead of one, two blocks instead of one) existing structures rather than create new ad-hoc structures to deal with odd amounts of storage…

EDIT: I completely missed that this is an ELI5. Ignore.

It all comes down to bits, and simplicity.

There’s no reason an arbitrary amount of storage can’t be used. You could arrange however many memory cells in whatever configuration you want for as much storage as you need. But how do you actually find what you’re looking for?

That process is called “addressing”. Basically each bit that gets stored has its own address to tell the system where it lives.

There’s a lot of different ways to go about having an address and finding the exact place that memory lives, but since we’re dealing with circuitry, it’s very simple to deal with branches of 2.

Imagine you’re given a set of directions for a trip like this: “left, right, left, left, right”. You just need to follow the road until you reach each fork, and take the path the directions say to take.

The same thing happens for memory addressing — each 1 or 0 in the address corresponds to a choice for which block to look at as you get closer and closer to the actual storage place. The first directions will usually refer to which chip group, then which chip within the group, then which bank within the chip, and so on… until the divisions get down to a small enough level to actually find the exact place where the bit is stored. (the memory/storage controller actually usually stops before this and works with a larger group of bits, but this is the general idea)

For simplicity and efficiency, it’s rare to have storage that doesn’t have all of the routes populated along the way. That’s why the storage capacity will be a power of 2, since adding more storage really is just a matter of doubling and doing the exact same thing, just with another layer.

Computer technology is built on binary logic. Binary means there are only two values, similar to how a light switch has only on or off. This is how computers do math, they use two values 0 and 1. In math you would call that base two math. So instead of counting to 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 before you get to 10, 11, 12, and so on, a computer counts 0, 1, 10, 11, 100. Every time you add a 1 to the front, it doubles the value. So if we compare binary with counting to 10, the vales are 0=0, 1=1, 10=2, 11=3, 100=4, 101=5, 110=6, 111=7, 1000=8, and so on.

These binary numbers are called bits. Every time you have another bit, you double the number you can count up to with binary. Eight bits make a byte. So when you get more bytes of storage the number gets bigger.

If you double numbers they go 1, 2, 4, 8, 16, 32, 64, 128, 256, and so on. This is why you always see these numbers when they talk about speed, memory, or storage. It’s the language of computers.

And to answer the second part clearly, it is limitation. They have made computers with “fuzzy logic” that can have more than two values, but it’s really hard to communicate more than on/off signals between computers or to write on a disk accurately. So binary is the language of choice.

Lots of great answers, but to go even more for kids, let’s say you have 8 light switches. This means you can count from 0 to 8 pretty easy. But computers are super good at adding. What if instead of each being worth one, we make them worth 1, 2, 4, 8, 16, 32, 64, and 128? Now by flipping those 8 light switches on and off I can represent any number between 0 and 255. (Remember the original Zelda game out at 255 rupees? Yes, I’m old…)

So the next step is obviously to add another light switch, but we don’t have to start at the beginning. The next switch can be worth 256 so now I can represent any number between 0 and 511, the next switch takes me to 1023, and the one after that will take you to 2047. We’ll keep adding more and more switches until we can store all the cat pictures…

Read the other answers about powers of two. But with flash technology today there’s no need to stay with those standard sizes apart from tradition. The storage has to have spare capacity to deal with defects and failures so a 1GiB drive has slightly more storage than that internally. With SSDs you can get sizes like 200GB, 240GB and 256GB. Spinning disks have had sizes like this for even longer. Even the early floppy disks were multiples of 360 or 400kiB.

So, tradition, and having a common set of sizes for all manufacturers makes it easy for consumers to compare value.

In addition to all the other answers I’d just like to point out that this is not always the case. For example in graphics cards it’s quite common to see 3 or 6GiB or 12GiB of VRAM capacity. In this case it’s because some GPUs have a 192 bit memory bus (it’s a half-way step between 128bit and 256bit) and use (usually) one memory chip for each 32bit slice. So you end up with 6*32bit memory chips. You can then pick e.g. 512MiB or 1GiB sizes for each chip, ending up at 3 or 6GiB respectively.

GPUs in general have quite interesting interface widths: 64, 128, 192, 256, 320, 384 bit are all common. Combine this with the fact that most memory chips have a 32bit interface and you end up with total memory capacities like 12GiB (192bit/32bit*2GiB) or 10GiB (320bit/32bit*1GiB). Interface width is also the main reason why high end models usually have more VRAM and higher bandwidth. They just use more memory chips in parallel. But it is more expensive to do so.

Memory subsystems typically have an internal organization. So memory controllers have to perform very quickly some address arithmetic for each memory access, where the physical address of the memory access can be found in the internal organization of the memory.

As an analogy: You have got a city consisting of districts. Each district has 100 streets. Each street has 100 houses. Each house has 100 inhabitants. Now you can easily find the global id of each inhabitant with the following formula:

District_id * 100 * 100 * 100 + Street_id * 100 * 100+ House_id * 100 + Inhabitant_in_house_id

And if we put in some values for the ids:

3 * 100 * 100 * 100 + 13 * 100 * 100 + 51 * 100 + 23 =

3000000 + 130000 + 5100 + 23 =

3135123

Also if you know the global id of an inhabitant you can also easily inverse this computation to find its district_id, street_id, house_id and Inhabitant_in_house_id, which is similar to what a memory controller has to do for every memory access. As you notice, computing this in base ten if the structural units of the city are base also 10^n is easy. However, let us assume the same example with structural units not being base 10:

District_id * 123 * 103 * 121 + Street_id * 103 * 121 + House_id * 121+ Inhabitant_id

Putting in the same values from above:

3 * 123 * 103 * 121 + 13 * 103 * 121 + 51 * 121+ 23

As you can obviously see you cannot you cannot simply compute this in your head anymore, and inverting this even becomes more difficult. Since computers operate with base 2, they suffer the same problems if their memory does not have an internal organization of base 2.

As an interesting side note, there are cases where another factor than 2 is involved in the organization of the memory, e.g. GPUs having a memory size being the multiple of 3, e.g. 6 Gigabyte. Because of that, those GPUs have to do some nasty mathematical tricks for mapping their physical addresses to locations in their memory.

The answer is cost. Let’s say you have a recipe for a doughnut. With the recipe for one, it’s easier to make two and four and the multiples so on but difficult for the values inbetween. Now imagine this for hundreds of thousands of storage devices. Would you make facilities for fixed, easier to manufacture versions? Or would you spend millions to make a three and a half quarter disk?

A lot of answers here are leaving out a very important detail. Most software and Virtual Memory managers work off powers of two. For example a page size on a modern machine is 4KiB (can be larger but large page sizes aren’t used much) and for efficiency most operations are done in blocks of that size. There is a ton of little details I’m leaving out but just keep in mind software plays an important role as well.

It’s because it’s based on multiples of two: 2,4,8,16,32… (base 2 mathematics) instead of multiples of 10, which is our standard human number system (base 10 mathematics). Computers use base 2 mathematics essentially because of binary code (where everything is a 1 or a 0). There’s a ton more I could get into such as exponents etc, but that should suffice for a 5 year old.