1

mrahmedcomputing

KS3, GCSE, A-Level Computing Resources

Lesson 2. Storage Units


Lesson Objective

  1. Understand how bit patterns can be used to represent different types of data.
  2. Define the terms bit, nibble, byte, kilobyte, megabyte, gigabyte and terabyte using standard prefixes.
  3. Convers between different storage units.

Lesson Notes

Bit Patterns

Bit patterns play a crucial role in representing various types of data. Whether it's text, images, sound, or integers, everything is ultimately translated into binary form-combinations of 1s and 0s. Let's explore how different data types are converted into these bit patterns:

Text (Characters):

When you press a key on your keyboard, it needs to be transformed into a binary number so that the computer can process it and display the corresponding character on the screen.

The ASCII code (American Standard Code for Information Interchange) assigns a unique binary number to each character. For instance:

ASCII code covers special characters, punctuation, return keys, control characters, as well as uppercase and lowercase letters. It can represent 128 characters, which suffices for most English words but falls short for other languages.

Images:

Images are typically represented as bitmap graphics. Each image consists of tiny squares called pixels.

The color of each pixel is encoded using binary values. For example:

Additionally, the color depth determines the range of colors an image can display. Higher color depth allows more vibrant and detailed images.

Sound:

Sound is captured through sampling. Analog sound waves are converted into digital samples.

The bit depth (number of bits per sample) affects sound quality. More bits provide greater accuracy.

Common audio formats (like MP3) use bit patterns to represent sound data.

Here some practical examples of file sizes:


Units of Measurement

In the metric system, we have straightforward conversions: 1 kilometer (km) equals 1000 meters (m), and 1 kilogram (kg) equals 1000 grams (g). These powers of 10 make sense and are easy to remember.

However, when it comes to digital storage, things get interesting. Computers use binary (base 2) for everything. So, when they measure storage, they work in powers of 2. A kilobyte (kB) is commonly understood to be 1000 bytes. However, there's a historical twist.

In binary terms, a kilobyte is actually 1024 bytes (210). This discrepancy arises because 1024 is the nearest power of 2 that's close to 1000. To address this, modern terminology introduces the concept of a kibibyte (KiB). A kibibyte is precisely 1024 bytes, matching the binary reality. Meanwhile, a kilobyte (kB) remains 1000 bytes (as per the metric system).

Binary patterns can be used to represent any data, be it text, sound, images or video. The number of possible bit combinations or patterns available increase with when the numbers of bits increase.

Unit Conversion Table

Use this table to help you convert units. Its not a great table, im working on it...

Div Unit Mult
0 Bit 0
0 byte 5
3 kilobyte 2
0 megabytes 0
0 gigabytes 5
3 terabyte 2
3 petabyte 2

3