Computer Basics of programming
What is the programming language
The programming language is the language of nature, human and computer communication medium
What is programming
Write a bunch of files in a programming language
Why Programming
Slave computer, instead of labor
Composed of five computer
Less need for <Principles of Computer Organization>, development
CPU (brain)
Controller
Control hardware
Operator
Arithmetic logic operations +
RAM
Storing data
Pros: Fast
Cons: off disappears, small capacity
External memory
Storing data
Advantages: large capacity, permanent storage
Cons: Slow
input device
Input information, such as a keyboard / mouse / U disk
Output Device
Output information, such as the display (the display color is controlled) / printer / U disk
u disk is the IO devices
32 and 64
The computer reads the data size of a one-time, he has downward compatibility
Application process starts
- Double-click qq (qq find a path) Users -> operating system -> CPU
- CPU control, after finding qq content from external memory is read into memory
- Run qq
Mechanical hard disk works
Robot: read data
Track: storing data
Sector: dividing track
Average seek time: 5ms
Average delay time: 7200r / s 4.15ms
The average seek time data: 9.15ms
Computer operating system
What is the file
The operating system provides a virtual unit
What is the application procedure
A bunch of files
What is the role of the operating system
The complex instruction computer hardware interaction simplification
The computer which is divided into three layers
Hardware: Operating System
Operating system: hardware / application / user
Applications: Operating System
User: Operating System
Operating system boot
- Power, power
- Start temporary operating system
- Temporary operating system to start the real operating system
Programming Language Category
Machine language
0 and 1
Pros: fast execution efficiency
Disadvantages: low efficiency of development
Assembly language
Write English symbols
Advantage (compared to machine language): the development of high efficiency
Disadvantages (compared to machine language): Low efficiency
High-level language
Compiled language (Google translation)
C / Java
Advantage (interpreted language): high efficiency
Disadvantages (compared to interpreted languages): low development efficiency
Compiler: written in assembly language
Interpreted languages (simultaneous interpretation)
Python
Advantage (compared to a compiled language): the development of high efficiency
Disadvantages (compared to a compiled language): Low efficiency
Interpreter: c / java to write
Network bottleneck effect
The implementation of a program, c may 0.0000001ms (operating system, non-network transmission uses language c), python1ms, but the network transmission 10ms
Python implementation of the program in two ways
hello world
Interactive (jupyter)
Pros: Run an implementation of a
Disadvantages: Close disappear
Command line (pycharm)
Pros: has been saved
Disadvantages: all finished before they can debug bug
Although txt file can run, but try to use py file