The process of translating a high level language

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ather they deal with highlevel coding enabling the programmers to write instructions using English words and familiar mathematical symbols and expressions. Each statement of a highlevel language is normally a macro instruction that gets translated into several machine language instructions. This is one-to-many translation and not one-to-one as in the case of assembly language. For example, let us consider the same problem of adding two numbers (FRST and SCND) and storing the sum in ANSR. We have already seen that three low-level (machine/assembly) instructions are required for performing this job. However, if we use a high-level language, say FORTRAN for instance, to instruct the computer to do this job, only one instruction need be written: ANSR = FRST + SCND This instruction is obviously very easy to understand and write because it resembles the familiar algebraic notation for adding two numbers: a = b + c. The advent of high-level languages has enabled the use of computers to solve problems even by non-expert users. This has allowed many users, without any background in computer science and engineering, to become computer programmers. This in turn has resulted in the creation of a large number of computer applications in diverse areas, leading to the use of computers today in every walk of life. Compiler We saw that a computer can directly execute only machine language programs. Hence a high-level language program must be converted (translated) into its equivalent machine language program before it can be executed on the computer. This translation is done with the help of a translator program known as a compiler. Thus, a compiler is a translator program (much more sophisticated than an assembler) that translates a high-level language program into its equivalent machine language program. A compiler is so called because it compiles a set of machine language instructions for every program instruction of a high-level language. The process of translating a high-level language program into its equivalent machine language program with the use of a compiler is illustrated in...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online