Machine language is a language that can be directly run by computers. It is a binary language and is a low-level language; assembly language is a low-level language for machines and cannot be directly recognized by machines and needs to be compiled; high-level language is based on human logical thinking. Computer language cannot be directly recognized by the machine and needs to be compiled.
Computer languages are divided into high-level languages and low-level languages. High-level language is mainly relative to assembly language. It is programming that is closer to natural language and mathematical formulas. It is basically separated from the hardware system of the machine and writes programs in a way that is easier for people to understand.
Low-level languages are divided into machine language (binary language) and assembly language (symbolic language). Both of these languages are machine-oriented languages and are closely related to the instruction system of the specific machine. Machine languages use instruction codes to write programs, while symbolic languages use instruction mnemonics to write programs.
Machine language
Machine language is an instruction set system. It is a language expressed in binary code. It is the only language that a computer can directly It is a language for recognition and execution. It has the advantages of direct execution by computers, simplicity, and fast operation speed. However, it is not intuitive and is very error-prone. It is difficult to check and debug the program. In addition, it is also very dependent on the machine.
Assembly language
Assembly language is a machine-oriented programming language. It is used to solve the shortcomings of machine language that is difficult to understand and remember. Names and symbols that are easy to understand and remember represent the operation codes in machine instructions. In this way, using symbols to replace the binary code of machine language turns machine language into assembly language; therefore assembly language is also called symbolic language.
Programs written in assembly language cannot be directly recognized by the machine. A program is required to translate the assembly language into machine language. This translation program is called an assembler. The assembler is a language processor in the system software. system software. The process of translating assembly language into machine language by the assembler is called assembly.
High-level language
High-level language provides users with a language that is close to natural language, can use mathematical expressions, and is relatively independent to the way the machine works. Like assembly language, machines cannot directly execute programs written in high-level languages.
High-level language does not refer to a specific language, but includes many programming languages, such as the currently popular java, c, c, C#, pascal, python, etc.
High-level languages have stronger expression capabilities, can easily express data operations and program control structures, can better describe various algorithms, and are easy to learn and master. However, the program code generated by its compilation is generally longer than the program code designed in assembly language, and the execution speed is also slower.
The above is the detailed content of What are the main characteristics and differences between machine language, assembly language and high-level language?. For more information, please follow other related articles on the PHP Chinese website!