Learning to program starts with knowing the computer

Learning to program starts with knowing the computer


Note: This article is mainly written for zero-based students, as a guide for programming entry, there are many slots, light spray.


1. What is a computer?


A computer consists of two parts: a hardware system and a software system.

1. Intuitive understanding of computers

Commonly used computers mainly include desktop computers and notebook computers. The size of the two may be very different, but the composition of the hardware system is the same. The computer is assembled by a bunch of electronic parts. Before starting, you can see and all the parts removed belong to the hardware system. 

The software system is everything that you can see and operate through the screen after you turn it on. The software you usually come into contact with is mainly two types of operating systems and applications. The commonly used operating systems are Microsoft Windows system or Linux system. Or Apple's MAC system, then what you interact with after booting up is the operation interface provided by the corresponding operating system. The applications used on the computer generally include Office series office software, various browser programs, and various game applications to play. Such as Warcraft, LOL, eating chicken (Jedi survival), etc., video/audio/picture player, etc....

Note: All applications are installed on the operating system, different operating systems can run applications developed for the system, and applications released on a specific system generally cannot run on other systems, such as Windows The applications ending in exe do not work on Mac and Linux.

2. Introduction to the core components of the hardware system



The hardware system is mainly composed of 5 core parts: arithmetic unit, controller, memory, input device and output device. 

1.  The arithmetic unit and the controller are integrated in the processor CPU . The CPU is the central processing unit, which is the computing core and control core of a computer. Its function is mainly to interpret computer instructions and process data in computer software. The calculator can mainly perform mathematical operations such as addition, subtraction, multiplication, and division, as well as comparison, judgment, search, logical operation, etc. The controller is the center of the computer command and control of other parts of the work, its working process and the human brain Command and control of human organs is the same.
    The CPU consists of arithmetic units, controllers, registers, caches, and a bus that implements data, control, and status connections between them. As the core of the entire system, the CPU is also the highest execution unit of the entire system, so the CPU has become the core component that determines the performance of the computer, and most of them use it as the standard to judge the grade of the computer.

2.  Memory usually refers to internal memory , mainly including random access memory RAM and read-only memory ROM. RAM mainly refers to memory sticks, and RAM is dynamic random access memory. Electrical memory loss, and can never be recovered; ROM is mainly used in the BIOS on the motherboard. When ROM is manufactured, the information (data or program) is stored and permanently stored, and cannot be modified. 

    Corresponding to the internal memory is the external memory, which is usually a magnetic medium or an optical disk, such as a hard disk, U disk, mobile hard disk, magnetic tape, CD, etc., which can store information for a long time, and does not rely on electricity to save information, but its speed Very and very cheap compared to memory, Note: External memory is neither RAM nor ROM.

3.  Input device , responsible for transmitting data, programs, text symbols, images, sounds and other information to the computer, commonly used input devices include keyboard, mouse, touch screen, digital converter, camera, etc.

4.  Output device , which is responsible for printing or displaying the calculation results or intermediate results of the computer. Common output devices include monitors, printers, plotters, and fax machines.

3. Introduction to other components of the hardware system


Mainboard : The mainboard closely connects the various components of the computer together, and each component transmits data through the mainboard. In other words, the important "transportation hubs" in the computer are all on the motherboard, and the stability of its work affects the stability of the whole machine. In the integrated motherboard, part or all of the sound card, graphics card, and network card are often integrated on the motherboard.

Graphics card : The graphics card works with the monitor to output graphics and text. Its function is to convert and drive the display information required by the computer system, and to provide a line scan signal to the monitor to control the correct display of the monitor. It is connected to the monitor and the motherboard of the personal computer. Important components, graphics cards are divided into core graphics, integrated graphics and discrete graphics.

HD Graphics is a new generation of graphics processing core for Intel products. Unlike previous graphics card designs, Intel, with its advanced technology in processor process and new architecture design, integrates graphics core and processing core on the same substrate to form A complete processor with advantages of low power consumption and high performance.

The integrated graphics card is a component that integrates the display chip, video memory and related circuits on the motherboard and integrates with it; the integrated graphics card has a separate display chip, but most of them are integrated in the north bridge chip of the motherboard. Advantages: Power consumption Low, low calorific value, disadvantages: relatively low performance.

Independent graphics card refers to the display chip, video memory and related circuits are made on a single circuit board, and it exists as an independent board. It needs to occupy the expansion slot of the motherboard (ISA, PCI, AGP or PCI- E), Advantages: The video memory is installed separately, and generally does not occupy the system memory. Disadvantages: The system power consumption is increased, and the heat generation is also large.


Sound card : The sound card is an indispensable hardware device to make up a multimedia computer. Its function is that when a playback command is issued, the sound card converts the sound digital signal in the computer into an analog signal and sends it to the speaker to emit sound.

Network card : The function of the network card is to act as a bridge between the computer and the network cable. It is one of the important devices used to establish a local area network and connect to the Internet.

power supply : To supply power to all the components of the computer, it is to convert 220V AC into 5V, 12V, 3.3V DC used by other hardware. Its performance will directly affect the stability of other devices, which in turn will affect the stability of the whole machine. , The notebook computer provides effective power for the computer through its own rechargeable lithium battery. If the battery is broken or unloaded, it can also be powered by connecting the charger.

4. Introduction to the working principle of the computer system


The input device accepts external information, that is, the original data. The controller sends an instruction to send the data into the memory, and then sends an instruction fetch command to the memory. Under the instruction fetch command, the program instructions are sent to the controller one by one, and the controller decodes the instructions. , and according to the operation requirements of the instruction, it sends out the storage, fetching and operation commands to the memory and the arithmetic unit, and the calculation result is stored in the memory after passing through the arithmetic unit. Finally, under the action of the fetching and output commands issued by the controller, the calculation results are output through the output device.

The program is stored in the same way as the data. It is the most basic working principle of the computer to take out the instructions step by step according to the sequence of the program, and automatically complete the operations specified by the instructions. This principle was originally proposed by the American-Hungarian mathematician von Neumann in 1945, so it is called the von Neumann principle.


5. Working principle analogy


If a complete computer hardware system is compared to a person, then the CPU (calculator and controller) is the thinking of the brain, and the memory (RAM, ROM, hard disk) is the human memory cell, the motherboard is the human skeleton and internal organs, etc., and the power supply is Human blood, input device is human touch, vision, hearing, taste and smell, etc., output device is human mouth, and software system is human nervous system.

People receive information from the outside world (watching a video) through touch, vision, hearing, taste and smell (input devices), that is, raw data, and the brain's thinking (controller) controls to store the captured data in memory. Cell (memory), when recalling (executing an instruction) the information (video) just received, the brain starts to recall (fetching the instruction first, then decoding the instruction), and taking out a picture data (fetching data) from the memory cell , After the decoding operation of the brain thinking (controller and operator), the scene of the video scene (output result) is finally restored in the mind.


Visit source site www.araryun.com www.abc1225.com

refer to

Graphics card introduces
the working principle of computer

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325752744&siteId=291194637