Thursday, July 23, 2020

About Programming Languages

Program (Software)
A set of instructions that tell a computer what to do.
·  We use programs to interact or talk with computers.
·  To write programs we use programming language.
·  Developing a program is a circular process.
·  The process is known as the Program Development Life Cycle and it has four key steps that repeat themselves:
                1.     Analyze the program
                2.     Design a program to solve the 
                       problem
                3.     Code the program
                4.     Test the program

Programming language
·     It is a set of commands, instructions, and other syntax use to create a software program. 
·    Programs are written in a language that a computer can understand, which is a  programming language, to be able to interact with a computer.

Machine language
·   A computer native language (It is the main language of the computer).
·   Uses binary language that is Zero and Ones (0/1).
·   If you want to add two numbers 2 & 3 and get the results : 1101101010011010.
o   It is very hard to use.
·   Machine dependent, so it differs among different types of machine.
·   Every instruction should be written in machine language before it can be executed.
       o All instructions written in other programming languages must be translated  
           to machine code instructions (This applies to all other programming language).

Assembly language
·   It was developed to make programming easier
·   Machine dependent
·   In this language keywords were introduced like add, sub, ……….so program was little 
bit easier.
·   To add 2 & 3 and get the result: add 2, 3, result (this can not be executed, it just a 
way of writing in assembly language).
·     A program called ‘assembler’ translates assembly code to machine code.
           Add 2, 3, result-->Assembler-->1101101010011010

High-level language
A new generation of programming languages.
·   Uses english words, easy to learn and use.
·   Machine independent, your program will run on different machines.
·   Instructions are called ‘statements’.
·   A program written in a high-level language is called a ‘source code’ or ‘source 
program’.
·   To add 2 & 3 and get the result: result = 2+3;
·    Every instruction or every statement should end with a semi colon.
·    A ‘compiler’ or an ‘interpreter’ is used to translate source code to machine code.

Compiler
A compiler is a computer program that translates computer code written in one programming language into another language.

The name “compiler” is primarily used for programs that translates source code from high-level programming language to lower level programming language to create an executable program.

             


Interpreter

It is a computer program that converts high-level program statement into assembly level language. It is designed to read the input source program and then translate the source program instruction by instruction.

    


API (Application programming language)

·   Also known as ‘library’.
·   Contains predefined java code that we can use to develop java Program.
So, we basically have some java codes that is already written and it is ready for us to
use. This will make faster and easier development process, no need to write everything from scratch.
Programmers can use it for
   1.  Graphics
   2.  User Interface
   3.  Networking
   4.  Sound
   5.  Database

No comments:

Post a Comment