So let's take a look at some terms that I'm sure you're familiar with and you see all
the time.
They are the terms byte, kilobyte, megabyte, gigabyte, and terabyte.
These are terms that are used to describe the memory size and the storage size of your
devices.
So you could say that your Mac has a hard drive that is a certain number of gigabytes.
You could say that the memory on your Mac also has a certain number of gigabytes.
Anytime there's a kind of size of digital things, memory or storage, we use these terms
to talk about them.
Now the root of all these terms is the byte.
So what is a byte?
A byte is 8 bits.
Bits are either ones or zeros.
For instance 01010101 that is eight bits and that is one byte.
A byte is a very convenient term to use in terms of memory because you can store a number
in it from zero to 255.
That's what these binary digits do.
They store numbers but instead of decimal, 0-9, for the digits it's zero to one.
So it takes eight of them to give you a number between zero and 255.
Now one byte is very useful because you can use it to store a single character, like a
letter.
Like the letter J or K or something like that.
Or all sorts of different special characters.
So it's used a lot when thinking of text.
But also you can get groups of bytes together.
Like four bytes gives you a very large range from zero to a very large number in the millions.
It's useful for defining a single number.
A number you might use in a spreadsheet or program or something like that.
Three bytes, for instance, can be used to carry three numbers from zero to 255 which
can be used to define red, green, and blue colors for a single pixel in an image.
So these are examples of some ways that bytes are used.
You can see how three bytes are used for a single pixel of an image and then you have
a very large image and that takes up not just a few bytes but actually kilobytes or even
megabytes of space on your drive to contain that image.
Now kilo is a prefix that's used to describe a thousand.
So you could think a kilobyte is a thousand bytes.
But that's not actually the case.
It's 1024 bytes.
See there's a decimal definition of things like kilo and mega and giga and there's a
binary definition.
The binary definition is not a thousand but 2 to the 10th power which is 1024.
It's very convenient that 1024 and 1000 are really close to each other and that's what
kind of led to using these same terms between decimal numbers and binary numbers.
Now when we have a byte, it's one single byte.
A kilobyte is 1024 bytes and then each one is a multiple of 1024.
So a megabyte is 1024 kilobytes, etc.
So you can see how each one goes up by a magnitude of 1024 more than the previous one.
A terabyte holds 1024 gigabytes.
So you get a 500 gigabyte, GB, drive.
You would think that a 500 GB drive holds 500 times 1024 megabytes since 1024 megabytes
is a gigabyte.
And that, in turn, it would hold 1024 x 1024 x 500 kilobytes or 1024 x 1024 x 1024 x 500
bytes.
That's not the case though.
Because what it actually holds is the decimal definition of those things.
So it holds a thousand megabytes or 1000 x 1000 kilobytes.
Because, of course, it's nice to pad those numbers.
You can get drives that are 500 GB drives with less bytes on them.
So when you get a hard drive that says it's 500 GB that's a marketing term.
They're using the decimal definition of giga.
So it's actually 500 x 1000 to the 3rd power bytes.
It's not 1024 to the 3rd power bytes.
Which actually when you look at it in terms of binary numbers on your computer you get
467 GB.
That's why when you buy a 500 GB drive or something like that and you plug it in and
you see how much empty space there is on this completely empty drive you won't find that
it's actually 500.
It's something less.
It's been done since the beginning of people selling hard drives using the decimal definition
to make the hard drive look bigger.
Now one last thing I want to show you is, of course, we don't normally write gigabyte
or megabyte of any of that.
We abbreviate it.
Kilobyte is abbreviated with KB or sometimes lower case k.
Then MB, GB, and TB.
So when you see a one TB drive it means one terabyte which means that there is probably
a 1000 GB on it.
If they were accurate there would be 1024 GB or a million MB or a trillion KB or storage
on that device.
We use those abbreviations everywhere.
Even when we're talking about speeds.
How many KB per second you can download.
Sometimes we use the lower case b and that's not kilobyte but kilobit.
So if you want to make things look even bigger we can say, oh this is this many bits instead
of bytes.
So a bit being one eighth of a byte that makes everything look a little bigger.
So look for that lower case b to mean bit rather than byte.