11.5.1.7 analyze the advantages and disadvantages of compilers 11.5.1.8 analyze the advantages and disadvantages of interpreters Translators. Compiler vs Interpetator How can we convert program code into binary so that a computer can understand it? Translators translate high-level language programs into machine language programs that the central processing unit (CPU) can understand. It also detects errors in the program. Different Types of Translators There are 3 different types of translators as follows:
We consider two types: Compiler and Interpreter. CompilerA compiler is a translator used to convert high-level programming language to low-level programming language. It converts the whole program in one session and reports errors detected after the conversion. The compiler takes time to do its work as it translates high-level code to lower-level code all at once and then saves it to memory. Interpreter Just like a compiler, is a translator used to convert high-level programming language to low-level programming language. It converts the program line by line and reports errors detected at once while doing the conversion. With this, it is easier to detect errors than in a compiler. Comparison Compiler and Interpreter. A look at how compilers and interpreters work, and how their differences affect memory, runtime speed, and computer workload.
Sources: teachcomputerscience.com,
Questions:
Exercises: Ex.1
Ex.2 (Author: Litvinova Olga - CS teacher of NIS Pavlodar) Ex. 3 Exam questions: | ||||||||||||||||||||||
| ||||||||||||||||||||||
Просмотров: 6402 | Комментарии: 3 | | |
Всего комментариев: 3 | |
| |