Introduction: The Language of Computers

Welcome! In this section, we are going to look at how computers actually "measure" information. You probably already know that computers use binary (1s and 0s), but have you ever wondered how we go from a single 1 or 0 to a high-definition movie or a complex video game? It all starts with the smallest possible building blocks: Bits and Bytes.

Don't worry if this seems a bit abstract at first. By the end of these notes, you’ll understand exactly how computers count and why your "1 Terabyte" hard drive might look a little different to the computer than it does to you!

3.5.3.1 Bits and Bytes

What is a Bit?

The word bit stands for Binary Digit. It is the absolute smallest unit of information a computer can hold.
A bit is like a tiny electronic light switch—it can only be in one of two states:

  • 0 (Off)
  • 1 (On)

What is a Byte?

While a single bit is useful for something simple (like "Is the light on? Yes/No"), we need more room to store things like letters or numbers. To do this, we group bits together.
A byte is a group of 8 bits.
Example: 10110100 is one byte of data.

Calculating Combinations

How many different things can we represent with bits? There is a simple rule: if you have \( n \) bits, you can represent \( 2^n \) different values.

Step-by-Step Example:
If you have 3 bits, you can make \( 2^3 \) (which is \( 2 \times 2 \times 2 \)) different patterns. That equals 8 patterns:
000, 001, 010, 011, 100, 101, 110, 111.

Quick Review:

  • 1 bit = 2 values (\( 2^1 \))
  • 2 bits = 4 values (\( 2^2 \))
  • 8 bits (1 Byte) = 256 values (\( 2^8 \))

Key Takeaway: The bit is the fundamental unit of information. A byte is always 8 bits.

3.5.3.2 Units of Measurement

Just like we use grams and kilograms to measure weight, we use different units to measure large amounts of data. However, in Computer Science, there are two different ways to count: the Decimal way (powers of 10) and the Binary way (powers of 2).

1. Decimal Prefixes (The "Standard" Way)

These are the prefixes you use in everyday life (like kilometers). They are based on powers of 10.

  • kilobyte (kB) = \( 10^3 \) bytes = 1,000 bytes
  • megabyte (MB) = \( 10^6 \) bytes = 1,000,000 bytes
  • gigabyte (GB) = \( 10^9 \) bytes = 1,000,000,000 bytes
  • terabyte (TB) = \( 10^{12} \) bytes = 1,000,000,000,000 bytes

2. Binary Prefixes (The "Computer" Way)

Because computers work in binary, they don't actually count in 1,000s—they count in 1,024s (because \( 2^{10} = 1024 \)). To be accurate, we use different names for these: kibi, mebi, gibi, and tebi.

  • kibibyte (KiB) = \( 2^{10} \) bytes = 1,024 bytes
  • mebibyte (MiB) = \( 2^{20} \) bytes = 1,048,576 bytes
  • gibibyte (GiB) = \( 2^{30} \) bytes = 1,073,741,824 bytes
  • tebibyte (TiB) = \( 2^{40} \) bytes = 1,099,511,627,776 bytes
Memory Aid: How to remember the names

Notice that the binary prefixes all have a "bi" in them (kibi, mebi, gibi). This stands for binary! If you see the "bi," think Power of 2. If you don't see the "bi," think Power of 10.

Did you know?
Storage manufacturers (like the people who make USB sticks) usually use Decimal units (1,000) because it makes the capacity look slightly larger. However, your Operating System (like Windows) often calculates in Binary units (1,024). This is why a "1 TB" drive often shows up as only "931 GB" when you plug it in!

Comparing the Two

It is important to know which one is which for your exam. Here is a quick comparison table:

Unit Name (Symbol) | Base | Calculation
Kilobyte (kB) | 10 | \( 10^3 \) (1,000)
Kibibyte (KiB) | 2 | \( 2^{10} \) (1,024)
Megabyte (MB) | 10 | \( 10^6 \) (1,000,000)
Mebibyte (MiB) | 2 | \( 2^{20} \) (1,048,576)

Common Mistake to Avoid

In the past, people used the word "kilobyte" to mean 1,024. In the AQA syllabus, you must be precise!
kB = 1,000
KiB = 1,024
Always check if the question asks for decimal (powers of 10) or binary (powers of 2) prefixes.

Key Takeaway: Binary units (Ki, Mi, Gi, Ti) use powers of 2 and are multiples of 1,024. Decimal units (k, M, G, T) use powers of 10 and are multiples of 1,000.

Summary Review

1. A bit is a 0 or 1.
2. A byte is 8 bits.
3. Use the formula \( 2^n \) to find how many values \( n \) bits can represent.
4. kibi, mebi, gibi, tebi = Binary prefixes (1,024).
5. kilo, mega, giga, tera = Decimal prefixes (1,000).