Fundamentals of Data Representation: Units
Units[edit]
Bytes can be combined into larger units used to measure the capacity of memory or storage devices.
Historically the terms kilobyte, megabyte, etc. have often been used when kibibyte, mebibyte, etc. are meant.
From the Specification : Units Know that quantities of bytes can be described using binary prefixes representing powers of 2 or using decimal prefixes representing powers of 10, eg. one kibibyte is written as 1KiB = 2^{10} B and one kilobyte is written as 1kB = 10^{3} B. Know the names, symbols and corresponding powers of 2 for the binary prefixes:

Note that all the symbols end in an 'i', eg. Ki, Mi, Gi, Ti, and they are all binary and are base 2.
1 kibibyte or 1KiB = 2^{10} bytes = 1024 bytes. 1 mebibyte or 1MiB = 2^{20} bytes = 1024KiB = 1,048,576 bytes
From the Specification : Units Know the names, symbols and corresponding powers of 10 for the decimal prefixes:

Note that all these k, M, G, T are all decimal and are base 10.
1 kilobyte or 1kB = 10^{3} bits = 1000 bytes. 1 megabyte or 1MB = 10^{6} bits = 1000kB = 1,000,000 bytes
Exercise: Choose the correct units How many bytes are in a kilobyte?
Answer: There are 10^{3} = 1000 bytes in a kilobyte
How many bytes are in a kibibyte?
Answer: There are 2^{10} = 1024 bytes in a kibibyte
A hard disk drive has a capacity of 8TB. How many bytes of data can it store?
Answer: 8TB = 8 x 10^{12} bytes = 8,000,000,000,000 or 8 million million (a UK billion!).
How many bits in a kibibyte?
Answer: 1024 bytes in 1Ki and there are 8 bits in a byte, so 1024 x 8 = 8192 bits
