Basics of Programming #2 – Components of the Computer


OK, yes, I know what you’re looking at,
you’re looking at 38 minutes thinking: “DOES THIS SAY 38 MINUTES – I HAVE A LIFE, I HAVE
THINGS TO DO, WHY WOULD I WATCH A 38 MINUTE VIDEO.” Well, let me explain.
This video is, in one sentence, the most complicated video in the series. Well, that does include
the next episode as well. You’re watching this series, because, you want to learn how
the program – I mean, who doesn’t! I can imagine that, the 38 minutes thing there…
Isn’t very reassuring. And, in fact, when you’re halfway through the video… You
might be worried that you’re going to forget all of this… or, you’re not following
it. But, don’t worry about any of that! Here’s the entire video. Image 1… Image
2… and Image 3. That is the entire contents of the video. That’s really all you need
to remember. The only reason this video is as long as it, is just because those three
images are obviously very abstracted. Don’t worry about the fact it’s 38 minutes,
and don’t worry if you struggle a bit in the middle, because, theoretically those are
the only three images you need to remember. OK, now that you’re hopefully… A bit cooler
with the whole 38 minutes, and how “involved” this might seem, let’s dive in.
Alright, following Episode 1, time for some more of our favourite theory. Now, in the
last, super-simple episode I mentioned a bit about buses and bits and binary. This video
is about the components a computer is made up of!
Alright, alright, now, just to test you, let’s do… Quick Quiz time with Alex. Is a keyboard
an input or output? OK, yeah, it’s an input, come on… But what about a screen… Is that
an input or output? This one is an output… What about speakers… Input or output? Output
as well – awesome! Before we dive in, let me just make sure we
definitely know about the units we use to represent the number of bits, now, I expect
you to generally know these terms, but, I just want to make sure that we definitely
know these, and we know them properly. We have 1 bit, right the way at the bottom, right?
And, 4 of these bits, goes into what’s called a “nibble”, I don’t really know why
it’s called that… It just is. 4 bits go into a nibble. We definitely know the next
term – a byte, that’s 8 bits. Then, we go further into “Kilobytes”, and there
are 1024 bytes in a kilobyte. Then, we have a megabyte, and, once again, there are 1024
kilobytes in a megabyte. This is then followed by a gigabyte, terabyte, petabyte, and even
an exabyte. So, if you don’t know any of those – download link in the description,
at least look least of them from time to time, and, assuming that you do know what I just
explained, let’s get into it. Now, then, we all remember this magical black
box that does stuff. Now, in the last video, we sort of took the cover off the box… But,
you see, all of those wires that are inside the computer are split up into groups. Let’s
look at these groups together. OK, as we take the cover off again, I’ll
just consider the main part of the computer as being in three groups.
The first group is the CPU – this stands for “Central Processing Unit”, this is
known as the “brain of the computer”. All of the maths is done in here, all of the
code is handled in here, the rest of the computer… Is managed from here. Without a CPU, the rest
is basically useless because there’s nothing to use them.
Which brings us onto the RAM, standing for “Random Access Memory”, we also refer
to this as the “primary storage”. This stuff temporarily stores data, I’ll talk
a bit more about what that means later. Next is the, what I’ve titled “Storage”,
part. This is also known as secondary storage. These things, which, once again I’ll focus
on later are where all of your files and stuff go. There are lots of different types of secondary
storage, here are some of them: You’ve got the hard drive. You’ve probably
all heard this… but, uh, why’s it called hard drive… That sounds a bit odd. Well,
time for history with Alex, back in the day, floppy disks really used to be… floppy and
the reason they were floppy was that they were literally made of two pieces of paper,
with a little magnetic disk put in between. Now, of course, over time floppy disks improved
in quality and then they started making the casing out of plastic… So, they kind stopped
being floppy. But, because they used to be floppy, hard drives, were obviously a lot
more solid, and, that’s how they got the name… hard drive!
Now, hard drives are really odd. If you were to look inside a hard drive the way they work
is they have an arm, and this arm goes on top of what’s called a “platter”, and,
essentially, this platter has 1s and 0s all around it. And, it spins around really quickly,
and what happens is that… If we wanted to access a file, what would happen is the arm
would move on top of the platter and read the 1s and 0s off of it.
So, you know how some computers can make this noise? That’s the hard drive! That clicking
noise is the noise the hard drive makes as the arm moves about. So, what’s the advantage
of the hard drive? Well, it’s cheap! Hard drives can go all the way up to 8TB, for a
pretty low price. And, that’s because it’s really not difficult to make this platter,
slap a motor on it, and slap an arm on top of it. But as you might imagine. Hard drives
are slow. Compared to some other secondary storage devices, they are really slow. And
that’s… Just because of the whole idea of how they work. Also, they’re noisy, which,
is why they are definitely not good to use in mobile phones… Could you imagine phones
being that loud? So, that’s hard drives. What’s next? Well, remember that Quick History
with Alex just a minute ago? I guess we could also count floppy disks as another secondary
storage device, even though no one uses them nowadays. Awesome, well, what’s next? What
else can we use to store files and stuff? Well, we also have USB sticks, which you can
plug into the computer! These still technically count as “secondary storage devices”,
even though they’re outside the computer. What else? Well, we have a CD. This goes into
a CD drive… And, CDs technically still count as secondary storage devices – they can
store data permanently and be accessed by the computer.
Well, finally, we have the most recent one… SSDs, SSDs are really fast and they work very
similarly to USBs. If you look inside an SSD, it’s just a circuit board, with a bunch
of little chips on it… And, these chips can store data permanently without needed
any moving parts at all. Most phones have SSDs inside them. Of course, there are disadvantages
to SSDs… The first disadvantage is that SSDs are a lot more expensive than hard drives
– it costs quite a bit of money to make those chips. And the second disadvantage is
that… Depending on what you’re using them for… SSDs can actually last less time than
a hard drive before failing. You see, SSDs have limited “write cycles”, and these
are the number of times the SSD’s data can change. Essentially, for some things, it can
be better to use hard drives. A perfect example of where SSDs would be awful to use is for
CCTV cameras. CCTV cameras are constantly saving all of that video, all the time…
An SSD would not last that long – we’re talking one or two years, maybe even less,
if it was constantly saving hundreds of gigabytes of video every second.
Whereas, a hard drive doesn’t have this limit. The most common reasons that a hard
drive would fail would commonly be things like if the arm hit the platter, or just the
arm stopped working, which is possible because all moving parts fail eventually, or even
if the platter literally shattered into pieces because you dropped the hard drive.
Alright, now, there are more secondary storage devices, but these are the main ones that
you would typically expect. Cool, and, there’s another section that
I’ve titled “I/O”, now, this part stands for “Input/Output”, and, we already know
what that is. These are essentially just socket that things can plug into from outside.
Alright, now how are these things connected together? Well, all of them are attached to
a board called the “motherboard”. The reason it’s called the motherboard is that…
Well, it’s the main board. This is the big green board that everything is connected to.
It joins up the RAM, the CPU, the secondary storage. And, in fact, most of the I/O, is
actually built into the motherboard itself. Can I just mention, before we hop into real
life, yes, we’re going to hop into real life in a minute, that there are also some
extra components that I’m not really going to get into. You also have the “PSU”,
this is the “Power Supply Unit”, and it is literally just the part that plugs into
the plug socket on your wall. You plug it into the plug socket, and it gives the rest
of the computer the power. There’s also the GPU, standing for “Graphics Processing
Unit”, and this is in charge of outputting to the screen and all of that stuff. We’re
not going to worry about that at all probably in this entire series. Since that’s a whole
other topic. Right, as I promised, we are now going to
dive into real life. Yes… All right, so, what I’m going to do now, is take a look
underneath my desk here, and I’ve already taken the physical case off my computer so
that we can take a look inside ourselves… Now, notice that there are fans all around,
this is the other reason why computers make noise. Obviously, computers produce heat,
so, we use these to blow air over everything and keep it cool.
Now, right at the bottom left corner, we’ve got this black box, and this black box is
that “PSU”, the Power Supply! As you can see, literally all the Power Supply does is
it splits that big amount of power coming in into lots of little amounts of power in
each of these cables. Each of these little cables transfer power to a different part
of the computer. Alright, now, if we just move back a bit here, you can see that big
green board there, behind all of the cables, is the motherboard! The CPU, the RAM, the
GPU and the I/O are all on there. Why don’t we start with the Secondary Storage
devices? Now, in this computer the secondary storage devices are away from the motherboard,
they’re connected using wires, and they’re over here, behind this metal section.
In this computer, right now, I have one hard drive, one SSD and a CD Drive! Right at the
top here, we have the CD drive, and, you can see it has two cables. The first one is the
power cable, and this cable goes right into the Power Supply. Next, we have the data cable,
and this data cable plugs into a socket on the motherboard. Look at this here these are
all the sockets that the hard drives and SSDs plug into – as you can see, this specific
motherboard can only have 6 secondary storage devices plugged into it.
Next up is the SSD, look at how tiny this SSD is in comparison this other hard drive
that I have in my hand. Of course, all of the secondary storage devices have to fit
somewhere, so, what this case has, is it has these little sockets that the secondary storage
devices can be screwed into, so that they stay in place, but the SSD was so small, that
we had to get this plastic adapter so that it would actually fit in the slot. Once again,
this has power, and then it has a data cable plugging into the motherboard.
And, finally, is the hard drive, well, this is exactly the same except it didn’t need
an adapter, and it just has power and a data cable.
Awesome! Well, those are the secondary storage devices, now, let’s identify the CPU, RAM
and the I/O. The I/O is super easy to spot. It’s literally
attached to the motherboard right here. Right at the back of the motherboard, we can see
all of these sockets, which obviously just poke out the back here. Cool! Well, now, where’s
the CPU? Well, it’s pretty easy to spot. It’s the thing with a massive fan on top
of it. You see, the CPU has so many millions of cables inside it, that it has this massive
fan on top of it. In fact, here’s a picture of a CPU. They are TINY, and yet, most of
the millions of cables that I referred to, are inside this tiny little thing. Each cable
in the CPU is about 27nm big. And, obviously, this tiny little thing is going to get SERIOUSLY
hot while it’s turned on. So, what we have is where have a massive fan put on top of
it to help it stay cool. These CPUs are designed to be replaced. You
can take the CPU out of this motherboard, and put in a newer, more powerful, one.
Alright, well, let’s identify the last component, this is the RAM. Now, the thing about RAM,
just like the secondary storage devices. Is that you can just add and remove RAM. This
is the RAM… Right here. And, notice how it sticks out from the motherboard? Well,
the reason is you can take these cards out of the motherboard and replace them with some
different RAM cards. So, my computer has 8GB of RAM, right? Each of these 4 little RAM
cards here are 2GB big, so, joined together, they make 8GB. Let’s say… I wanted, 10GB
of RAM… I could just take one of these cards out, like I have, and put in a 4GB RAM card.
Then, it would all add up to 10GB. All right, well, I think that’s all the
real-life stuff we need. Now, just in case you’re wondering… This big card in the
middle is the GPU, and, just like the RAM, it’s pretty easy to remove – it’s only
the CPU that’s a bit difficult to get out. Also, I know that it might seem like all of
these come with the motherboard. But, no, they don’t. If you go online and buy a motherboard,
it won’t come with any of these, the only thing that I’ve described that it would
come with is the I/O over here. Everything else, the CPU, the RAM, the GPU, the PSU,
the Secondary Storage Devices, the casing, none of it comes with the motherboard. When
you build a PC yourself as I did with this computer here. It’s actually really easy
to do with a bit of guidance. You choose the motherboard, then you choose a CPU you want,
then you choose some RAM cards, depending on how much RAM you want. You choose a GPU,
a case – this metal thing here, a PSU, and an SSD or hard drive or both, whatever you
want for secondary storage. And, then, after you’ve bought those, all you need to do
is just put them together. Put the CPU into the little square socket on the motherboard,
put the big fan on top of the CPU, put in the GPU, put the RAM in… Connect the PSU
to the motherboard and everything else, things like that – it’s really easy to build
to a PC, it’s literally just about connecting everything together.
OK, I’ve had quite enough of the real world, let’s get out of there, and get back to
where we were, shall we? Now then, let’s decide which one of these
components we’re going to explain next… And… It is going to be… The RAM!
So, the RAM stores temporary data that the computer needs while it runs… For Example,
all of the programs you have running, and what state they’re in are stored in the
RAM. This is different from those secondary storage devices that you have, which store
data permanently. The technical terms for this are “volatile” and “non-volatile”.
Volatile means that the data is lost when it loses power… Which is what the RAM is,
and the non-volatile, well, means the opposite, it means that the data will stay even when
the power is turned off. Very simply, the difference between these
two is that the RAM (which is the primary storage) only stores temporary data that’s
used while the computer runs, whereas the secondary storage stores permanent data, like,
all your pictures, all the apps you have installed, that sort of thing needs to be permanently
stored. But, wait for a second here, if we have these secondary storage devices… That
sound so perfect… Why don’t we just use those for the temporary data as well? Why
do we need a primary and a secondary storage? Think about it, why couldn’t we just use
a hard drive as RAM. Doesn’t it seem a bit pointless to have RAM and a hard drive? Well,
actually, there is one major reason why we have RAM. And I can sum it up in one word:
Speed. RAM is much faster than Secondary Storage
– and it doesn’t matter whether it’s an SSD, a hard drive, a USB, it is faster
than all of them. Now, there is one issue with all this. RAM is also more expensive
than Secondary Storage, for example, video files are massive – most of the top 100
biggest files on my hard drive are videos. Now, as of uploading this, the typical amount
of RAM is 8GB. That’s kind of considered a minimum expected. By Comparison, you can
have hard drives well up to 8TB. Now, this all being said, the fact that it
costs a lot of money to get a lot of RAM isn’t really that big an issue, because, you don’t
really need that much RAM. Don’t forget RAM doesn’t store files, doesn’t store
videos or anything like that – it just stores some data that a program is using at a time.
An example is, let’s say, if you have a menu open in an app, in the RAM, the app would
store whether you have the menu open. Maybe for when you are browsing the web, it would
be data like… What page you’re on now – how far scrolled down in the page, that
sort of temporary data is remembered using the RAM. So, if that’s the sort of the data
that we’re storing, it’s not really that big of a deal. The programs that take the
most RAM are programs like Video Editors. Which store just a little ahead of where you
are in the video so that it can play quicker. Right, then, well we know the sort of data
RAM would be storing, let’s do a very simple example… Opening a Word Document. So, when
you double click on that “docx” file, what’s going to happen is your system knows
that a “docx” file needs to open in “Word”, so, what it technically does first, is it
hops to the hard drive and loads up the EXE file for Word, which contains all of the code
for Word, all of that code now goes into the RAM. Then, your system is going to start running
that code, and it’s going to tell that code you wanted to open this file. Then, the code
is going to ask the hard drive for the data in that file. And, as the hard drive chucks
out 1s and 0s, it will start putting the document in the RAM somewhere as well. Then, once it
has received all of those 1s and 0s from the file, you’ll be able to see it and edit
it and so on. Now, you know how you have to click on “Save”
all the time, right? (Well, you should click on save all the time). Why do you have to
do that? And, very simply, it’s because all of the changes you’ve made are stored
in RAM – the file on the hard drive is exactly as it was before, the only data that’s changed,
is the stuff in the RAM, and, the simple reason for that again is, that’s a lot faster,
trust me, you would know if every single time you typed in a letter, it would save to hard
drive, it would be painful. So, what happens is… It doesn’t go onto
to the hard drive until you click on “Save”. And, when you do click on “Save”, all
it does, is just copy the document you have in the RAM, on top of whatever was there previously
in the hard drive. Of course, though, if you don’t click on Save, and you close the program
without saving, that data is now gone, it never went onto the hard drive. I mean, if
you didn’t shut down your computer it might technically still be just sitting there in
RAM doing nothing, but it won’t be long at all until some other program comes and
uses that space and starts replacing it with its own stuff, so, really, it’s pretty safe
to assume it is gone. So, that’s how RAM is used. There’s one
more thing I’d like to mention about RAM. And, let’s just see first of all, if you
can work why this is the case. In 32-bit computers you can only have 4GB of RAM – that is the
limit, the computer can’t handle anything higher… Why do you think that is? Think
about how big 4GB is if you were to put into a number. I’m sure you remember that 32-bits,
has a limit, as does 64-bits. But, that 32-bit limit is exactly the same as if you were to
count every single 1 and 0 in 4GB. In order to make this just a bit clearer,
let’s see how computers actually access the data in RAM. Of course, we know everything
is a 1 or a 0, and, the way that our CPU accesses these 1s and 0s, is that it very simply gives
each of them a number. And we call an address, just like an address to a house, this number
is where this 0 or 1 is. Address 0 is the very first 1 or 0, Address 1 is the second
1 or 0, Address 2 is the third 1 or 0, and so on, and every 1 and 0 has an address, and
it just goes up and up. Now, inside a 32-bit computer, this address… well… is 32-bits.
So, if we had more addresses than 32-bit can handle, which is what we would get if we had
more than 4GB… Then there’s no way we could give anything that goes beyond the first
4GB… An Address, we just can’t. So, a 32-bit computer can only use 4GB of RAM. By
Comparison, a 64-bit computer is all the way to 4EB, and that’s the unit above PB. It
is massive. Not even Twitter and all of those millions of twitters go into EB, apparently,
every single tweet combined only takes up 4PB. Well, I say “only”, I mean that is
still a massive number, but it just shows that the number 64-bits is so big, we definitely
won’t need to go any higher for a long time into the future.
Awesome! So, we’ve covered RAM, very heavily, we’ve basically gone over I/O as well, so,
we don’t need to worry about that, the most important thing to have taken away from all
of that about the RAM, is a more logical view on how the computer uses both the RAM and
the hard drive together to do things, like editing a Word Document.
Right, now, we’re at the final thing for this video, and… kind of the most complicated
part… Yeah, this video really has jumped into the deep end but bear with me here, OK?
This plus the next video is literally the most complicated we will learn in this entire
series if you can get your head around all this, I can guarantee you are basically set
for the rest of the series – the rest is basically easy stuff. So, if you can understand
this video and the next video, the rest is going to be pretty easy.
Now, we go onto… The CPU, we’ve gone over everything else, the RAM, the I/O, the PSU,
the motherboard, the secondary storage, we’ve gone over all of it. And, all of these are
the things that the CPU uses, on their own, everything that I’ve just covered is useless,
without the CPU, there is literally no point in any of it being there because nothing would
actually do anything with it. By the way, just before we look at this CPU,
comment down below if you have a 32-bit computer or a 64-bit computer. To check which one you
have, just click on “Type here to search”, and type in “This PC”, then right click
and click on “Properties”, and it will just tell you right there. It’ll be interesting
to see how many people have 64-bit computers now.
So, the CPU, which is also known as the “processor”, everywhere you hear “processor”, it refers
to the CPU, can be split even further into even smaller chunks, as we did with the computer.
But right before I do that – there’s something you need to know about CPUs (or processors).
Everything I’m going to describe on the CPU right here does not apply to all of the
CPUs in the world. And, that’s because different CPUs have different “architectures”. If
you look at, for example, the CPU in a desktop computer and one inside a mobile phone, you’ll
see that on the inside of the CPU, they’re a bit different.
OK, so, Quick History lesson with Alex here, there was a guy, ok, called von Neumann, this
guy came up with… one of the first CPU architectures, which he super creatively called… the “Von
Neumann architecture”. Now, this architecture was excellent, so excellent in fact, that
computer today still use this in some form. But there was a bit of a problem, you know
how the code has to be put into the RAM, alongside the data, well, there was something that really
slowed the computer down. And, this was so significant, that is became known as the Von
Neumann Bottleneck. You see, the CPU could only get one thing at a time from the RAM,
so, if we had a bit of code that wanted to get some data from RAM, it would have to first
get that piece of the code, and then it would get the data. And, this slowed it down a bit,
so, instead of only being able to access one piece of data at a time, they would let it
access two pieces of data at a time. The idea behind this is that one bus could be used
to get the code, and the other could be used to get the whatever data the code wanted.
So, essentially, it could then access two things from RAM at a time.
This was apparently so significant, that they made a whole new architecture, and they called
it the “Harvard Architecture”. Which is really strange, because it’s not even a
new architecture… It’s just a beefed up Von Neumann that can access two things at
once. So, to keep it simple, I’ll be talking about
the CPU as if it’s a Von Neumann CPU, but just keep in mind that most modern CPUs are
a tiny bit different to this in that they can actually access two things at once.
Now, Von Neumann’s overall idea stuck… But, as I said at the beginning of this bit,
if you looked inside a desktop or laptop computer’s CPU, it would be slightly different from a
mobile phone’s CPU. And the reason is that there are two modern architectures, which
are both based on the Von Neumann architecture. everything I’m going to cover, applies to
both of them, since they’re very similar, so don’t worry about it too much, but it
is good to be aware of one of the reasons, why you can’t just take some code out of
the RAM of a desktop computer, and then put it into the RAM of a phone or tablet or something
like that. Because the code is slightly different because the architectures are a tiny bit different.
Now, don’t worry too much about this info, but, the first modern architecture is called
“x86”… It’s pretty old, it’s been around for quite a while. There’s also another
version of it called “x86_64”, which is the 64-bit version. So, when I say “x86”,
I’m referring to both. This is the one that’s found in a desktop or laptop. And the other
one is the one used in mobile devices, things like your Android tablets, your android phone
things like that. That one is called “ARM”. Essentially anything that needs to be small
and portable, and doesn’t need to be super-powerful, would have an ARM processor inside it.
So, what’s so special about ARM processors? Well, ARM processors use up less energy and
they produce less heat. The latter is really important because could you imagine having
a fan inside a phone… It really wouldn’t be very portable. Laptops tend to have fans
though because they tend to have x86 processors. Now, we’ve got a very similar question to
what we had with the RAM and hard drive… If this “ARM” is “so perfect”, then
why don’t we use it in non-portable devices? And, it’s exactly the same answer as well.
ARM… is slower than x86 processors. x86 just is faster.
Alright, enough of all of that “architecture” rubbish, just remember this, you have x86
for non-portable devices, and ARM for portable devices and both of these are roughly based
on the Von Neumann Architecture. Right, then, let’s take the cover off this
CPU and see the three main components it’s made up of.
And here it is. The Control Unit, the Register and the ALU. Right,
Starting off with the ALU – which stands for “Arithmetic Logic Unit”, this one
is super simple. The ALU is in charge of two things. The first one is “arithmetic”
which is maths, any time you add, subtract, multiply, divide, shift binary (which is something
else I might mention in a couple of videos later), anything like that, the ALU is used.
So, now, what about the “logic” part of the name? Well, it’s a bit difficult to
fully explain until we’ve really started coding, but, it’s the job of this part…
to do things like comparing two binary numbers. So, is this number bigger, is it smaller,
is it exactly the same, that sort of stuff is also handled through the ALU.
Great, that’s literally all there is for the ALU, it does maths and logic – that’s
it. Next, are the registers… These things are super temporary pieces of data, even more,
temporary than RAM, each register is only 32 or 64 bits long, which, I know doesn’t
seem small, but that’s only 4 or 8 bytes, and, if we consider one letter as one byte,
that’s 4 letters you can store in there – that’s barely anything. And, there are
very few of these registers as well. I’ll really get into what registers are
used for in the next video, but, summed up, in order for the CPU to do anything, it has
to first be put into a register, and that’s just because these registers are built right
into the CPU, these registers are specifically wired up to the ALU and the CU. And, because
they’re specifically wired up to the ALU and the CU – they’re even faster than
RAM, which is kind of also why they exist. Right, well, we’ve come around to the final
part of the CPU, the control unit. Now, the control unit is essentially in charge of managing,
well, really, everything. It’s the thing that’s in charge of communicating with the
RAM. It’s the thing that’s in charge of executing instructions. If the CPU didn’t
have a control unit, it would be very much like a computer without a CPU. There would
be no point in there being an ALU and registers because there’s nothing actually using them.
OK, then, that’s each of the components covered, let’s see how these all work together.
Let’s say we had the number 3 in RAM and wanted to add 4 to it. Well, this number has
to go into a register first. So, the number 3 gets copied into… Let’s just call it
Register A, and this now contains 3. So, now all we need to do is add it. So, what the
CU does is it essentially talks to the ALU and asks it to add 4 to Register A. So, then,
the ALU goes in, does its magic and we now have 7 in Register A. And, then, to finish
it off, the CU will then go in and copy that 7 back in the RAM – and, there you go, we
just added 3 and 4. This happens thousands and thousands of times per second. So, just
remember as you use a computer, be it a mobile phone, a laptop a desktop, or whatever it
is. Just remember that’s it doing thousands and thousands of register swaps inside the
CPU every second. And, now, it’s time for us to quickly revise
over all of that. Obviously, I am not going to be able to fit all of that onto one screen.
So, I’ll put into a bunch of different categories, and, once again, if you really feel like it,
you could actually go ahead and make them your background.
Right, let’s start off with the components. If we look deeper into the computer, we’ll
see it’s split into four parts, the CPU, the RAM, the I/O and the storage.
The CPU is considered the “brain of the computer”, it controls all the rest of it
– it controls the RAM, it controls the I/O, it controls the storage, it controls everything.
Without the CPU, there wouldn’t really be a point in there being anything else.
The RAM, also known as “primary storage”, stores temporary data, like what apps are
running, and what state they’re in. The RAM is volatile which means that when the
computer turns off, all of the data in them is lost.
So, then, if that’s the case… Then what happens to all of the files? Well, they go
into the storage devices. The storage devices store data permanently unless they fail. Things
like your pictures, files, and apps are put onto the storage devices.
And, finally, is the I/O, which is super easy to remember since that was literally the topic
of the last video, Inputs and Outputs. These are usually directly on the motherboard.
Which I suppose reminds me, that, all of these components in some way are attached to the
motherboard. Some of these are directly on the motherboard, and some are connected using
cables. Cool! There it is, download link in the description.
The next topic is what secondary storage devices we have. Well, we have a hard drive, this
is called a hard drive because floppy disks used to be floppy and by comparison, hard
drives are just more solid. These things have a moving arm inside them which goes on top
of the spinning platters. We also have CDs and USBs, which, I’m sure
you already know about. And, then, we have the SSD. This is the latest addition to this
list, and the SSDs are a lot faster than the hard drives and they don’t have any moving
parts inside them. However, they have limited “write cycles”, which means, their data
can only change a certain amount of times. This means that SSDs are best for places where
the data doesn’t change a lot, like, for example, an archive, it would be fast, SSDs
would definitely last a lot longer than a hard drive if all you with them is just load
from them. But, for something like CCTV cameras, where the data is constantly changing, thousands
of gigabytes every second… They’re really not a good idea, because, they’re not going
to last very long. Which brings us onto the final topic, the
CPU. When we look inside the CPU, we’ll see three things: The Registers, The ALU and
The CU. The ALU is the easiest one to remember, this is the arithmetic logic unit, and this
is where all the maths and logical things happen.
Next, we have the Registers, these are really tiny little storage areas for the CPU, each
of them only being about 32-bits or 64-bits, these things are even faster than the RAM
because they’re wired directly with the ALU and CU. Whereas, the RAM has gone through
the motherboard, which slows it down a bit. Finally, we have the CU, this is the “Control
Unit”, this is essentially controlling the entire process of running code, moving data
in and out of the registers, and things like that.
OK, so, there’s the CPU, go ahead and download this if you want – and, that is this video,
summed up in three screens. So, I suppose the final question is… What
is the next video going to be about? Well, the next video is going to be about “Software”,
you know how I kept on saying “that code in the RAM”. We’ve been looking at the
hardware so far, which is the physical stuff, so, now, we’ll start thinking about how
the computer knows what code to run when it boots up, or how your programs are managed,
things like that. And, that’s all there is for this video.
But, don’t forget to post that comment saying whether your computer is 32-bit or 64-bit,
if the next video is out, it’s going to say right over there, so, take a look at that,
maybe also click on the Subscribe button. And I will hopefully see you, in Episode 3.

Leave a Reply

Your email address will not be published. Required fields are marked *