3.3.3 - Bits, bytes and decimal prefixes
Distinguish bits from bytes and convert storage quantities using the decimal prefixes kB, MB, GB and TB. Careful units make comparisons and file-size calculations reliable.
Bits and bytes
A bit is the smallest unit of binary information, and a byte groups eight bits together.
Bit and byte
A bit is one binary digit, either 0 or 1. A byte is a group of eight bits. Lowercase b denotes a bit; uppercase B denotes a byte.
The pattern 00101101 contains eight bits, so it occupies one byte. A byte has 256 possible patterns because every one of its eight positions has two possibilities: . The possible unsigned number values are 0–255, which is 256 values including zero.
To convert bytes to bits, multiply by 8. A 12-byte field contains bits. To convert bits to bytes, divide by 8. A 96-bit field occupies bytes. These conversions describe the same amount of information; they do not compress it.
The letter case matters. 40 Mb and 40 MB differ by a factor of eight. Write the unit with every result so the reader knows which quantity you mean. Later image and sound formulas produce bits first, so the division by eight is a separate step when bytes are requested.
Decimal storage prefixes
Decimal prefixes let us express large byte quantities without long strings of zeros.
| Name | Symbol | Equivalent quantity |
|---|---|---|
| kilobyte | kB | 1,000 bytes |
| megabyte | MB | 1,000 kB = 1,000,000 bytes |
| gigabyte | GB | 1,000 MB = 1,000,000,000 bytes |
| terabyte | TB | 1,000 GB = 1,000,000,000,000 bytes |
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account