COMPUTER SOFTWARE
PROGRAMMING LANGUAGES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Can be run directly from the code
|
|
Need to be translated before execution
|
|
Are targeted at a specific CPU
|
|
None of the above
|
Detailed explanation-1: -Loosely-speaking, computers can only execute programs written in low-level languages. Thus, programs written in a high-level language have to be translated before they can run. This translation takes some time, which is a small disadvantage of high-level languages.
Detailed explanation-2: -High-level language programs must also be translated to machine language before they can be executed. The translator programs that do this are called compilers (Figure 9-4). Compilers for a particular high-level language can be produced for various computers with different machine languages.
Detailed explanation-3: -The high-level language is easier to understand for the users but the computer can not understand it. High-level language needs to be converted into the low-level language to make it understandable by the computer. We use Compiler or interpreter to convert high-level language to low-level language.
Detailed explanation-4: -Because machine code instructions are the only ones the CPU can execute, the source code for ALL other programming languages must be converted into machine code before it can be executed. This translation is carried out by special programs called compilers, translators or assemblers.
Detailed explanation-5: -Any program written in a high level language is known as source code . However, computers cannot understand source code. Before it can be run, source code must first be translated into a form which a computer understands-this form is called object code .