-[Craig] In this video, we look at the different units of data storage
that you need to be aware of for the exam.
(uplifting piano jingle)
We already understand that everything stored in a computer system is stored in binary,
those zeros and ones that represent just two states.
For example, capacitors that store a charge or don't store a charge in RAM to represent a one or a zero.
Magnetic north and south poles in hard drives,
pits and lands on Blu-ray discs,
current or no current with logic gates.
This is because it's much easier,
and therefore, cheaper,
to manufacture electronic component units with just these two states.
However, this means that everything,
literally everything,
must be stored with only zeros and ones,
known as a bit or a binary digit.
It is clear that Boolean values, true and false or on and off,
can be stored with just one bit.
However, to store more complex types of data,
we need to use a combination of bits.
For example, a single-digit LCD display requires four bits of data.
I will explore how and why that is the case
in a later video about binary numbers.
Those four bits are called a nibble because they're half a byte.
And yes, this is because computer scientists somehow think they have a sense of humour.
Therefore, a byte is eight bits.
Those eight bits can be used to represent lots of different types of data.
For example, it could be a number.
It could also be a letter or a symbol if every letter had its own binary sequence.
Equally, it could be part of a picture or a sound file.
This is exactly how computers work,
and we'll explore each of these concepts in more detail in other videos in this unit.
A single byte, whilst useful for storing a single character,
is not enough for other types of data.
And therefore, computers started using thousands of bytes of data called kilobytes.
As the binary system is a base-two number system,
these larger units are two to the power of 10 units.
Two to the power of 10 is 1024.
So a kilobyte is actually 1024 bytes and not 1000.
Now, this doesn't make a huge amount of sense
when you're taught in maths and science that a kilo is 1000.
Therefore, we tend to approximate a kilobyte to 1000 bytes just for simplicity.
Even 1000 bytes is not enough capacity to store most files.
Therefore, we have a need for higher units of measurement.
Here are the units of measurements you need to know for the GCSE exams.
You will notice that the binary values of these units calculated by powers of 1024.
Therefore, a megabyte is 1024 multiplied by 1024 bytes.
Or expressed another way, 1024 to the power of two,
which is 1,048,576 bytes.
Now up until now, we've actually been using the terms kilobyte, megabyte and gigabyte inaccurately.
Now this was on purpose because many textbooks and indeed the industry and in casual conversation,
the terms are being used incorrectly in everyday use.
When describing quantities of bytes,
we can use both a binary prefix representing powers of two and a decimal prefix representing powers of 10.
Historically, the terms kilobyte, megabyte, et cetera,
have been used to represent computing data capacities of powers of two.
But the International System of Units also uses the words kilo and mega and so forth
to refer to values to the power of 10.
So when referring to the powers of two,
the actual correct terms we should be using are kibi, mebi and so forth, as shown in the table on the left.
And these are the terms that are mentioned in your specification.
So while a megabyte is often estimated as a million bytes,
a mebibyte is exactly 1,048,576 bytes.
This is to avoid the ambiguity with the size of megabytes.
So it can be handy to quickly remember some rules on converting between the different units of data storage.
Anything from a kibibyte upwards,
we're either multiplying or dividing by roughly 1000.
When we're dealing with bytes and bits, don't forget,
we're multiplying or dividing by eight because there's eight bits in a byte.
So to go from a gibibyte to a mebibyte,
we would multiply by 1000.
To go from a gibibyte to a kibibyte,
we would multiply by 1000 and then 1000 again.
Likewise, in the other direction,
if we were going from a gibibyte to a tebibyte,
we'd be dividing by 1000.
Okay, so let's look at some real examples.
Here we can see a list of files in a typical file storage system.
We've hidden the file names so we can focus on what's important.
Now, just a quick note here to confuse the matter even further.
If you look at the size of the file in Windows, you will see symbols such as KB and MB.
Now this is because Windows is using a completely different standard for unit prefixes.
With the Windows system, a KB or a kilobyte is 1024 bytes.
Now, this isn't the official International System of Units for data storage,
which we mentioned in the previous section.
And of course, we should be using in our exam KiB, kibibytes, 1024.
So here we have a Microsoft Word document which is 1470 kibibytes.
Remember, to get this into mebibytes,
we divide roughly by 1000.
So you can also say that this Word document is 1.47 mebibytes in size.
Again, here we have a PowerPoint presentation.
It's 740 kibibytes.
Dividing by approximately 1000 gives us 0.74 mebibytes in size.
Let's take this Microsoft Excel worksheet now, 25 kibibytes in size,
and let's work it out actually in individual bits.
Well, to get from kibibits to bytes, we times approximately by 1000.
So we've got 25,000 bytes.
And then of course we times by eight because there's eight bits in a single byte.
Now in the exam, you're not allowed to use a calculator,
but have no fear, you won't be asked to actually do the manual calculation.
Exam questions will be written something like follows:
an image uses a 24-bit colour depth, it is 30 pixels wide and 56 pixels high.
Construct an expression to calculate the file size of the image in mebibytes.
You do not have to do the actual calculation.
Now remember, in the exam, use of denary multipliers,
e.g., 1000 kilobytes rather than 1024 kibibytes, is not acceptable.
So you're only going to have to construct the expression
and not perform the actual calculation manually on pen and paper.
So your answer to the question might look something like this for four marks.
We've got 30 pixels wide times 56 pixels high times the 24-bit colour depth.
That will give us the number of bits.
You've been told to provide your answer in mebibytes,
so we've got to divide that by 1024 times 1024.
That will give us bytes, times eight, which will give us the bits.
(uplifting piano jingle)