Lesson video

In progress...

Loading...

Hello, I'm Dr.

Das.

Welcome to Computing.

I'm so pleased that you have decided to join me for the lesson today.

In today's lesson, we will be looking at measurements of storage.

Welcome to today's lesson from the unit Data compression.

This lesson is called Measurements of Storage, and by the end of this lesson, you should be able to define different storage units and convert between them.

Some of the keywords that we will be using in today's lesson are: bit.

Bit: the smallest unit of data represented as either 0 or 1.

Byte.

Byte: a group of 8 bits.

Number prefix.

Number prefix: a word used in front of a number to represent a multiple of that number.

This lesson is divided into two parts.

The first part looks at defining units of storage.

The second part looks at converting units of measurement.

Let's start with the first part where we will be covering the different units of storage.

Look at the images below.

Can you spot the odd one out? Why don't you pause the video here, have a look at these images and have a quick think.

That's right, it's the mouse.

They all store digital data apart from the computer mouse.

Storing data is important because it allows us to save, access and protect information for future use.

Without data storage, essential files, photos and applications would be lost or inaccessible.

Sofia says, "Does that mean without data storage I wouldn't be able to save my progress on a video game?" Aisha says, "That's correct.

I think without data storage, there wouldn't even be a video game to play." Without data storage, applications, including games, wouldn't exist.

A unit of storage in computing is a measurement used to represent the amount of digital data that is stored.

The smallest unit of measurement in computing is a bit.

The word bit stands for binary digit.

Bits are used to represent all data in computers.

A bit of data is stored as either a 0 or 1.

The digital world is built on bits and they are the fundamental components of all stored and processed data.

Data represented in binary can result in large sequences of bits.

You can see a representation of bits given on the slide here.

That's quite a large bit sequence.

And large bit sequences like this are incredibly difficult for humans to read, understand, and manage directly.

To make binary data easier to read, understand and store, we group collections of bits into smaller sections.

These groups are the units used to measure data storage.

A group of 8 bits is referred to as a byte.

A sequence of 16 bits could therefore be referred to as 2 bytes, and you can see here in the image the group of bits.

There are 16 bits that are shown here, which can be divided into two groups of 8 bits or 2 bytes.

Note that a group of 4 bits is referred to as a nibble, and this is half a byte.

So as you can see here, there are 4 bits.

So 4 bits make up a nibble, which is half a byte.

Let's do a quick check.

A byte is a smaller representation of data than a bit.

What do you think? Is this statement true or false? Why don't you pause the video here and have a quick think.

I'm sure you got that one right.

It is false.

Why? Because a byte is a group of 8 bits.

A bit is the smallest unit of data in computing, and it represents a single binary digit, either a 0 or a 1.

Number prefixes help us express multiples of a number.

This makes it easier to understand and compare sizes.

This table here shows some of the common number prefixes that we use in computing.

A kilo is 1 followed by three zeros.

So 1,000.

Mega is 1 followed by six zeros.

A million.

Giga is 1 followed by nine zeros.

A billion.

Tera is 1 followed by 12 zeros, so a trillion.

And peta is 1 followed by 15 zeros, or a quadrillion.

In computing, bytes are summarised in multiples of 1,000.

1 kilobyte is equal to a thousand bytes.

1 megabyte is equal to a million bytes.

1 gigabyte is equal to a billion bytes.

1 terabyte is equal to a trillion bytes and 1 petabyte is equal to a quadrillion bytes.

You may have heard of and even spoken about some common units of storage already.

Sofia says, "My games console has 1 terabyte of storage." Aisha says, "A Raspberry Pi 5 can have up to 16 gigabytes of RAM." Let's do a quick check before we move on.

Which unit of storage is the smallest? Is it terabyte, gigabyte, megabyte, or kilobyte? I'm sure you know the answer to this.

Why don't you pause the video here, have a quick think and try and work this out.

That's right, it is kilobyte because kilobyte is a thousand bytes, whereas terabyte is a trillion bytes, gigabyte is a billion bytes and a megabyte is a million bytes.

Well done.

Let's try another one.

Which of these do think is the largest? Pause the video here and have a quick think.

That's right, it's petabyte, that represents 1 quadrillion bytes.

Which of these do you think is the smallest? Pause the video here and have a quick think.

It is the nibble, which is a collection of 4 bits.

Remembering the order of these units of measurement is important because it helps you know how to use them and convert between them.

So kilobyte, which is written as lowercase k, uppercase B is 1,000 bytes.

Megabyte, which is written as an uppercase M and an uppercase B is a million bytes.

A gigabyte, which is written as uppercase G and B is a billion bytes.

Terabyte, which is written as uppercase TB is a trillion bytes, and a petabyte, which is written as uppercase PB is a quadrillion bytes.

To help you remember the order of the units, you can think of a silly sentence.

Your silly sentence should be made up of words that have the same first letters as the units of measurement.

For example, your sentence could be: Kangaroos Munch Giant Tacos, Probably.

So your K for kilobytes, M for megabytes, G for gigabytes, T for terabytes and P for petabytes.

It's a very handy tool which is used a lot just so that you can remember difficult words, complicated concepts.

You make up a silly sentence using the acronyms. Okay, before we move on, a quick check.

4 bytes of data would be how many bits? What do you think? Pause the video here and try and work this out.

It is 32 bytes Because 8 bits make up 1 byte.

So 4 bytes would be 8 times 4, which is 32.

Well done.

This brings us to the end of this section.

Before we move on, just to make sure that you have understood the concepts that we covered in this section, why don't you attempt this task? Task A is made up of two parts.

The first part asks you to match the storage unit prefixes to their correct number of bytes.

Why don't you pause the video here and try and work this out.

I am sure you'll be able to.

Okay, let's look at what the correct answers should be.

A kilobyte is 1,000 bytes, so 1 followed by three zeros.

A megabyte is a million bytes, so 1 followed by six zeros.

A gigabyte is a billion bytes, so 1 followed by nine zeros.

Terabyte is a trillion bytes, 1 followed by 12 zeros, and a petabyte is a quadrillion bytes, 1 followed by 15 zeros.

Well done.

Part two of this task asks you to make up your own silly sentence to help you remember the order of the units of storage below.

So your kilobyte, megabyte, gigabyte, terabyte, and petabyte.

So take the first letter of each of these words and try and make up a silly sentence.

Pause the video here and work on this.

Aisha says, "My silly sentence is 'Kitty Meows Great Tunes Perfectly.

' I'm sure this will help me remember the order." Were you able to come up with a silly sentence of your own? I'm sure you were something that was helpful and funny at the same time.

Well done.

Let's move on.

Section two of this unit talks about converting between units of measurement.

Sofia says, "I just took a photo on my phone.

It says that the file size is 4.

8 MB.

I wonder how many bytes that is?" Lucas says, "Well, there are 1,000 kilobytes in a megabyte and 1,000 bytes in a kilobyte.

I think it might be 4,800,000 bytes.

What do you think? Is Lucas right? Let's find out.

Lucas is right.

4.

8 MB is 4,800,000 bytes.

It is also 38,400,000 bits.

Lucas says, "That's a lot of bits and bytes!" That's right.

There are many reasons why units may need to be converted.

One reason is that the numbers can become unmanageable very quickly.

Two numbers that you need to remember when converting units of measurement are 1,000 and 8.

This is because there are 1,000 bytes in a kilobyte and there are 8 bits in a byte.

There are also 1,000 kilobytes in a megabyte 1,000 megabytes in a gigabyte 1,000 gigabytes in a terabyte and 1,000 terabytes in a petabyte.

Knowing these facts is useful when converting between different units of measurement.

Right.

Let's do a quick check.

How many bits are in a byte? Pause the video here and try and work this out.

That's right.

8 bits.

There are 8 bits in a byte.

Well done.

How many gigabytes are in a terabyte? What do you think? Pause the video again and have a quick think.

I'm sure you know the answer to this one.

That's right.

It is 1,000 gigabytes in a terabyte.

Units of measurement can be converted by completing simple calculations.

To convert 50 bytes into bits, you multiply the number of bytes by the number of bits in a byte.

So 50, which is the number of bytes that is given to you, multiplied by 8, which is the number of bits in a byte, gives you 400.

So there are 400 bits in 50 bytes.

Kilobytes can be converted into megabytes.

There are 1,000 kilobytes in a megabyte.

To convert 3,000 kilobytes into megabytes, you divide the number of kilobytes by the number of kilobytes in a megabyte.

So to convert 3,000 kilobytes, you divide 3,000 by 1,000 because 1,000 is the number of kilobytes in a megabyte, and this gives you 3.

So there are 3 megabytes or 3 MB in 3,000 kilobytes.

To convert 40,000 bits into kilobytes, you must first calculate the number of bytes.

The number of bytes will be 40,000 divided by the number of bits in a byte, which is 8.

So 40,000 divided by 8 will give you 5,000 bytes.

Then you convert the number of bytes into kilobytes.

So the number of kilobytes would be 5,000 bytes divided by the number of bytes in a kilobyte, which is 1,000, so 5,000 divided by 1,000, which gives you 5 kilobytes or 5 kB.

Often, we need to calculate the size of files, and this may involve converting units of measurement.

Consider the problem of calculating the file size in bytes for a one minute sound recording that has used a sample rate of 1,000 hertz and a sample resolution of 4 bits.

First, you can work out the total number of bits in the recording.

Total bits is equal to sample rate multiplied by sample resolution multiplied by seconds.

So the total bits sample rate is 1,000, sample resolution is 4, and seconds is 60.

So the total bits would be 1,000 multiplied by 4, multiplied by 60, which gives you 240,000.

Now you can convert the number of bits into bytes to find the answer to the question.

Total number of bytes is number of bits divided by the number of bits in a byte.

So the total number of bytes in this case is number of bits, which is 240,000, divided by number of bits in a byte, which is 8, and that gives us 30,000 bytes.

Aisha says, "What if the question had asked for the answer in kilobytes?" Sofia says, "I think we could add another stage to convert the bytes into kilobytes?" Sofia is right.

Once you know the number of bytes, you can convert the data into whatever units are most suitable.

So to convert 30,000 bytes into kilobytes, you divide the number of bytes by 1,000 because 1,000 is the number of bytes in a kilobyte.

So 30,000 divided by 1,000 will give you 30 kilobytes.

So the total number of kilobytes is 30 kilobytes.

So 30,000 bytes can also be written as 30 kilobytes.

Lucas says, "What about the answer in megabytes? That sounds cool." Let's see how we can work that one out.

To convert the answer into megabytes, you can use the fact that there are 1 million bytes, or 1 followed by six zeros, bytes in a megabyte.

So you take the number of bytes and you divide that by 1 million.

So the total number of megabytes for 30,000 bytes is 30,000 divided by 1 million, and that gives you the answer as 0.

03 megabytes.

So 30,000 bytes is equal to 0.

03 megabytes.

Another way to convert the answer into megabytes would be to use the fact that there are 1,000 kilobytes in a byte in a megabyte.

So the number of megabytes would be the number of kilobytes divided by 1,000.

So remember we calculated that the number of kilobytes was 30 kilobytes.

We divide that by 1,000, and you come to the same answer, which is 0.

03 megabytes.

It is up to you to choose whichever conversion method you feel is best suited to the problem.

The units you choose to represent a piece of data will depend on which is the most readable and practical.

So if you look at the four values that are given here, 240,000 bits is the same as 30,000 bytes, which is the same as 30 kilobytes, which is the same as 0.

03 megabytes.

Aisha says, "I think in this case the most sensible unit of measurement to use would be kilobytes as they are the easiest to read." That makes sense.

This brings us to the end of this section.

To recap, just to make sure that you have understood the different concepts that we covered in this section, why don't you attempt this task? Task B is made up of three parts.

The first part says: A text file is created using 8-bit ASCII.

Each character of text is therefore 1 byte.

The text file contains 50,000 characters.

What is the file size of the text file in kilobytes? Part two asks you to calculate the file size in kilobytes for a two minute sound recording that has used a sample rate of 1,000 hertz and a sample resolution of 2 bits.

The third part asks you to calculate the file size in megabytes for a two minute sound recording that has used a sample rate of 2000 hertz and a sample resolution of 4 bits.

Why don't you pause the video here and try and work these parts out? I'm sure you were able to work the parts out.

Let's have a look.

So in the first part, it says: A text file is created using 8-bit ASCII.

So each character therefore is 1 byte.

So the text file contains 50,000 characters.

What is the file size of the text file in kilobytes? So 1 times 50,000 will give you 50,000 bytes.

Now to convert 50,000 bytes into kilobytes, you divide 50,000 by 1,000 because there are 1,000 bytes in a kilobyte and the answer is 50 kilobytes.

Part two asked you to calculate the file size in kilobytes for a two minute sound recording that has used a sample rate of 1,000 hertz and a sample resolution of 2 bits.

So to calculate that, to calculate how many bits there are, you multiply the 1,000 hertz with the sample resolution, which is 2 bits, multiplied by the number of seconds, which is for a two minute file, it's 2 times 60, so 120 seconds.

This gives you 240,000 bits.

Then we convert these bits into bytes by dividing 240,000 by 8, which gives us 30,000 bytes.

To convert this into kilobytes, you divide 30,000 by 1,000, and that gives you 30 kilobytes.

Finally, part three asks you to calculate the file size in megabytes for a two minute sound recording that has used a sample rate of 2000 hertz and a sample resolution of 4 bits.

So to find out the number of bits we first multiplied the sample rate of 2000 hertz with the sample resolution of 4 bits and the total duration of the file, which is two minutes or 120 seconds, and that gives us 960,000 bits.

To convert the number of bits into bytes, we divide 960,000 by 8, and that gives us 120,000 bytes.

120,000 are then divided by 1,000 to give the answer in kilobytes, which is 120 kilobytes.

And then you take the 120 kilobytes and divide again by 1,000 to give you the answer in megabytes, which is 0.

12 megabytes.

Well done on working all these parts out.

That brings us to the summary.

A bit is the smallest unit of data and is represented by a 1 or 0.

Bits of binary data are grouped together to make data easier to read, understand and store.

A byte is a group of 8 bits.

Number prefixes are used to summarise multiples of a number.

Units of measurement can be converted by completing simple calculations.