Page 20 - DCAP102_DCAP_401_Foundations of Computer Programming
P. 20

Unit 1: Foundation of Programming Languages





          4.   Diff cult  to  modify: It is difficult to correct or modify machine language programs.  Notes
               Checking machine instructions to locate errors is about as tedious as writing them initially.
               Similarly, modifying a machine language program at a later date is so difficult that many

               programmers would prefer to code the new logic afresh instead of incorporating the

               necessary modifications in the old program.

          In short, writing a program in machine language is so difficult and time consuming that it is
          rarely used today.




              Task    Computer only understand 0 and 1 but we enter all values in the form of
             alphabets how computer accept of understand these values.


          1.7 Higher Level Languages

          We have talked about programming languages as COBOL, FORTRAN and BASIC. They are
          called high level programming languages. The program shown below is written in BASIC to
          obtain the sum of two numbers.
          LET            X             =             7
          LET            Y             =             10

          LET            sum           =             X+Y
          PRINT          SUM
          END
          The time and cost of creating machine and assembly languages was quite high. And this was the
          prime motivation for the development of high level languages.
          Because of the difficulty of working with low-level languages, high-level languages were

          developed to make it easier to write computer programs. High level programming languages
          create computer programs using instructions that are much easier to understand than machine
          or assembly language code because you can use words that more clearly describe the task being
          performed.

                 Example: High-level languages include FORTRAN, COBOL, BASIC, PASCAL, C, C++
          and JAVA.
          1.8 Compiling High Level Language



          Since a high level source program must be translated  first into the form the machine can
          understand, this is done by a software called Compiler which takes the source code as input and
          produces as output the machine language code of the machine on which it is to be executed. This
          is illustrated in fi gure.
















                                           LOVELY PROFESSIONAL UNIVERSITY                                    13
   15   16   17   18   19   20   21   22   23   24   25