Python is a programming language that is a specific type of computer-recognized language that allows programmers to communicate with computers.
Languages like English, Japanese, and French that communicate effectively with people in various countries and regions
Programming work means that the programmer writes his ideas and the work of the computer to a file in a programming language, and the computer identifies the operation, thus replacing the human being to do more efficient work.
So the result of programming is a bunch of files, this pile of files is the program
To learn the language of Python, you must first understand the computer hardware and operating system, because Python is used to operate on the computer to achieve operation, through the operating system to control the various parts of the computer system to complete the program run to achieve the desired effect.
Computer Hardware Five parts:
 
 
  
   
   | Parts | Description | 
 
   
   | Controller | The command system of the computer. The controller accesses the memory through the address, takes out the instruction from the memory, after the analysis by the decoder, produces the corresponding operation control signal according to the instruction analysis result to act on the other components, causes each component to coordinate the work methodically under the controller control. | 
 
   
   | Arithmetic device | Components that implement arithmetic and logic operations | 
 
   
   | Register | is a memory component that the computer uses to store all data and programs. Its basic function is to store (write) or fetch (read) the information at the specified address. The memory in a computer can be divided into two categories: one is internal memory, or memory or main storage, and the other is external memory (auxiliary memory), referred to as external memory or secondary storage. Memory consists of several storage units, each of which has an address that the computer reads and writes to the storage unit by address. The number of bytes that a memory contains is called storage capacity, in units of B, KB, MB, GB, TB, and so on. | 
 
   
   | Input device | is a device that enters information (Programs, data, sounds, text, graphics, images, and so on) into your computer. Common input devices are: keyboard, mouse, graphics scanner, touch screen, barcode input, light pen and so on. External memory is also an input device. | 
 
   
   | Output device | Mainly have monitors, printers and plotters. External memory is also used as an output device | 
 
  
Register:
 
 
  
   
   |         name         |         contains         |         example   |         Benefits         |         disadvantage         | 
 
   
   | Memory | Memory (RAM) | Memory Strips | Fast access speed | Loss of power data, small capacity | 
 
   
   | External memory | Disk | No loss of power data, permanent data retention, large capacity | Slow access speed | 
 
  
Types of memory, as well as the direct speed and capacity of each type:
 
 
  
   
   | 
 Speed | 
 Type of memory | 
 Capacity | 
 
   
   | 1ns | Register | <1kb | 
 
   
   | 2ns | Cache | 4MB | 
 
   
   | 10ns | Memory | 512-2048mb | 
 
   
   | S00ms | Hard disk | 200-1000gb | 
 
   
   | 100s | Tape | 400-800gb | 
 
  
CPU : x86-64
x86: Represents the CPU model
64: Represents a 64-bit bits per processing, or 8 bytes
The CPU is backwards compatible, that is, 64 of the CPU can execute 32 of the program
It can be said that the brain of the computer is the CPU, which takes instruction    -- - -----------and executes it from the memory, and then takes the next instruction, decoding, Cycle until the entire program is executed.
Binary calculus (Understanding section)
Decimal (only 0-9 10 digits)
0 1 2 3 4 5 6 7 9
123
1* (10^2) + (10^1) + (10^0) =123
Binary (a string represented by 0 1)
111
Example: Binary 111 to decimal is 7
1* (2^2) +1* (2^1) + 1* (2^0) = 7
Inverse checking: For example, the
# decimal-to-binary (except for 2-take-rest method)
The remainder is sorted backwards, i.e. 0111, or 111
Storage unit Conversions
A bits called 1bit
8bit=1bytes is called a byte
1024Bytes = 1KB
1024kb=1mb
1024mb=1gb
1024gb=1tb
1024tb=1pb
Supplemental memory (see section)
Non-volatile random access storage such as ROM(Read only Memory,rom)
rom-> Instructions for storing BIOS (bios:basic INPUT ouput SYSTEM)
EEPROM (electrically erasable PROM, electrically erasable programmable ROM) and flash memory (flash memory) are also non-volatile,
But instead of ROM, they can erase and rewrite. However, it takes more time to rewrite than to write RAM. In portable electronic devices, flash memory is often used as a storage medium. Flash is a film in a digital camera, a disk for a portable transliteration player, and a solid-state drive. Flash exists between RAM and disk, but unlike a disk, the Flash is wiped too many times and is worn out.
There is also a kind of memory is CMOS, it is volatile, many computers use CMOS memory to maintain the current time and date. CMOS memory and incremental time circuit is driven by a small battery, so even if the computer does not power up, the time can still be updated correctly, in addition to the CMOS can also save the configuration parameters, such as which is the boot disk, etc., the use of CMOS because it consumes very little, A factory original battery often can be used for several years, but when the battery fails, the relevant configuration and time, etc. will be lost
Disk (see section)
A disk is a mechanical device consisting of a robotic arm and a metal platter.
Track: Each head can read a new area, called a track
Cylinder: The Godin of an arm position so that the track is combined to form a cylindrical surface.
Sectors: Each track is divided into sectors where the typical value of the sector is 512 bytes
The data is stored in a segment of the sector, that is, a small circle in the circle of the track, reading a piece of data from the disk requires a seek time and delay time
Average seek time: manipulator arm from a cylinder randomly moved to the adjacent cylinder time to find the time, found the track is to recruit the data in the circle, but do not know the specific location of the data this circle
Average delay time: After the picker has reached the correct track, it must wait to rotate to the sector where the data is located, which becomes a delay time
For disk, the total time to find the data = average Seek (5ms ) + average delay time (7200 rotating Disk This value equals 4ms )
Day Summary:
Focus One: The three core components of the computer, and their functions?
1, CPU: Is the human brain, responsible for controlling the whole body and computing
2, Memory: is a human memory, responsible for temporary storage
3, hard disk: is a person's notebook, responsible for permanent storage
Key two: CPU, memory, hard disk working principle, explain how a program run from scratch?
Run a program from the hard disk, run the process to upload the process into memory, the CPU from the memory of the various instructions, and then sent to the computer hardware to work together to complete the program to run properly.
A basic explanation of Python computer