SEGGER standard for units of Memory size
In computing, the logical size of a memory is usually a power of two. The same is true in most Embedded Systems, which is memory sizes such as the size of Flash memory or RAM are usually given in units of 2^10 = 1024 bytes or 2^20 = 1048576 bytes. These have historically been call kB and MB. Unfortunately, this conflicts with the SI-System, where the k-prefix stands for 1000 (10^3) and the M-prefix represents 1000000 (10^6).
This article describes the units used by SEGGER for sizes and speeds, in manuals and on the web.
Contents
Prefixes
SEGGER has adopted the following convention on prefixes:
- k = 1000 (10^3)
- K = 1024 (2^10)
- M = 1000000 (10^6)
- Mi = 1048576 (2^20)
These are being used in also SEGGER products and documents. However, this is a process that will take some time, and older programs and documents will not be updated.
Speed units
- Always metric: Powers of 10
- kB/s = 1000 bytes per second
- MB/s = 1'000'000 bytes per second
Size units
- Typically binary: Powers of 2
- Rarely metric: Powers of 10
- KB = 1024 bytes
- MiB = 1'048'576 bytes
- kB = 1000 bytes
- MB = 1'000'000 bytes