Bit and byte: the smallest units of data
A computer keeps everything as bits. A bit is a tiny switch with only two states: 0 or 1. Think of a lamp that is off or on.
One bit is too small to hold a letter. So we group 8 bits into 1 byte. A byte can make 28 = 256 different patterns. That is enough for one letter, one digit or one symbol.
- 1 byte = 8 bits
- The word CAT is 3 letters, so it needs 3 bytes (24 bits).
Kilobyte, megabyte, gigabyte: the ladder of units
Bytes are small, so we use bigger units. Each step up is 1000 times bigger.
| Unit | Short | Size | Example |
|---|---|---|---|
| Byte | B | 8 bits | one letter |
| Kilobyte | kB | 1000 B | a short message |
| Megabyte | MB | 1000 kB | a photo |
| Gigabyte | GB | 1000 MB | a movie |
| Terabyte | TB | 1000 GB | a big hard disk |
Some programs use 1024 instead of 1000 (because 1024 = 210). The names kibibyte (KiB) and mebibyte (MiB) are used for those. In school questions, use the number the question gives you, or 1000 if it says nothing.
Changing units: going up (B to kB) you divide by 1000. Going down (GB to MB) you multiply by 1000.
Data transfer rate: how fast data moves
Data transfer rate (also called speed or bandwidth) tells how much data moves in one second. It is measured in bits per second: b/s, kbps, Mbps, Gbps.
This is where students get mixed up:
- Capital B = bytes. Used for file size (MB, GB).
- Small b = bits. Used for speed (Mbps).
Since 1 byte = 8 bits: speed in MB/s = speed in Mbps รท 8. So 8 Mbps = 1 MB/s, and 80 Mbps = 10 MB/s.
Download time: the formula and a step-by-step method
Time = size รท speed. Both must use the same units.
- Write the file size and change it to megabytes (MB).
- Write the speed and change it to MB/s (divide Mbps by 8).
- Divide: time in seconds = MB รท MB/s.
Example: a 60 MB video on a 24 Mbps link. Speed = 24 รท 8 = 3 MB/s. Time = 60 รท 3 = 20 seconds.
Real downloads are a little slower, because of waiting time and other users on the network.
Try it yourself
In the 3D: go to the last step. First guess the time for 400 MB at 16 Mbps, then move the sliders and check.
At home: look at the size of a photo on your phone (in MB). Then run any speed test app. Divide the Mbps result by 8 and work out how long that photo needs to upload. Then upload it and time it with a clock.
Key formulas and definitions
- 1 byte = 8 bits
- 1 kB = 1000 B, 1 MB = 1000 kB, 1 GB = 1000 MB, 1 TB = 1000 GB
- Speed in MB/s = speed in Mbps รท 8
- Time (s) = file size (MB) รท speed (MB/s)
- File size (MB) = speed (MB/s) ร time (s)
Worked examples
1. How many bits are in 5 bytes?
1 byte = 8 bits. So 5 ร 8 = 40 bits.
2. A song file is 4 MB. How many kB is that?
1 MB = 1000 kB. So 4 ร 1000 = 4000 kB.
3. A phone has 64 GB storage. Each photo is 4 MB. How many photos fit?
64 GB = 64 ร 1000 = 64 000 MB. Photos = 64 000 รท 4 = 16 000 photos.
4. Internet speed is 40 Mbps. What is this in MB/s?
Divide by 8. 40 รท 8 = 5 MB/s.
5. How long to download a 150 MB app at 12 Mbps?
Speed = 12 รท 8 = 1.5 MB/s. Time = 150 รท 1.5 = 100 seconds (1 min 40 s).
6. A 1.2 GB film is downloaded in 4 minutes. Find the average speed in Mbps.
Size = 1.2 ร 1000 = 1200 MB. Time = 4 ร 60 = 240 s. Speed = 1200 รท 240 = 5 MB/s. In Mbps: 5 ร 8 = 40 Mbps.
Common mistakes
- Mixing B and b. A speed of 8 Mbps is 1 MB/s, not 8 MB/s.
- Dividing the file size by Mbps directly. First change Mbps to MB/s (รท 8).
- Using 100 or 60 instead of 1000 between units. Each step is 1000 (or 1024 when stated).
- Forgetting to change minutes to seconds before dividing.