Every day we want to measure amounts of information, which we commonly call data. To do this there is a unit of information called a bit. A bit is the smallest unit of measurement for digital information. The symbol for a bit is '\text{b}'. For example, 6 bits is written as 6 \text{ b}.
A bit doesn't hold much information so we can group bits into bytes. A byte is made up of 8 bits. The symbol for a byte is '\text{B}'. For example, 12 bytes is written as 12 \text{ B}.
A byte doesn't store much more information - only 8 times as much. The digital information that makes up a a document or a movie file is quite a lot larger than this. Most files contain so many bits that it is impractical to write their size in bits or bytes. We need a way to write much larger amounts of information.
We have already seen common metric prefixes and can use the same prefixes for digital units. We most commonly apply these to bytes:
Unit | \text{byte} | \text{kilobyte} | \text{megabyte} | \text{gigabyte} | \text{terabyte} | \text{petabyte} |
---|---|---|---|---|---|---|
Symbol | \text{B} | \text{kB} | \text{MB} | \text{GB} | \text{TB} | \text{PB} |
Number of bytes | 10^0 | 10^3 | 10^6 | 10^9 | 10^{12} | 10^{15} |
Sometimes we will also apply them to the smaller unit, bits:
Unit | \text{bit} | \text{kilobit} | \text{megabit} | \text{gigabit} | \text{terabit} | \text{petabit} |
---|---|---|---|---|---|---|
Symbol | \text{b} | \text{kb} | \text{Mb} | \text{Gb} | \text{Tb} | \text{Pb} |
Number of bytes | 10^0 | 10^3 | 10^6 | 10^9 | 10^{12} | 10^{15} |
We can use the tables above to convert between different units of measurement. To move one step to the right we divide by 1000, and to move one step to the left we multiply by 1000,
You might instead like to think of the conversion as moving up and down the pyramid below.
Divide by 1000 to move down the pyramid, and multiply by 1000 to move up the pyramid.
When we write kilobyte (\text{kB}) we are referring to the metric prefix "kilo", meaning one thousand, so 1 \text{ kB} = 1000 \text{ B}.
You may come across another data unit called a kibibyte (\text{KiB}) where 1 \text{ KiB} = 1024 \text{ B}. It also has larger units called the mebibyte (\text{MiB}), gibibyte (\text{GiB}), tebibyte (\text{TiB}), and so on, each containing 1024 of the smaller unit that came before.
This is because 2^{10}=1024, and powers of 2 are very important for computer systems.
Sometimes people mean a kibibyte when they write a kilobyte because 1024 is quite close to 1000. So you should always check which one somebody is referring to.
What is 4.895 \text{ kB} in \text{B}?
What is 6.6 \text{ TB} + 700 \text{ GB} in \text{TB}? Give the answer as a decimal.
Caitlin has bought a disk drive that can hold 5 \text{ TB} of data. How many files of size 9.8 \text{ MB} can she store in this disk?
We use the table below to convert between bytes, kilobytes, megabytes, and larger units.
Unit | \text{byte} | \text{kilobyte} | \text{megabyte} | \text{gigabyte} | \text{terabyte} | \text{petabyte} |
---|---|---|---|---|---|---|
Symbol | \text{B} | \text{kB} | \text{MB} | \text{GB} | \text{TB} | \text{PB} |
Number of bytes | 10^0 | 10^3 | 10^6 | 10^9 | 10^{12} | 10^{15} |
We can use digital units when measuring rates as well. For example, when downloading a file from the internet it might download at 3 megabytes per second (\text{MB/s}) and we want to know how long it will take to finish downloading.
Usually download rates are measured in megabits per second (\text{Mb/s}) or gigabits per second (\text{Gb/s}), rather than megabytes per second (\text{MB/s}) or gigabytes per second (\text{GB/s}). Download rates are also sometimes written as \text{Mbps} or \text{Gbps}.
So if your internet speed is quoted as 40 \text{Mb/s} then the speed is the same as 40 \div 8 \text{MB/s}= 5 \text{MB/s}.
Derek's internet connection downloads files at 34 \text{ MB} per second.
How many seconds (to one decimal place) would it take him to download a 323 \text{ MB} file?
The download rate is related to the file size and the download time by this formula:\text{Download rate} = \dfrac{\text{file size}}{\text{download time}}