Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
A computer without a program running is just a hunk of hardware. Hardware is anything that is well... hard, like a desktop, tablet, or smartphone. Let's look inside a computer to see where our data and programs are stored.
A computer without a program running on it
is just a hunk of hardware.
0:00
Hardware is anything that's well, hard,
like a desktop, tablet, or smartphone.
0:04
In order for a piece of hardware to do
anything, it has to run programs.
0:10
In order for
0:14
programs to work, they need to be written
in a way a computer can understand.
0:15
This is where binary and data come into
play.
0:20
Programs themselves and what you create
when using them are all stored as data,
0:23
which are just a lot of binary digits,
ones and zeroes.
0:27
[SOUND] One of the first programs you see
when you turn on [SOUND] your computer is
0:31
the operating [SOUND] system.
0:35
The job of the operating system is to help
all [SOUND] other computer programs work
0:37
by handling the messy details of
controlling the computer's hardware.
0:42
[SOUND] The operating system is the core
software component of a computer and
0:46
provides an interface between the [SOUND]
hardware and the software.
0:50
Say, for example, you wanted to open an
application.
0:54
You would have to click on it either with
your mouse or tap it with your finger.
0:57
That click or [SOUND] touch is called an
event.
1:02
[SOUND] When you send that click through
your mouse, touchscreen or
1:05
keyboard, it's the operating system's job
to watch for that event.
1:09
[SOUND] When you click an application,
part of the operating system's job is to
1:13
stash the mouse click's information in
memory until it can be processed.
1:18
In addition to storing events as data,
applications are data, and what's inside
1:22
those applications are data, like
documents, photographs, video, and music.
1:27
In order to save all this data,
1:32
your computer uses a few different types
of electronic storage depending on
1:34
the priority and type of data you want to
store.
1:39
To store data into memory in an efficient
way,
1:41
there are a few different types of memory
to choose from.
1:44
RAM and virtual memory are temporary
storage areas.
1:48
And a ROM and hard drives are permanent
storage areas.
1:52
Let's see an example of how these work.
1:55
[SOUND] From the moment you turn your
computer on to the moment you turn it off,
1:58
your computer is constantly using memory.
2:03
When you turn on your [SOUND] computer and
it loads the operating system,
2:05
it's usually loading this from the hard
drive to the system's RAM.
2:10
This allows the central processing unit,
or CPU, to [SOUND] have immediate access
2:14
to the operating system, which enhances
the overall performance and functionality.
2:19
Similarity, when you open an application,
it's loaded into RAM.
2:25
In order to conserve RAM usage,
2:30
many [SOUND] applications load only the
essential parts of the program at first.
2:31
It will only load other [SOUND] pieces
when you ask for them.
2:36
Say you click on the Word application on
your computer.
2:39
Your [SOUND] operating system receives
that request and Word is loaded into RAM.
2:43
[SOUND] Then you want to open up a story
you're writing.
2:47
When you click on your story document,
that file's then loaded into RAM.
2:50
After reading for awhile, you make some
changes and then [SOUND] save your work.
2:55
When you save, the edited [SOUND] file is
written to the specified storage device.
2:59
[SOUND] If you don't save your work,
3:04
it won't transfer the data to a more
permanent storage area.
3:06
And it will be lost if you suddenly
[SOUND] quit the application or
3:10
it crashes.
3:14
When you exit Word, [SOUND] the
application and any
3:15
documents are purged from RAM in order to
make room for new applications and data.
3:18
[SOUND] This repeated quick-loading and
3:24
emptying is why is RAM is a temporary
storage area.
3:27
[SOUND] I'm always curious about what
these things actually look like, so
3:30
let's check out the teardown on
ifixit.com.
3:34
I'm going to be using the Macbook Pro
teardown to show you
3:37
what computers look like, but it's always
good to look at the device you're using.
3:40
When you get a chance, search for the
teardown of your own device.
3:45
If you get the chance to deconstruct a
computer at home,
3:48
remember to disconnect your device from
any power supply.
3:51
And disconnect and remove the battery as
soon as you can get to it.
3:55
Okay.
3:59
Now that I'm finished with my PSA,
3:59
let's check out the teardown of my
computer a MacBook Pro.
4:01
Right after they disconnect the battery,
the first thing they remove is the RAM.
4:05
Remember this is the fast temporary
storage nearly all data goes through.
4:10
Next they remove the hard drive.
4:16
Let's jump over to a teardown of the hard
drive so we can see inside.
4:18
Here we can see there's a large disk or
4:23
a few large disks called platters and a
read-write arm.
4:26
Hard drives store memory using magnetism.
4:30
Each large disk in a hard drive is divided
into billions of
4:34
tiny areas that can each be independently
magnetized or
4:38
demagnetized to store either a one or a
zero.
4:42
Magnetism is used in computer storage
because each of these tiny
4:46
areas remain magnetized or demagnetized
even when the power is switched off,
4:49
permanently storing the data.
4:55
The reason why we don’t use this kind of
storage all the time is because it’s
4:57
relatively slow compared to RAM.
5:00
And if you always had to load programs
directly from your hard drive,
5:02
the overall performance of your computer
would be terribly slow.
5:06
[SOUND] Hopefully, this gives you a good
understanding of data and
5:10
where it's stored in the computer.
5:14
In the next stage, we'll leave hardware
behind and
5:16
talk about software and programming.
5:18
To do this, we'll explore the fundamentals
of computer software,
5:21
learn about a few programming languages,
and figure out how they work together.
5:25
You need to sign up for Treehouse in order to download course files.
Sign up