Blog

What is a Computer?

In the age we live in where computers run the world, it begins to beg the question, “What is a computer?” This question can further be extended to, “Is my laptop a computer? Is my desktop a computer? Can my toaster be a computer?” Well, by definition a computer is: an electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program.

When I first started getting interested in the world of computers and how they execute their operations, this definition didn’t quite make sense. As a result, I spent multiple weeks learning from different books on computers and computing to eventually come to a conclusion on “what is a computer?” In this article I’d like to share my thoughts and ideas on “what is a computer?” to help anyone who’s confused on what a computer is, just like I was a few years ago.

The Brain

The human brain is a fascinating thing. The human brain can calculate the exact position in space of all of your body parts, such as your hands, even when your eyes are closed! The brain is so powerful that it’s the only body part that contemplates itself (just take a moment to ponder about that). The interesting part is that the human brain runs completely off of electricity, but so does a computer. The brain can remember things for years, but so can a computer. The brain can execute several different types of calculations in milliseconds, but so can a computer. Doesn’t it look like there’s a connection between the computer and the human brain? The computer, a piece of metal, something that we, humans, have designed to make life easier for us is almost identical to what’s already inside our heads!

Throughout this article I will be referencing the human brain to make understanding how the computer works a little bit easier because, coincidently, a computer functions just like the brain. Now, I think we’re ready to start talking about the computer. So we’re going to start learning about the most important part of the computer first, the CPU!

The CPU

Well, what is the CPU? CPU stands for: central processing unit and is the most important part of the computer. To put it simply the CPU executes instructions such as: arithmetic, logic, and I/O operations (input and output).

But what does all of that mean? Let me try to put it this way. Every single second, the human brain has to relay messages to the body for various different tasks. For example, throughout this article you haven’t had to tell yourself to breathe…right? That’s because your brain, more specifically your subconscious mind, is controlling that for you. In the same way, the CPU is like the “brain” of the computer. The CPU receives messages from other parts of the computer as instructions in the form of electrical signals and later executes those instructions, like breathing for humans or moving your fingers on your mouse to scroll on this article.

Let me give you another example. Let’s say you’re taking a math test and you’re stuck on the last problem of the test and it’s a tricky one. How do you solve it? Well, the first thing that the human brain would do might be to panic; however, the brain would calm itself down and try to remember past lectures/classes as to how we can solve the problem. It would do this by looking into its “memory” and taking out all the bits and pieces that it thinks are relevant to the problem being faced. Then, it would realize that with the now armed knowledge we can solve this problem! (This would be the “oh yeah!” moment when taking a test). The brain would begin to undergo all the necessary calculations needed in order to solve the problem. In the end, the brain would arrive at a solution and you, the test taker, would write down that answer and turn the test in knowing that you just pulled off the save of a lifetime! 

That would be a heart racing moment…but how does that correlate to the CPU and computers? Look at it this way: when you were taking the test and you were trying to remember past information, that would be equivalent to the CPU fetching data from the computer’s “memory” and storing it in its CPU memory, also known as registers. Then, when you would be solving the problem in your head, that would be equivalent to the CPU executing the instructions from the data received, such as performing arithmetic operations (addition, subtraction, multiplication, and division). Finally, when you would write the problem down on your test paper, that would be equivalent to the CPU finishing execution and moving on to execute another instruction.

Now that the confusion on “what does the CPU do?” is cleared up, the question that still remains is “how does the CPU fit into the picture of computers?” The answer to that is just like how animals, insects, fish, and all living things cannot function without a brain…a computer cannot function without the CPU because the CPU does the “thinking” and “processing” for the computer, just like how the human brain does all of the “thinking” and “processing”. That’s why it’s the most instrumental part of the computer because without it the computer can’t even function, let alone start!

We’ve already tackled the most important part of the computer, the CPU, but we still haven’t answered the question, “what is a computer?” For that we’ll have to take a small detour to RAM.

Random Access Memory (RAM)

The land of Random Access Memory, or RAM for short, is a vast and “random” world. The name says it all, this piece of machinery is memory that can be randomly accessed by the computer, more specifically the CPU, whenever it wants. But, what’s the purpose of RAM? Before I can answer that question, we should probably understand the importance of memory. 

Every moment in our lives is stored somehow in our brains. All of our happy/joyous thoughts are stored permanently in our brains, some other thoughts and ideas enter our brains for one moment and exit the next. This exact type of memory is known as RAM inside of computers. Not everything that happens in our lives we have to remember for eternity. Some things are part-term and only need to be known for the task at hand.

To make this easier to understand look at this example: let’s say you’ve just finished a tiring week and are ready for the weekend, but then you realize that before you can enjoy complete relaxation you must complete your list of chores. Thus, you start working on each chore starting from first to last. During each chore you are constantly remembering things relating to only that chore. For instance, if you are washing the dishes then the brain would create a counter to store the amount of dishes left to clean, for example: there are 10 more dishes to go or 15 more dishes to go. The number doesn’t matter here but the point I’m trying to make is that the brain is constantly storing information for certain purposes and then disposing it when it’s not needed. This can be seen with the dishwashing example, when you’re 60 years old will you still need to know that list of chores you had when you were 21? Nope, that’s because that information is only needed to be stored for the duration of the task or as long as needed.

Now I should probably answer the question, “what’s the purpose of RAM?” Well, I actually already did, sort of. The purpose of RAM is to have a place in the computer where the computer can store random pieces of information that it needs for the duration of the task at hand. To be more specific, if the computer needs to store information in RAM for as long as the computer is ON, then it can. The whole point of RAM is to have a place where you can store temporary information. RAM is quite similar to a temporary storage room, as the seasons change different furniture and items enter and leave the room. The only difference between RAM and the storage room is that when the light in the room goes off, the furniture still stays; however, in RAM’s case when the computer turns OFF the information is lost. This circles back to the fact that RAM isn’t permanent memory, it’s temporary memory that has no limitations on when it can be accessed and how.

To further solidify this concept the idea of random access memory is like when your friend tells you a really funny joke. When you hear the joke your brain would store it in  a “random memory location”. Throughout your day you would continue to remember your friend’s joke because your brain has sneakily stored it in its “RAM”. Then when it’s time to go to sleep you remember the joke one final time and then fall asleep as you forget about the joke because your brain disposed of the joke from its “memory”.

This is exactly what the computer does with its information. Sometimes it needs to remember things for as long as it’s “awake”, such as operating system (OS) information, but other times it just needs to remember things for a small duration of time, such as which website you wanted to access or which file you wanted to create.

Hopefully by now the concept of randomly accessing memory makes sense and how the human brain and the computer function similarly. But, I’ve been using the terms “store” and “permanent” quite a bit and haven’t really defined it in the context of computers yet… Additionally, we still haven’t answered the question, “what is a computer?” I know you’re anxious but trust me after this next topic we’ll be a lot closer to answering that question, but for now the next topic is: storage.

Storage

I know what you may be thinking, “Uh…didn’t we just talk about this?” The answer to that is…not really. You see, in the last topic we were talking about a form of temporary storage, or memory, but in this topic we are talking about permanent storage!

Just like in our minds, computers have the need to sometimes permanently “remember” things. In order to accomplish these tasks the computer seeks guidance from HDDs, “hard disk drives” or “hard drives” for short, and SSDs, “solid state drives”.  Both hard drives and SSDs do the same things, the only difference between them is the technology used for data storage, speed of data storage, and size of the physical part itself. However, for the purpose of this explanation hard drives and SSDs are the same thing and the phrase: “hard drive” will be used more instead of SSDs.

In my opinion, this topic is quite straightforward to understand with this example: there are somethings that we, humans, want to remember for the rest of our lives or for a good bit of time. These pieces of information are stored in our hard drives/memory and, therefore, become our “memories”. (It’s starting to make a little bit more sense right? If not it’ll make sense soon). Likewise, in computers there are pieces of information/data that needs to be “remembered” by the computer for long periods of time. In order to do this the computer stores this data in its hard drives or SSDs.

That’s it! Permanent storage, or long-term storage, is self explanatory. It’s storage that can store something for extensive periods of time without having to worry about the computer turning OFF or ON. In the same way, our brains can store something for extensive periods of time without worry of losing the information when we go to sleep. Furthermore, this information that’s stored in the computer’s hard drive can be file data or even pictures from your last vacation. Similarly, our brains store pictures and ideas in its “hard drive”/memory for long-term purposes too.

As I said earlier, this isn’t a tough concept to wrap your head around. The final thing I wanted to make sure was clear is the difference between RAM and hard drives. The easiest way to explain the difference is that RAM is short-term storage and hard drives are long-term storage. Again, RAM is for anything that needs to be stored for the task at hand, short periods of time, whereas hard drives and SSDs are used when the computer needs to store things for long periods of time, such as birthday photos or your job application.

We are so close to finally being able to answer the question, “What is a computer?” But…we aren’t there just yet. The final thing I need to explain to you is the last integral part of the computer, and this part is called: the GPU.

The GPU

Nowadays GPUs are always talked about in terms of “graphical performance” and “visual quality” but why is this the case and what does this all mean? The first thing I should probably do is define “GPU”, which stands for: graphical processing unit (sounds similar to CPU, right?). The GPU’s job/role to play in the computer is to render all graphics to the screen for the user to see.

What I just described might not have made sense so let’s look at it this way: your brain does many different types of calculations, one specific type of calculation that the brain does is displaying what you see from your eyes. In the human body, we have eyes that let us see. The whole purpose of our eyes is to gather all of the light around us and translate them to colors that will eventually be sent to the brain. Next, the brain will take these colors and will morph and alter them until it gets the correct “picture” or “frame”. This frame is then displayed “inside our heads” and this is what us humans call “seeing”.

That was a brief explanation on how our eyes and brain are linked together, but how does this correlate to the GPU and the computer? Well, here’s the connection: recall back to how I said the brain has to morph and modify the information given by the eyes, that’s the role of the GPU. Further, recall back to how I said the eyes send information to the brain, well that’s the role of the CPU too!

As I said near the beginning of this article, the CPU does all of the computational work; therefore, anything that needs to be computed will be sent to the CPU…unless it relates to “seeing”. In that case the CPU will receive the instructions that “we need to display something to the screen” and then the CPU will relay that message to the GPU where the GPU will say, “Alright, I’m on it,” and will do the computational work for that. In other words, the GPU does all of the graphical computational work, such as displaying shapes on the screen, and the CPU does all of the other important computational work, such as arithmetic and I/O (input and output) operations.

To make this concept really secure in your mind look at this scenario: let’s say you clicked on a file that you want to open on your computer. The first thing that will happen is the CPU will retrieve the file from your computer’s hard drive (the long-term storage device) and will begin to figure out what is inside that specific file. Once that’s completed then the CPU will have the contents of the file stored in memory (or RAM, the short-term storage device). Amazing! We’re done! Uh…not really, because you, the user, can’t see the file. This is because, internally, the CPU has figured out what was inside the file but ever told the GPU to display the contents so that you can see it. Thus, the CPU will then have to send the specific instructions to the GPU saying, “Hey, can you display this file’s contents to the screen?” Then, the GPU would receive those instructions and begin doing all of the crunching and processing in order to figure out how this file can be displayed on the screen. (It’s harder than you think because every letter is made of multiple pixels and it’s the GPU’s job to figure out how to arrange those pixels for every single letter and symbol!) Upon completion, the GPU would display the file on the screen and you, the user, would finally be able to see your file’s contents.

As you can see, this is sort of a relay race, but not really, because the GPU doesn’t do everything…The GPU’s sole purpose is to display graphics to the screen but “what needs to be displayed” is done by the CPU and “how is it going to be displayed” is done by the GPU. Again, the GPU is nothing but a graphics processing unit, hence the name. To answer the question as to why GPUs are always associated with performance and high picture quality is because we, the users, want to see high quality images; as a result, if the GPU doesn’t do a good job rendering those pictures to the screen then we won’t get a good looking picture. That’s why people around the world spend years optimizing and tinkering with their GPU models so that they can produce the best picture quality while still making the processing time as short as possible (because the higher the quality, the longer it takes to make those calculations).

Hopefully by now the concept of the GPU has been solidified in your brain and how it’s different yet connected to the CPU. Now…the moment you’ve been waiting for since the beginning of this article, the answer to the question, “What’s a computer?” The answer is right around the corner.

The Question Answered

Well, what is a computer? The answer cannot fit into one word but can be fit into one sentence. A computer is nothing but a machine that can store, process and compute any instructions or data, in the form of electrical signals, and can additionally display any output to the user’s screen. Let’s dissect this definition. We learned about the CPU, which does all of the computing in the computer and is the most important part, which is where the “processing” and “computing instructions or data” portion of the definition come from. We also learned about short-term and long-term storage devices such as RAM and hard drives or SSDs, respectively. These devices are used by the computer for storing information and can be seen in the “storing” portion of the definition. Finally, we learned about the GPU, which does all of the graphical processing for the computer, and can be seen in the “displays any output to the user’s screen” portion of the definition.

I structured this article in such a way that when you first read the definition of a computer it may have puzzled you; however, by the time you reached the end everything would make sense because you learned about all of the core parts and their related functions in the computer. Now, I didn’t talk about everything on the computer because if I did this article would’ve become a book! But I talked about just everything you needed to know to understand what a computer is. Because in principle, a computer is a machine that can compute and process instructions, the CPU; render graphics, the GPU; and can store data, the short and long term storage devices.

By understanding how the CPU, GPU, and storage devices all function together you pretty much understand not just what a computer is, but how it works too! Before I end this article I want to direct your attention to the formal definition of a computer that was stated near the beginning of this article: a computer is an electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program. Doesn’t it make sense! “Storing and processing data,” are all done by the storage devices and the CPU, respectively. “Typically in binary form,” is just emphasizing that electrical signals are used internally for all operations. And, “according to instructions given to it in a variable program,” just means that the computer does what it’s told to by its instructions!

I hope that by now any confusion you had as to “what is a computer”, is all gone and you can now rest easy and you are now armed with the knowledge as to what a computer is and how it works as well! I hope this article was helpful and made understanding the world of computers a little bit easier!

Thank you.