Today's computers come in a variety of different formats — desktops, laptops, smartphones, drones, smartwatches, and even dummies. All these devices, however different, have the same operating principle, which allows them to perform their prescribed task. Today we will tell you how any computer device works and what functional elements underlie them. It is impossible to learn programming without this knowledge, since it is possible to create effective programs only with an understanding of the internal mechanics of a computer.
If you look at it, any computer is just a very smart calculator. The word to compute is translated from English and means “to calculate”. But if a conventional calculator can only handle some mathematical operations, then the computer can use the results of its calculations to execute commands. By themselves, these commands are quite simple — take data from there, work with them here, save them here. But because a computer executes billions of such commands in a second, such simple bricks can be used to create incredible palaces.
Basic computer features
All computer work can be broken down into four functions:
- Get information
- Keep it in your memory
- Process data
- Provide results
Whichever electronic device you pick up, it always works on this principle. A regular computer receives information from a keyboard, flash drives, or CDs. The tablet reads touches on the screen. For a fitness blastet, your heart rate becomes the data source, and for a drone, the joystick in the operator's hands.
After receiving data in a usable format, the device writes it to memory. After that, you can work with them. To figure out what needs to be done with the information, the computer accesses the program and clearly, step by step, follows the instructions written there. After that, it gives the result: it displays a picture or text on the screen, launches a function or an additional program. The drone will result in a flight in the specified direction. On the Internet, clicking on a link (this is also a way to enter data) results in data being sent from one computer to another — this is the result of the browser's work.
Many computers — one principle
Different devices use different programs written in different languages, depending on the purpose of the device. When you learn to program, you become familiar with these languages and find out which ones are best suited for different tasks.
Some languages are used to control the smallest elements of a computer device. Others operate at the operating system level, and others allow you to create websites or applications. We talked about these differences in more detail in the article “What are programming languages”. The main thing to understand is that any program in any programming language, whether in Python or Scratch, allows a computer to perform actions in a certain order, processing data and providing the programmer with the result he needs.
The internal structure of the computer
Now let's look inside a regular computer and see what parts it consists of.
Motherboard
All components of the computer that ensure its operation are connected to the motherboard. This is their common workspace that allows different functional elements to exchange data. The motherboard is designed in such a way that each part has its own place in which the wrong unit cannot be plugged.
Processor
The main element of any computer that organizes the operation of all other devices in its composition.
It is the processor that reads data from memory, understands what needs to be done according to the written program, commands and controls. We discussed his work in detail in the article “How the processor works”.
Operative memory
These bars store data that the processor accesses during operation. The more RAM, the more storage space, and the longer the computer can run under heavy load. Data in RAM is destroyed when it is turned off, so rebooting sometimes helps speed up the computer.
Hard drive
If the computer needs some information all the time, it is placed on the hard drive. It stores the operating system, installed programs, movies, music and other content. Today, the most common are magnetic hard drives, as in the photo. They record data on spinning plates and read it using heads that hang several nanometers away above the plates. This technology has many drawbacks: data is recorded in different parts of the plate, so the computer has to spend time searching, the head can damage the surface of the plates due to shaking, the disc itself makes a lot of noise during operation and takes up a lot of space. The most modern hard drives, called solid-state drives, are built on more reliable technology using memory chips. So far, such drives are losing the competition to magnetic drives due to their high price, but the future probably belongs to them.
Special cards
Most often, the computer also has cards that are responsible for some specific functions: video and audio processing, network connections. These elements receive from the processor to perform specific tasks in their profile, unloading it and ensuring better quality of work. However, low-end computers or devices that don't require maximum performance can also do without such elements.