当前位置:网站首页>Programming language (1)
Programming language (1)
2022-07-03 22:17:00 【xiaochuhe.】
Preface :
What is a program ?
- The program is for A sequence of instructions written in a programming language to solve a problem with a computer
- notes : Procedure is : Sequence of commands . error . because : Commands are not necessarily understood and executed by computers .
What is a programming language ?
- Programming languages are used for communication between people and computers ( communication )
- Programming language is a language that is used by people but understood by computers
- Programming language be used for Programming , Express what task the computer needs to complete and how to complete the task , Then give it to the computer to complete
One 、 machine language
![]()
- Machine language is the instruction system of computer
- Instructions are expressed in binary code
- Program in machine language , That is to write programs directly using binary code
- advantage :
- Sure Directly executed by the computer
- shortcoming :
- Can't remember 、 Hard to understand 、 Low efficiency 、 Difficult to maintain
- Different machine language programs , Not compatible with each other
- Not portable .

Two 、 assembly language ( Semiotic language )
use Mnemonic symbols to indicate machine instructions Medium Operators and operands
advantage :
- machine language 、 Assembly language can directly operate hardware
shortcoming :
- Machine oriented language . Poor portability

A summary of machine language and assembly language
- What is machine language ? Namely CPU The command system of . It's a binary number . It is the only directly executable language of hardware . It's not portable .( This is because of different machines CPU Different instruction systems , So machine languages are different .) The program written in machine language is called : Executable program .
- What is assembly language ? Is symbolic language . Almost directly corresponds to binary machine instructions . The program written in assembly language is called : Assembly language source . Not directly .( You have to pass the assembler first ( A system software ), Assemble the whole assembly language source program into machine language executable program , And then we can execute .) It's also Not portable .( This is because it almost directly corresponds to binary machine instructions , And different CPU, Its instruction system is usually different . So it's not portable .)
- notes : ask : The programs written in machine language are all system software . error . Machine language can write any software ( Not necessarily system software ).
3、 ... and 、 High level programming language
- Purpose : Overcome the defects of assembly language , Improve the efficiency of programming and maintenance
- characteristic :
- Close to the natural language that people use everyday ( Mainly English ) Easy to understand 、 Memory and use
- It can be used on different computers . Strong portability
- For the symbols used 、 vocabulary 、 Grammar, semantics and other language components are strictly regulated
- significance : Reduce the difficulty of program design , Led to the development of computers into a new stage
- shortcoming : Computer Not directly perform
Namely Human oriented language ( Machine language and assembly language are machine oriented languages ). The program written in high-level language is portable ( This is because it is far away from the machine , Not facing the machine , Therefore, the level of abstraction is high ), but Not directly executable .
( One ) Elements of high-level programming language —— data 、 operation 、 Control and transmission

- Data components
- Arithmetic component
- Control ingredients
- Transmission components
( Two ) The control structure of the program —— The order 、 choice 、 Cycling and modularity
(1) Sequential structure —— Execute according to the sequence of statements

(2) Selection structure —— Single branch 、 Two branches and many branches
1. Single branch
if sentence

2. Double branch
if-else sentence

3. Multiple branches
if-elif-else sentence

(3) Loop structure ——while sentence 、do while Statement and for sentence

( Four ) modularization
- The source program is divided into modules
- Module corresponding function
- Program = The main function + Subfunctions

边栏推荐
- Base ring tree Cartesian tree
- Investment planning analysis and prospect prediction report of China's satellite application industry during the 14th five year plan Ⓑ 2022 ~ 2028
- 国泰君安证券开户是安全可靠的么?怎么开国泰君安证券账户
- How PHP gets all method names of objects
- China's Call Center Industry 14th five year plan direction and operation analysis report Ⓔ 2022 ~ 2028
- This time, thoroughly understand bidirectional data binding 01
- Teach you to easily learn the type of data stored in the database (a must see for getting started with the database)
- Rest参考
- LeetCode 1646. Get the maximum value in the generated array
- Buuctf, web:[geek challenge 2019] buyflag
猜你喜欢

Bluebridge cup Guoxin Changtian single chip microcomputer -- hardware environment (I)

2 spark environment setup local

Pooling idea: string constant pool, thread pool, database connection pool

The latest analysis of crane driver (limited to bridge crane) in 2022 and the test questions and analysis of crane driver (limited to bridge crane)

What indicators should be paid attention to in current limit monitoring?

Yyds dry goods inventory Spring Festival "make" your own fireworks

2022 G3 boiler water treatment registration examination and G3 boiler water treatment examination papers
![[golang] leetcode intermediate - alphabetic combination of island number and phone number](/img/40/a664ea866ce355c1f5e9305fe91780.jpg)
[golang] leetcode intermediate - alphabetic combination of island number and phone number

IPhone development swift foundation 09 assets

Blue Bridge Cup Guoxin Changtian MCU -- program download (III)
随机推荐
Blue Bridge Cup Guoxin Changtian MCU -- program download (III)
Team collaborative combat penetration tool CS artifact cobalt strike
Cesium terrain clipping draw polygon clipping
Awk getting started to proficient series - awk quick start
Buuctf, web:[geek challenge 2019] buyflag
Teach you to easily learn the type of data stored in the database (a must see for getting started with the database)
Cognitive fallacy: what is dimensional curse
On my first day at work, this API timeout optimization put me down!
Exness: the Central Bank of England will raise interest rates again in March, and inflation is coming
How about agricultural futures?
Report on the development status and investment planning trends of China's data center industry Ⓡ 2022 ~ 2028
3 environment construction -standalone
Some 5000+ likes, the development notes of a director of cosmic factory, leaked
The White House held an open source security summit, attended by many technology giants
2022 G3 boiler water treatment registration examination and G3 boiler water treatment examination papers
4. Data splitting of Flink real-time project
Electronic tube: Literature Research on basic characteristics of 6j1
Teach you how to install aidlux (1 installation)
Conditional statements of shell programming
Pooling idea: string constant pool, thread pool, database connection pool