Storing Data

Storing Data

What’s in this section…

Computer memory and storage is organised around bits, bytes and multiples of bytes. You should understand the connection between bits and bytes and storage.

  • Bits
  • Bytes
  • Multiples of bytes

Computers store lots of different types of data and all of it has to be stored and processed in binary. We need to understand how all of these different types of data can be represented in binary.

  • Images
  • Videos
  • Text
  • Numbers

Huge amounts of this data is sent around the world to make this possible the data needs to be compressed. Data needs to be compressed enough to allow rapid transmission but not too much so that quality is maintained.

  • Lossy Compression
  • Lossless Compression

When data is transmitted over a network, or just sent for storage, errors can occur which means that the data that arrives at the other end is not the same as the data that was sent. We need to know about some of the ways we can detect and deal with these errors:

  • Parity
  • Check Digits
  • Checksums
  • Automatic Repeat reQuests (ARQ)

Bits, Bytes and Multiples of Bytes

The smallest piece of memory in a computer is a bit. A bit can hold either the value 1 or the value 0. On its own a bit isn’t a very useful amount of storage. Computer memory is organised into groups of 8 bits. A group of 8 bits is called a byte.

Desktop computer RAM comes in modules like this called a DIMM. The actual memory chips are inside but on this model they are covered by a ‘heat sink’ which helps to stop the DIMM over heating.

A byte is enough memory to store a single ASCII character, so still not very much. We need a lot of bytes to provide a reasonable quantity of memory. Just like with metric units, where we have grams and kilograms, we talk in terms of kilobytes etc.

An early home computer. This one came with 32 kilobytes of RAM! Enough to hold roughly 32000 ASCII characters.

Units of computer memory

Unfortunately there is more than one version of these units. The reason for the two systems is all because of binary, of course! The ‘normal’ metric ones that we use for grams etc. are all powers of 10. For example a kilogram is 1000 grams or 103 grams. Computers use binary (base-2) so we use the nearest equivalent e.g. 1024 bytes in a kibibyte. 1024 comes from 210.

MetricBinary version
kilobyte = 1000 bytes (103)kibibyte = 1024 bytes (210)
megabyte = 1000 kilobytes = 1000000 bytes (106)mibibyte = 1024 kibibytes = 1048576 bytes (220)
gigabyte = 1000 megabytes = 1000000000 bytes (109)gibibyte = 1024 mibibytes = 1,073,741,824 (230)
The two different systems of multiples of bytes (https://en.wikipedia.org/wiki/Binary_prefix)

Cookie Consent with Real Cookie Banner