Cool Stuff In Engineering No. 9

Jeff Benning
First Engineering Job
4 min readFeb 26, 2017

Every day we store information, pictures, videos, music and other digital media on a computer in the form of data. Have you ever stopped to think how this works? Maybe you have and you might not have liked what you found. It’s incredibly complex and often the explanations are no better. I’m going to try and break it down as simply as possible right here.

There are actually three parts to storing data on a computer, all of which you are probably aware of but may not know how they work. The three parts are

  1. Hard Drive
  2. Ram
  3. Cache
  4. BIOS

How Do They Work?

Let’s break it down

The Hard Drive

I’m going to steal Wikipedia’s explanation because it is just so darn good.

“A […]hard drive […] is a data storage device that uses magnetic storage to store and retrieve digital information using one or more rigid rapidly rotating disks (platters) coated with magnetic material.”

Well that’s what it physically is. Now here’s how it works.

When you store data in a hard drive, binary bits are set by a read and write head that magnetize specific parts of the disks. This represents a series of bits (1’s and 0’s) so the data can be interpreted later.

The advantages of a hard drive are its capacity and ability to store data without power. Its disadvantage are its read and write times, mostly because it requires the print head to physically move and the disk to actually spin in order to write data. These mechanical operations take time.

Random Access Memory (RAM)

RAM is installed in a computer in the form of sticks which are fairly easily replaceable and upgradeable. Modern RAM takes the form of integrated circuits, which is basically a tiny chip that contains a whole bunch of tinier electric circuits.

It works by storing frequently used programs from the hard drive onto it to reduce read times. Since the RAM has no moving parts, it doesn’t have the same physical limitations as the hard drive does. It doesn’t store data for long time use, however. As you open and close programs, older programs are cleared from the RAM in order to store the new ones. If you have too many programs open at once, you run out of RAM and you’re computer runs very slow, or even crashes.

Its advantages are its quicker read/write times. Its disadvantages are its size limit and the fact that when power is removed from it, the data is lost.

Cache

Cache is memory that is physically included on the processor. It can have several levels referred to as L1, L2, etc. and is the fastest memory on the computer. The programs that are used even more commonly than what’s on the RAM are stored here. This is why if you open a program right after you close it, it opens faster than if you close it and open it tomorrow.

The biggest advantage is how fast it is to read/write speed while the disadvantage is it’s small size.

BIOS

I need to throw this in here for completeness. The BIOS, or Basic Input/Output System, is the firmware for how the computer will identify and test its hardware and for how it will load the operating system. Firmware means that is was built in with the motherboard, where the BIOS is stored, and cannot be changed. At least not easily.

How They Work Together

The purpose of all computer memory is to store data for future use. The only way this can be done is within the hard drive because that is the only memory that can store data in the power-off state. So when you hit that power button for the first time, the first thing that happens is that the BIOS turns on and performs hardware checks. It then loads the operating system from the hard drive.

The information for the operating system is stored in the RAM and any startup programs are read into the RAM and then the cache. This is why disabling startup programs can make your computer start faster.

Now when you start a program, the computer first looks to see if it is in the cache. If it is, it load it super-fast! If not, is looks at the RAM. If it is still not there, it gets it from the hard drive. So it looks in the fastest but smallest memory and moves down to the slowest but largest memory.

This is also why a solid state drive is so much faster than a hard drive. Since most of the programs are stored on this drive, the computer doesn’t have to worry about the physical movement of the hard drive in order to find the information it wants. It’s like reading a giant stick of RAM (kind of but not exactly).

So that’s a quick rundown of what your computer is really doing behind the scenes. Hopefully this was simple but accurate. You could read pages and pages on this but if you really want to learn more, read the Wikipedia’s!

BIOS

Cache

RAM

Hard Drive

--

--

Jeff Benning
First Engineering Job

I am a mechanical engineer, designer, and fabricator. I write stories on how to build things. See my work at JeffBenning.com