In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
The editor will share with you how to translate programs written in high-level languages into machine language programs in the computer network. I hope you will gain something after reading this article. Let's discuss it together.
Programs written in high-level languages can be translated into machine language programs in two ways: compilation and interpretation. The way of interpretation is to interpret and execute the source program sentence by sentence, that is, to explain and execute sentence by sentence, and no target file is produced in the interpretation mode. The compilation method is to first translate the whole source program into a machine language program, and then generate an executable program, which usually produces a target program.
Programs written in high-level languages can be translated into machine language programs in two ways: compilation and interpretation.
The way of interpretation is to interpret and execute the source program sentence by sentence, that is, to explain and execute one sentence at a time, so the target file is not produced in the interpretation mode. For example, the early BASIC language adopted the "interpretation" approach.
The compilation method is to translate the source program written by the whole high-level language into machine language program, and then generate the execution program that can be run directly under the operating system, which usually produces the target program.
The difference between compilation and interpretation
Compilation translates the source program into executable object code, translation and execution are separated, while interpretation completes the translation and execution of the source program at one time, and does not generate storable object code. This is only an appearance, and the biggest difference between the two is that for interpretation execution, the control of the program runtime is in the interpreter, not in the user program; for compilation and execution, the control of the runtime is in the user program.
Interpretation has good dynamic characteristics and portability, such as dynamically changing the type of variables, modifying the program and inserting good debugging diagnostic information into the program during interpretation and execution. if the interpreter is transplanted to different systems, the program can run on the system on which the interpreter is transplanted. At the same time, the interpreter also has great shortcomings, such as low execution efficiency and large space, because not only the user program has to be allocated space, but also the interpreter itself takes up valuable system resources.
The compiler compiles every statement of the source program into a machine language and saves it as a binary file, so that the computer can run the program directly in the machine language at run time.
On the other hand, the interpreter is only when the program is executed, it is interpreted as a machine language for the computer to execute, so the running speed is not as fast as the compiled program.
After reading this article, I believe you have a certain understanding of "how to translate programs written in high-level languages into machine language programs in computer networks". If you want to know more about it, you are welcome to follow the industry information channel. thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.