Fundamentals of Data Representation: Units

PAPER 2 - ⇑ Fundamentals of data representation ⇑

← Bits and bytes Units Unsigned binary →


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 = 210 B and one kilobyte is written as 1kB = 103 B.

Know the names, symbols and corresponding powers of 2 for the binary prefixes:

  • kibi, Ki - 210
  • mebi, Mi - 220
  • gibi, Gi - 230
  • tebi, Ti - 240

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 = 210 bytes = 1024 bytes. 1 mebibyte or 1MiB = 220 bytes = 1024KiB = 1,048,576 bytes


From the Specification : Units

Know the names, symbols and corresponding powers of 10 for the decimal prefixes:

  • kilo, k - 103
  • mega, M - 106
  • giga, G - 109
  • tera, T - 1012.

Note that all these k, M, G, T are all decimal and are base 10.

1 kilobyte or 1kB = 103 bits = 1000 bytes. 1 megabyte or 1MB = 106 bits = 1000kB = 1,000,000 bytes


Exercise: Choose the correct units
How many bytes are in a kilobyte?

Answer:

There are 103 = 1000 bytes in a kilobyte
How many bytes are in a kibibyte?

Answer:

There are 210 = 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 1012 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