1.2 What is a computer
It is said that in A Dream of Red Mansions, the classics saw "Yi", while the Taoist saw "prostitution", and the only child saw "lingering". The revolutionaries saw "full", and the rumor house saw the secret of the palace .......
I read "Dream of Red Mansions" for the first time in the third grade of primary school. I only saw a bunch of unfamiliar words with many strokes. Later I learned that it was "Traditional Chinese ".
At that time, I was not a programmer. What kind of red building would I see if I would "re-visit" The Grand View Garden from the programmer's perspective? Programmers and A Dream of Red Mansions are somewhat unreliable. Let's talk about computers.
What is a computer?
Some students said: "online, QQ! Playing games !". It cannot be said that it is totally wrong, but it is based on the role of ordinary computer users, but now we are programmers -- Well, I admit that we have not yet written a line of code, but it should be at least a "prepared programmer.
Computer, juqi refers to PC (Personal Computer). If it is a desktop computer, there is usually a monitor and a portable box; if it is a notebook, it will be thinner ...... Or not. This is a description of what a computer looks like.
Computer, a new great tool invented by humans, is now everywhere and has a profound impact on human life. In the long history, only tools such as fire, machinery, electricity, and electronics can be compared with computers ...... This paragraph is very deep, but how do you listen to what a historian should say.
1.2.1. "von noriman"
Forget it. I am not here to waste everyone's time. Let's move out of a celebrity first. A computer celebrity. The first move was Feng nuiman, the father of computers ".
(Figure 1 John von noriman (John von nouma, 1903-1957) Father of computer)
Feng nuoman clearly defines the five major components of the Computer: The generator CA, the logic controller CC, the memory m, the input device I and the output device O, and describes the functions and relationships of the five components.
Feng nuoman came up with a "Storage program" approach, and the program was stored in the machine as data so that the computer could automatically execute commands one by one.
Feng nuoman explicitly stated that such computers adopt binary numbers to give full play to the working characteristics of electronic devices and make the structure compact and more universal.
"The Old Wang Xie Tang Qian Yan, flew into ordinary homes", used for scientific research computers, has entered thousands of households. However, all these computers belong to the noriman machine ".
The top five components of the Computer prescribed by von norimman are the "Memory", especially the "internal memory ". Why?
1.2.2. "Vernacular C ++"
Based on the theory of famous masters, let's use our own words and think about what a computer is.
First, the computer is composed of hardware and software. As for what is hardware (what is software, we will explain in the next section ).
Then, the composition of the computer hardware, Mr. Feng said, there are five parts: "Controller ca, logic controller CC, memory M, input device I and output device O ". We can further classify the data into three parts:
- Central processor (splitter + controller)
- Storage Device (memory + External Storage)
- Input/output devices
"Input/output devices" are the easiest to understand, because in fact, as long as they are tools, especially mechanical devices, there will almost be an intuitive "input/output ". For example, a car.
Input Device |
Steering wheel, accelerator, brake pad ...... |
Output device |
Wheel ...... |
Processor |
Gears, bearings ...... |
Storage Device |
Tank, tank ...... |
(Table 1 "automotive input, output, storage devices, and" central processor ")
The input and output devices are easy to understand. With the input of the steering wheel, the steering speed of the wheel can be output, and the rotation speed of the wheel can be output through the accelerator or brake pad.
However, we should not mix "input and output devices" with "input and output data. The steering wheel is a device, and the power torque, speed, and intensity contained in the movements when you turn the steering wheel are input data.
The wheel is the output device, but the output data is the speed of the car and the driving direction of the car.
Some people say the processor should be the driver's brain. This is similar. If we regard the "Human Brain" as the central processor of the "car" we discuss, then people will become part of the car-but this is not true; if people are part of the car, then, the most important input device should be our uncle's eyes and ears.
A typical job of "processor" is to "eat" some data and then "spit" some data. The data we spit out and the data we eat have usually changed. These changes are the results of our processing. For example, your stomach is a powerful processor.
For a car, the machine connecting the input device "steering wheel, brake pad, and accelerator" and the output device "Wheel" is its CPU (Central Processing Unit ). -- When you step on the accelerator and turn the steering wheel to the left, the gears, bearings, and other devices perform computation faithfully and accurately, the wheel turns to the left, and speeding up the fly-on the right side of the road, there is a cliff. The processor is very important. Do you understand it?
Computer storage devices are divided into memory and external storage ". However, for a car, devices such as tanks and tanks (or storage batteries) are barely enough to support the "External Storage" level. It is difficult for us to find the device corresponding to the computer's "internal memory" from a common tool. As mentioned in the previous section, the "internal memory" in noriman's vision is the most brilliant. Because "Memory" is so important, let's let it go first. When we understand concepts like "commands, programs", and so on, let's talk about memory again.
We will put more computer principles in Chapter 4th. The content of this section is only here. Maybe you are still vague about "what computer", but I believe you will have a new understanding of our cars running around the street. Yes, when you get used to the world with the eyes of "programmers", you will be surprised to find that "Input and Output" devices are everywhere and "processors" are everywhere ".
It's time to try you-a new look from a prepared programmer! Stand up and walk, and "appreciate" all kinds of electrical appliances in your home. If you do. You have a good start.
-------------------------------------
If you want to communicate with me, click the following link to become a friend:
Http://student.csdn.net/invite.php? U= 112600 & C = f635b3cf130f350c