当前位置:网站首页>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

边栏推荐
- 2022 safety officer-a certificate registration examination and summary of safety officer-a certificate examination
- Buuctf, web:[geek challenge 2019] buyflag
- Decompile and modify the non source exe or DLL with dnspy
- Exclusive interview with the person in charge of openkruise: to what extent has cloud native application automation developed now?
- STM32 multi serial port implementation of printf -- Based on cubemx
- Report on the development status and investment planning trends of China's data center industry Ⓡ 2022 ~ 2028
- This time, thoroughly understand bidirectional data binding 01
- WiFi 2.4g/5g/6g channel distribution
- Pooling idea: string constant pool, thread pool, database connection pool
- Are the top ten securities companies safe to open accounts and register? Is there any risk?
猜你喜欢

Farmersworld farmers world, no faith, how to talk about success?

Control loop of program (while loop)

How PHP drives mongodb
![[template summary] - binary search tree BST - Basics](/img/78/782129abea06c8e3bef69a121cbce0.jpg)
[template summary] - binary search tree BST - Basics

Exclusive interview with the person in charge of openkruise: to what extent has cloud native application automation developed now?

320. Energy Necklace (ring, interval DP)

Blue Bridge Cup Guoxin Changtian single chip microcomputer -- led lamp module (V)

Morning flowers and evening flowers

Exclusive interview with the person in charge of openkruise: to what extent has cloud native application automation developed now?

Mysql database - Advanced SQL statement (I)
随机推荐
The overseas listing of Shangmei group received feedback, and brands such as Han Shu and Yiye have been notified for many times and received attention
Development trend and market demand analysis report of China's energy storage battery industry Ⓩ 2022 ~ 2028
Code in keil5 -- use the code formatting tool astyle (plug-in)
Yyds dry goods inventory Spring Festival "make" your own fireworks
An expression that regularly matches one of two strings
Bluebridge cup Guoxin Changtian single chip microcomputer -- hardware environment (I)
Kali2021.4a build PWN environment
Décompiler et modifier un exe ou une DLL non source en utilisant dnspy
Miscellaneous things that don't miss the right business
[flax high frequency question] leetcode 426 Convert binary search tree to sorted double linked list
Buuctf, web:[geek challenge 2019] buyflag
China's coal industry investment strategic planning future production and marketing demand forecast report Ⓘ 2022 ~ 2028
Exness: the Central Bank of England will raise interest rates again in March, and inflation is coming
DR-NAS26-Qualcomm-Atheros-AR9582-2T-2R-MIMO-802.11-N-5GHz-high-power-Mini-PCIe-Wi-Fi-Module
Rest参考
STM32 multi serial port implementation of printf -- Based on cubemx
Why use pycharm to run the use case successfully but cannot exit?
IPhone development swift foundation 09 assets
The 14th five year plan and investment feasibility study report of China's industry university research cooperation Ⓧ 2022 ~ 2028
Data consistency between redis and database