How do computers work?

Coccagerman
4 min readAug 8, 2021

--

We all use computers everyday for pretty much everything, and us as programmers even create stuff on computers that other people will use. So, as a really curious person that I am, I’m a little bit ashamed to recognize I don’t really know how computers work in deep. Let’s find out and a general idea of how this wonderful machines we all use everyday work.

What is a computer?

First we need to define what is a computer exactly. A computer can be defined as some sort of machine that performs 4 main tasks:
1- Receives an input
2- Stores the information
3- Performs the required processing on that information
4- And outputs the corresponding response

Input

So how do computers get information from users? Well through devices such as your keyboard, mouse, screen, microphone, you name it… This devices that are connected to our computer send electricity signals encoded in binary format. Binary numbers just represent the flow of electricity that the computer receives, like a boolean value, 1 when electricity is being sent and 0 when it isn’t.

The computer receives and identifies the electricity signals through devices called transistors, which are basically tiny tiny devices used to control electricity flow. Transistors are grouped into circuits that using the boolean values of each transistor are able to perform greater logical checks on the electricity flow received.

Storage and processing

Now that we know how information gets into the computer, what does the computer do with it? Let’s talk about the main components in computers.

Motherboard: We could over simplify it by saying it’s a big circuit that connects all the other main parts of the computer (CPU, RAM, hard drive) and allows them to communicate between each other.

CPU (central processing unit / processor): This is the component in charge of processing data and executing programs. All the “work” that’s done over information is performed within the CPU.

Hard drive (storage): This is the component where all the data/files in the computer are stored. This components normally are able to store big amounts of data, but are not designed to allow quick access to the data.

RAM (random access memory / memory): This is a component that stores data too, but unlike hard drives it doesn’t have much space to store data but allows a very quick access to it. This component is used to store the data of the programs the CPU is currently running, and by allowing a very quick access to the data, it allow the CPU to run the program quicker. The CPU is in charge of identifying what data is going to be need to run a certain program, and then transfering that data from the hard drive to the RAM before running the program.

Graphics card (GPU / graphics processing unit): This is the component in charge of figuring out how complex graphics display on your monitor. Graphic cards are heavily used when displaying videos, games or any kind of compex graphics you can think of.

Output

Once the CPU has finished running the required processes, then it returns processed information to the corresponding device, which could be your screen, your headphones, etc. And It’s important to think that data is being sent in binary form, just ones and zeros, and It’s the output device which is in charge of “decoding” the binary information and translating that into colors, sounds, etc.

Programs

And how does the computer know how to do all this stuff? How does it know when and how to communicate between components, when to listen for inputs and when to return outputs? The answer is through programs. Programs are just recipes, quite complex recipes that allow the computer to know what to do when facing different situations. Programs are recipes written by human beings using “human friendly” programming languages like C++, Java or Python and that later on translate into binary code within the computer.

Operating systems

And how are programs loaded into the computer and how does the computer know when we want to execute an specific program? Some programs came “previously loaded” into the computer’s components, but most computer usage is done through operating systems, that are like master programs that dictate how the software (installed programs in your computer) interacts with the hardware (your computer’s components). Operating systems are in charge of executing programs, installing new programs, eliminating data, switching the CPU processing between all running programs and more tasks. Basically operating systems are a way for users to friendly interact with the hardware, normally through a graphic interphase.

Roundup

So, to end it up, computers are machines that receive an input of information in the form of electricity flow, that is translated into binary code through the use of transistors. This information is stored and processed according to the instructions of the user and with the help of hardware components, such as the CPU, RAM and hard drive, and of softwares that dictate how the hardware works and interacts. Once the information has been accordingly processed, the response information is returned to output devices and later translated into the corresponding format (colors, sound…). All this functioning is usually coordinated through programs called operating systems, that facilitate the interaction of the user with the computer.

--

--

Coccagerman
Coccagerman

No responses yet