Why is 1 kB commonly said to be 1024 bytes instead of 1000 bytes?

Answer:
"kB" or "KB" can mean either 1024 bytes or 1000 bytes, depending on who you ask. Both meanings have been in use since the early days of computing, confusing users ever since.

Memory addresses in computers are a number of bits wide. For instance, the old 6502 microprocessor had memory addresses 16 bits 'wide'.

With 10 bits, for instance, a computer can address 210 which is 1024 memory locations. With 16 bits, a computer can address 216 memory locations. So the number of memory locations is always a power of two. It makes the most sense to make memory chips that use up all of these addressable locations.

Officially, 1000 is the only valid meaning, and "k" was used by engineers for 1024 just as an approximation. (2048 bytes is equal to 2.0 kB, after all.) Over time, this approximation became used by marketing types as if it was actually defined as 1024, rather than just being used as an approximation. In 1968, for instance, Donald Morrison talked about how it was confusing to tell laymen that doubling a 32K memory produced a 65K memory. He proposed to end the confusion by using the Greek letter κ to mean 1024, but this never stuck. Instead, people started using capital K to mean 1024, which further increased confusion instead of helping.

Nowadays however, there is a new prefix to be used for the non-standard meaning:

  • 1 KiB is 1 kibibyte is 1024 bytes
  • 1 kB is 1 kilobyte is 1000 bytes

So too for the old megabyte which was 220 bytes:

  • 1 MiB is 1 mebibyte is 220 bytes
  • 1 MB is 1 megabyte is 1,000,000 bytes.

Higher units like terabyte were already used with the 1000x meaning except in rare cases.
Simplicity.

Your basic transistor, the foundation for all things computer, has 2 states (on/off), which is known as binary. So computers of all types use the binary numbering system (0/1 = off/on) made sense. 2 to the 10th power is 1024. It's easier to say "1k" instead of 1024.
1 kilo is normally 1000, as per the metric system's prefixes.

One would expect a kilo of bytes to be 1000 bytes ... but it's 1024 usually.

This is because 1024 is 2^10 (2 to the 10th power), conveniently close to 10^3 (1000). In computers, base-2 shows up over and over again.

In this case, the next higher size of memory chips was often 2x or 4x the previous size. This pulled folks away from the normal base-10 thinking toward base-2 thinking ... and we ended up with something that sounds like it is based on powers of 10, but is really based on powers of 2.

So, 1 kilobyte are 2^10=1024
1 megabyte is not 1000x1000, but instead 1024x1024 or 2^20
and 1 gigabyte is 1024 megabytes
and so on (terabytes, petabytes ...)

Note: There are comments associated with this question. See the discussion page to add to the conversation.
First answer by Speicus. Last edit by Beepboop. Contributor trust: 69 [recommend contributor recommended]. Question popularity: 32 [recommend question].