-[Craig] In this video, we look at the limitations of binary representation
and consider character sets, images and sounds.
(uplifting piano jingle)
So as a quick recap, we'll just go back and consider a topic we've already discussed in a previous video,
which is the maximum number of states which can be represented by any number of given binary digits.
So as binary only has two digits available, one or zero,
it means that the number of combinations that we can store with binary
is directly dependent on the number of bits we have.
It's two to the power.
So for example, if we have three bits,
we can represent a maximum of eight states, as shown on the left.
It's two to the power of three, meaning eight maximum possible states.
You can see here that in mathematical terms,
we can say there are 2n possible states with n bits.
And every time we add an extra bit to be able to store a number,
we double the maximum number of possible states that we can store;
two, four, eight, 16, and so on and so forth.
So let's just bring this back and discuss this in relation to character sets, images and sound files.
And we've covered this in the previous three videos, but we're just going to bring it all together here.
So for character sets,
the number of bits available will limit the number of possible characters which can be represented.
So if we were using four bits, we would have two to the power of four or 16 possibilities.
Well as you can see from the table on the right,
we couldn't even represent the English alphabet if we were only using four bits,
let alone worry about the difference between upper and lowercase, numbers and symbols.
When we talk about images,
typically, a high-quality bitmap will use a minimum of 24 individual bits to store the value for every single pixel.
Two to the power of 24 means that a single pixel could represent one of 16.7 million different colours.
And this is why bitmap photos often look so high-quality.
Of course, as soon as we start to limit the number of bits,
the quality of the overall image decreases, as we can store a smaller range of colours.
So let's consider sound.
With an audio CD, we typically use 16 bits.
Two to the power of 16 is approximately 65,000.
This gives us a 96-decibel range.
If we think about DVD or Blu-ray formats,
we tend to use 24 bits.
As we saw just now from looking at bitmap images,
two to the power of 24 is roughly 16.7 million combinations.
This gives us 144 decibels of dynamic range.
Again, if we started to limit the number of bits which could be used to store each sound sample,
you would start to notice the quality of the sound sample decreasing.
(uplifting piano jingle)