As you most likely know already, a single digit in binary is called a bit (short for binary digit). An eight-bit value is called a byte. A four-bit value, which is half a byte, is called a nibble.
There are also several units that we use to represent larger numbers of bits. You will probably be most familiar with these:
Name | Number of bytes | Equivalent value |
1 kilobyte (1 KB) | 1 000 | 1000 bytes |
1 megabyte (1 MB) | 1 000 000 | 1000 kilobytes |
1 gigabyte (1 GB) | 1 000 000 000 | 1000 megabytes |
1 terabyte (1 TB) | 1 000 000 000 000 | 1000 gigabytes |
1 petabyte (1 PB) | 1 000 000 000 000 000 | 1000 terabytes |
The units above are used for the sake of simplicity, as it is easy to perform the multiplication and division required to convert between the units. However, computers rely entirely on binary for their calculations, and it often makes more sense to use units that are based on this number system. You should familiarise yourself with the units below, as these are more widely used in the field of Computer Science[1].
Name | Exponent | Number of bytes | Equivalent value |
1 kibibyte (1 KiB) | 210 | 1 024 | 1024 bytes |
1 mebibyte (1 MiB) | 220 | 1 048 576 | 1024 kibibytes |
1 gibibyte (1 GiB) | 230 | 1 073 741 824 | 1024 mebibytes |
1 tebibyte (1 TiB) | 240 | 1 099 511 627 776 | 1024 gibibytes |
1 pebibyte (1 PiB) | 250 | 1 125 899 906 842 624 | 1024 tebibytes |
You need to know the names and the order (e.g. 1 GiB is 1024 times larger than 1 MiB) they come in, along with the exponents for the latter table. You do not need to memorise the number of bytes.
When you work with these units, it’s important to read all questions carefully. If you use the wrong unit, your answer will be wrong. Generally, a question asking for kibibytes, mebibytes, etc. will use numbers that divide more cleanly by 1024, whereas a kilobyte-based question will use more ‘round’ numbers. Still, read the question carefully.
[1] Unfortunately, kilobyte and kibibyte are often mixed up, misunderstood, and treated as if they are the same. The general understanding is that a kilobyte can be 1024 bytes or 1000 bytes, which is incorrect but very common. The kibibyte, and its associated units, are not well known outside of the field.