storage sizes

A bit (short for binary digit) is the smallest unit of data in a computer. It can represent a 0 or 1, forming the basis of binary code. A byte consists of 8 bits and is used to represent a single character, such as a letter or a symbol. For example, the letter 'A' in ASCII is stored as one byte.

size abbreviations

why there are two different size names (one with the i and one without, eg MiB vs MB)

The difference between decimal and binary measurements exists because decimal prefixes (e.g., kilo, mega) are standard in the SI system, while binary prefixes (e.g., kibi, mebi) are used in computing for precision.

wait there is another naming convention? (MB vs Mb)

Yes there is, when you specify a lowercase b the size is measured in bits rather than in bytes, a common use of this is measured on the network, for example I just tested my internet speed and it was measured at 97 Mbps so that means

Common C++ data types and their typical sizes (may vary by system)


edit this page