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

边栏推荐
- China's coal industry investment strategic planning future production and marketing demand forecast report Ⓘ 2022 ~ 2028
- [flax high frequency question] leetcode 426 Convert binary search tree to sorted double linked list
- 十大券商开户注册安全靠谱吗?有没有风险的?
- Cognitive fallacy: what is Fredkin's paradox
- DR-AP40X9-A-Qualcomm-IPQ-4019-IPQ-4029-5G-4G-LTE-aluminum-body-dual-band-wifi-router-2.4GHZ-5GHz-QSD
- Investment planning analysis and prospect prediction report of China's satellite application industry during the 14th five year plan Ⓑ 2022 ~ 2028
- LeetCode 1646. Get the maximum value in the generated array
- Blue Bridge Cup Guoxin Changtian single chip microcomputer -- software environment (II)
- Ansible common usage scenarios
- Minio deployment
猜你喜欢

Decompile and modify the non source exe or DLL with dnspy
![[SRS] build a specified version of SRS](/img/01/0d2d762e01b304220b8924d20277e3.jpg)
[SRS] build a specified version of SRS

Mysql database - Advanced SQL statement (I)

The latest analysis of R1 quick opening pressure vessel operation in 2022 and the examination question bank of R1 quick opening pressure vessel operation

Awk getting started to proficient series - awk quick start

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
![[Android reverse] application data directory (files data directory | lib application built-in so dynamic library directory | databases SQLite3 database directory | cache directory)](/img/b8/e2a59772d009b6ee262fb4807f2cd2.jpg)
[Android reverse] application data directory (files data directory | lib application built-in so dynamic library directory | databases SQLite3 database directory | cache directory)

Niuke winter vacation training camp 4 g (enumeration optimization, Euler power reduction)

320. Energy Necklace (ring, interval DP)

Covariance
随机推荐
WFC900M-Network_ Card/Qualcomm-Atheros-AR9582-2T-2R-MIMO-802.11-N-900M-high-power-Mini-PCIe-Wi-Fi-Mod
Report on the development strategy of China's engineering bidding agency and suggestions for the 14th five year plan Ⓙ 2022 ~ 2028
js demo 計算本年度還剩下多少天
Buuctf, misc: n solutions
How to install sentinel console
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)
Morning flowers and evening flowers
The 14th five year plan for the construction of Chinese Enterprise Universities and the feasibility study report on investment Ⓓ 2022 ~ 2028
Ansible common usage scenarios
Yyds dry goods inventory hands-on teach you to create a jigsaw puzzle using the canvasapi
Development trend and market demand analysis report of China's energy storage battery industry Ⓩ 2022 ~ 2028
Rest reference
Awk getting started to proficient series - awk quick start
[dynamic planning] counting garlic customers: the log of garlic King (the longest increasing public subsequence)
Teach you how to install aidlux (1 installation)
Collection | pytoch common loss function disassembly
[sg function] lightoj Partitioning Game
Getting started with DOM
Unique in China! Alibaba cloud container service enters the Forrester leader quadrant
pivot ROP Emporium