हिंदी

How does the computer understand a program written in high-level language? - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

How does the computer understand a program written in high-level language?

संक्षेप में उत्तर

उत्तर

The program code written in assembly or high-level language is called source code. The source code is converted by a translator into the machine-understandable form called object (machine) code.
As we have different types of computer languages, different translators are needed to convert the source code to machine code. The three types of translators used in computing systems are assembler, compiler, and interpreter.
The translator used to convert the code written in assembly language to machine language is called an assembler. Each assembler can understand a specific microprocessor instruction set only and hence, the machine code is not portable.
We also need translators to convert codes written in a high-level language (source code) to machine-understandable form (machine code) for execution by the computer. The compiler converts the source code into machine code. If the code follows all syntactic rules of the language, then it is executed by the computer. Once translated, the compiler is not needed.
An interpreter translates one line at a time instead of the whole program at one go. An interpreter takes one line, converts it into executable code if the line is syntactically correct, and then repeats these steps for all lines in the source code. Hence, the interpreter is always needed whenever a source code is to be executed.

Conclusion:-
Code in a high-level language (Source Code) →Language translator →Code in machine language (Object Code).

shaalaa.com
Programming Tools of System Software
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 1: Computer System - Exercise [पृष्ठ २४]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 11
अध्याय 1 Computer System
Exercise | Q 2. | पृष्ठ २४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×