Page 24 - Computer Science Class 11 Without Functions
P. 24

Programming Languages, Translators, and Interpreters

        Software for a specific task often involves several functions and programs. We already know that a program is a sequence
        of instructions for the computer. We must give these instructions to a computer in a language that is comprehensible to
        it. The languages used for programming a computer are called programming languages. The programming languages
        may be categorised as high-level languages and low-level languages.

           Low-level Programming Language: Low-level languages are machine-dependent languages. So, their use requires
           the programmer to have a thorough knowledge of computer hardware. Machine language and Assembly language
           are low-level languages. A machine language program is written using sequences of 0s and 1s as instructions.
           Although  machine  language  instructions  are  directly  executed  by  the  computer,  it  is  difficult  for  a  human
           programmer  to  remember  all  instructions  and  develop  programs  in  machine  language.  To  simplify,  assembly
           languages were developed. An assembly language instruction uses a short English mnemonic such as ADD, SUB, or
           SHIFT corresponding to respective machine language instructions. Data and instructions in an assembly language
           program may be labelled for easy reference. However, it is still quite difficult to program in an assembly language.
           Another disadvantage of assembly language programming is that a code written for a specific CPU would not work
           on another computer using a different CPU unless the compatibility between the two processors has been ensured.
           For executing a program written in an assembly language, it is converted to an equivalent machine language program
           using a translator called an assembler.
           High-Level  Programming  Language:  The  instructions  in  a  high-level  language  resemble  English  language
           instructions. High-level languages are machine-independent because a program developed on a computer in a
           high-level language may be easily executed on a different computer. Examples of high-level languages include C,
           C++, Python, and Java. For executing a program written in a high-level language such as C/C++, it may be converted
           to an equivalent machine language program using a translator called a compiler. Alternatively, a high-level program
           written in a language like Python may be executed instruction by instruction using an interpreter that interprets and
           executes the instructions.

           Assembler: It converts the program written in assembly language to machine language.
           Compiler: A compiler converts a program written in a high-level language to an equivalent program in the computer's
           machine language. It outputs all errors (along with the relevant line numbers in the program) caused by violations of the
           syntax rules (Syntax means the correct way of writing an instruction in a specific programming language i.e. following
           grammatical rules.) of the language and some semantic errors (Semantic error is the error which is grammatically
           correct but does not make any sense.) like an attempt to multiply two strings in a Python program. If the program
           being compiled is error-free, it is converted to an equivalent machine language code.

           Interpreter: It converts the source code to an executable form and executes it instruction by instruction. The
           process of converting the source code to an executable form and executing it instruction by instruction is called
           interpretation. When an interpreter encounters an error, it stops, and the error has to be rectified before the
           interpreter proceeds to execute the next instruction.

        1.5.2 Application Software

        Application software is designed keeping in mind the requirements of its end-users. Application software may be
        categorised as general-purpose application software and customised software.

        General Purpose Application Software
        General purpose application software is a generic software that caters to the general requirements of many users.
        Generic software includes web browsers, multi-media software, word processors, spreadsheets, presentation software,
        PDF file readers, and grammar checkers. Table 1.2 gives some examples of general-purpose application software.




          22   Touchpad Computer Science-XI
   19   20   21   22   23   24   25   26   27   28   29