1024 = 2 to the power 10. Computers use binary system where the base is 2 (0 and 1). Humans use decimal system where the base is 10. So if I have 1 byte which contains 8 bit in modern computers I can represent up to 256 different states, possibilities, values or such. 10 bits can represent 1024 states. Well..so what? What does it have to do with memory? I think memory size it's about number of bits/bytes not about number of states that bits and bytes can represent. I'm confused. What the technical benefit from thinking 1K(i)B = 1024 and not 1000 bytes?
I think I need more technical explanation maybe something related how CPU works or how data actually stores at hard drive. Not just: hey computer use binary form so we use 2^10 and not 10^2.
It has to do with memory addressing, which is done using binary numbers as well.
On a very high level, a typical memory chip works like this: it has pins of three types - address pins, data pins, and control pins. When CPU needs to read or write memory, it sets up a combination of zeros and ones on the address pins of a memory chip, sends a read or write signal to the control pins, waits a little, and then reads or writes data using the data pins.
The combination of zeros and ones placed on the address pins is called memory address. It is a binary number in the range from zero to 2n, where
n
is the number of address pins.This is how the powers of two get into measuring the capacity of memory. Conveniently, 1024 was very near 1000, so "K" was borrowed to mean 1024 when talking about memory size.
Note that measuring data sizes using binary multiples is not universal. For example, capacities of hard drives are often quoted using decimal, not binary multiples, because hard drives do not inherently use binary addressing (and the number of decimal gigabytes is higher, which helps marketing the product).