Because 1024 is a power of two.
Computers do everything in powers of two because that’s the only way to represent numbers as a series of switches. It goes back to computers being made out of transistors, which are basically switches controlled by current. And those switches can be used to control other switches, etc. A computer is basically just a big pile of switches organized to perform complex functions. You feed numbers into that pile of switches by turning switches on and off (yes this is a massive oversimplification). And yes, everything is numbers. Text is numbers. Images are numbers. It’s all numbers. And they’re all base 2 numbers. Even base 10 numbers are represented internally as base 2.
Anyway, the reason memory sizes are powers of two is because to refer to a location in memory you need to say where in the memory something is and that something is a number. A number in base 2.
Latest Answers