Explain in detail about programming languages

Estudies4you
Q13. Explain in detail about programming languages.
Answer:
Programming Languages
The programming languages are a set of instructions that a programmer can understand, and a computer can recognize.
The different types of programming languages are,
1. Machine-level language
2. Assembly language
3. High-level language.
1. Machine Language
Machine language is also known as machine code or object code. In this language, programs are written in the form of binary digits or bits with different patterns relating to different commands, that are easily read and interpreted by the computer. The organization of bit-patterns depends mostly on the machine code specification.
It is necessary to have a unique and distinct bit pattern associated with every CPU instruction so as to differentiate those instruction from other instruction set. These instructions are said to be coded because the differentiation between the two unique instruction sets is made possible only if every individual instruction in the instruction sets is encoded as a unique bit pattern.
Machine language is the only language that is easily understood by the machine. This language is basically a system of instructions as well as data that is executed directly by the specific processor unit. Machine language is considered as the low-level or primitive programming language. The time taken for execution is very less since this language doesn’t require any interpreter or compiler to translate the program.
The machine code or instruction set is CPU dependent i.e., every CPU has its independent object code. Successor processor comprises of all the instructions associated with the predecessor. In addition, these processors may also include additional instructions. Most often the design of the processor will change the exact meaning of the instruction code associated with the predecessor. Due to this, it becomes very difficult for the machine code to migrate between two different processors. It is not possible to execute machine code or object code on the system having same processor design but different operating system, memory arrangement. This is because the machine code has no information about the system’s configuration.

Advantages
1. It is easily understood by the CPU.
2 The time taken for executing the program is very less.
3. The computational speed is very high.
Disadvantages
1. It is very difficult for a human to understand it as it comprises of sequence of bit patterns.
2: The length of programs written in machine language is very large.
3 It is difficult to correct or modify the programs.

4. It is a machine dependent language.
2. Symbolic Language or Assembly Languages
Symbolic languages are also called assembly languages:
An assembly language is a low-level language used basically for programming computers. This language not only implements a symbolic representation of numeric machine code but also implements other constants that are required to program a specific CPU architecture. Hardware manufacturer is responsible for defining this symbolic representation, Assembly language is dependent on abbreviation referred to as mnemonics that assist the programmer in memorizing individual instructions. This language is specific to a particular physical or logical computer architecture.
Initially, assembly languages were developed in 1950’s. During this period, this language was referred to as Second Generation Programming Language (2GL). The purpose of developing such languages is to eliminate the problems encountered while using first generation languages. Assembly language is generally used for,
1. Performing direct hardware manipulation
2. Accessing the processor’s instructions
3. Addressing critical performance issues.
If a program is written in assembly language, then it comprises of sequence of instructions called mnemonics. These instructions corresponds to a series of executable instructions. A utility program known as assembler is used for converting these executable instructions into machine language instructions. This is done by carrying out isomorphic translation (i.e., one-to-one mapping) from executable instruction to machine instructions. In contrast to the compilers used in the high-level languages, assemblers are much simpler to write. It is possible to have multiple sets of executable instructions for a single instruction set.
Every instruction written in assembly language comprises of opcode and at least one operand. Many of the instructions may refer to either a single value or pair of values. Opcode is the symbolic name given to a single-executable machine language instruction. On the other hand, operands refer to the address of data situated elsewhere in the storage.
Most of the complex and highly-developed assemblers provide additional functionality in order to facilitate program development, control the assembly process and assist in debugging.
Many of present day assemblers consist of a macro facility for performing textual substitution because of which they are referred to as macro assemblers. Generally many of the modern assemblers are responsible for creating object code. This is done by converting the assembly instructions (mnemonics) into opcodes and by resolving the symbolic names for memory locations.
Assemblers are capable of supporting both pseudo-instructions.and pseudo-operations. Pseudo-instruction are those instruction which generates at least two machine instructions. Pseudo operations are the directives followed by an assembler during the assembly time but not during the execution time.

Advantages
1. These languages increases the speed of performing computer operations. This is because any instruction written in assembly language is stored in code memory that generally requires very less amount of time for fetching those instruction.
2. No additional overhead code is required in the assembly language. This helps in reducing the program size as the programmer have knowledge about what exactly is required in a program.
3. Assembly languages reduces the cost of associated ROM chips because of the reduced code size
4. Assembly language helps the programmer to understand the way the computer operates.
In short, speed, size and uniqueness features can be considered as benefits of assembly language programs over the high level language programs.
Disadvantages
1. The execution time is more as the assembly instruction needs to be translated into machine instruction
2. It is a machine-dependent language

3. High-level Languages
A high-level language is a language used for programming computer. The advantage of high-level languages when compared to other low-level languages is that, the former does not require any detailed knowledge about a particular component. High-level languages are very much similar to human languages and consist of statements like GOTO or FOR.
These languages are easier to read, write and maintain. Compiler or interpreter is responsible for converting the programs written in high-level languages into machine language instructions. These languages are said to. be machine-independent since it is not necessary for a programmer using this language to know about the internal working of the computer.
The names of high-level languages are generic. There are different versions of high-level languages based on the type of computers being programmed. The main feature of high-level language is that, this language is not bound to a specific processor. This language does not require any details regarding the CPU’s architecture.
In contrast to assembly languages, high-level languages are transportable, which means that the same high-level language can be used in making multiple computers comprising of different processors.
In 1950, the first high-level programming language was developed. But today there are many different high-level programming languages including Ada, Algol, BASIC, COBOL, C, C++, FORTRAN, PASCAL etc. High-level languages allow programmers to write programs using simpler terms instead of using raw processor instruction codes. There are some keywords that are reserved and which are used for following reasons,
Defining variables
Creating loops
Handling input/output.

Advantages
1. These languages are easier to read and interpret.
2. The programs written in HLL are more abstract, more structured more portable.
3. These are machine-independent languages
4. Correction and modification can be done easily.
Disadvantages
1. The execution time is more since the HLL instruction needs to be converted into assembly language and then to machine language.
2. The power present at hardware level is non-utilized by the programmer.


To Top