C++ computer language

​ A program is a series of operation steps, and a computer program is the operation steps for a certain task to be completed by a computer realized by a person. The specific content of each step is described by instructions that can be understood. These instructions tell the computer "what to do" and "how to do". The language used to write a computer program is called a programming language.

​ Usually divided into three categories: machine language, assembly language and high-level language.

Machine language

​ The earliest language processing program for computers is machine language, which is a language that computers can directly recognize and is fast. Machine language uses binary code to write computer programs, so it is also called binary language. For example, using machine language to express the formula "8+4" is a string of binary codes "00001000 00000100 00000100". Machine language writing is difficult and memory is complicated. Generally difficult to master.

Assembly language

​ Due to the defects of machine language, people began to write programs with mnemonics, and the language produced by replacing machine instructions with some symbols is called assembly language. However, the source program written in assembly language cannot be directly recognized by the computer. Some special software must be used to translate and link the source program written in assembly language into a binary code that can be directly recognized by the computer. The schematic diagram is shown in the figure.

​ Although assembly language uses mnemonics to write programs, it is simpler than machine language, but assembly language is a low-level language, which is related to the computer architecture. It takes a lot of time and energy to familiarize yourself with the structure of the machine before writing programs. . Therefore, the workload is large and cumbersome, and the program portability is poor.

High-level language

​ The computer cannot directly accept and execute the source program written in a high-level language. When the source program is input to the computer, it is translated into a target program in machine language through a "translation program" before the computer can recognize and execute it. There are usually two ways of this kind of "translation", namely, compilation and interpretation.

​ The compilation method is: the translation work of the compilation method is completed by the "compiler", which first converts the entire source program into binary code, generates the target program, and then connects the target program into an executable program to complete the source program. Process the calculation and obtain the result. Interpretation mode: when the source program enters the computer, the interpreter will scan and interpret, interpret and execute one sentence of the source program without generating the target program. The translation of the interpretation method is completed by the "interpretation program".

​ Compiled languages ​​include C/C++, Pascal/Object Pascal (Delphi), etc.

​ Interpretative languages ​​include ASP, PHP, Java, Javascript, VBScript, Perl, Python, Ruby, MATLAB, Basic, etc.

​ Use a compiled language program to compile and link the entire source program into an executable file. This method has high efficiency, high reliability and good portability. However, when the source program is modified, it must be recompiled.

​ The object-oriented language draws on the artificial intelligence language LISP in the 1950s, and introduces the concept of dynamic binding and the idea of ​​interactive development environment; the discrete event simulation language Simula67 , which started in the 1960s , introduces the essentials and Inherited and formed in Smalltalk in the 1970s .

​ There are two directions in the development of object-oriented languages: one is pure object-oriented languages, such as Smalltalk, EIFFEL, etc.; the other is mixed-face object languages, that is, adding classes and inheritance to procedural languages ​​and other languages Ingredients, such as C++, Objective-C.

Guess you like

Origin blog.csdn.net/Joseph_tony/article/details/108716612