Types of Programming Languages YASH PAL, March 12, 2022November 19, 2022 Languages are defined as communication skill which is used to interact with any person or device. The skill should be such that a proper interaction could be established between the two communicating persons or a person and a device. The microprocessor is a programmable device that recognizes and operates in binary numbers (0’s and 1’s). [br] Each microprocessor has its own set of instructions based on the hardware design. This instruction set is known as the programming language of that microprocessor. So in this article, we are going to learn about the evolution of programming languages starting from machine language to high-level languages. Types of Programming Languages Machine Language Assembly Language High-Level Language Machine Language Machine language was the first in the evolution of programming languages. A machine language is a binary language that is composed of 0s and 1s. This language is specific to each processor. A microprocessor directly understands a program written in machine language. In fact even today basically microprocessors understand only the 0s and 1s. [br] A microprocessor recognizes and processes a fixed number of bits at a time. this is named the word length of the microprocessor. For example, the 8085 microprocessor can recognize and process 8-bit data at a time, hence its word length is 8-bit. the instruction set of the 8085 microprocessor is designed by using various combinations of these eight bits. the 8085 microprocessor has 256 (2^8) such bit patterns but only 74 different bit patterns are used for various operations. these 74 different bit patterns (instructions) are called the instruction set. [br] Example 1000 0001 – is an instruction that adds the number in the register named C to the number in the accumulator, and stores the result in the accumulator. 0111 1000 – is an instruction that copies the number in the register named B to the accumulator. [br] Sometimes to make the representation easier, hexadecimal codes for bit patterns are used. Hexadecimal codes are easy to write and remember rather than binary codes or patterns. For example, 1000 0001 can be coded as 81 in hexadecimal codes. Advantages of Machine language The machine language program is executed faster than a program written in a high-level language program. No translator and converter are required since the microprocessor directly understands 0s and 1s. Disadvantages of Machine languages Difficult to learn and remember. Programs are lengthy and complex. Programs are machine-dependent so programs written for one processor may not run on different processors. Computer architecture and organization must be known before writing the program. Machine language is rarely used nowadays, except where very high-speed execution is required. it is also used in cheap microcomputer systems. Assembly Language The next evolution of programming language was the assembly language. Assembly language uses abbreviated names, called mnemonics, instead of a sequence of 0s and 1s. Since microprocessors can understand only 0s and 1s, the program written in assembly language is not of any use for microprocessors without a translator. [br] A translator called an assembler translates the assembly language (source program) to machine language (object program). As shown in the given above image the input to an assembler is a source program written in assembly language and its output is an object program that is in machine language. Since the assembler translates each assembly language instruction into an equivalent machine language instruction there is one correspondence between the assembly instruction of the source program and the machine instruction of the object program. [br] Since mnemonics are only abbreviated names they do not specify the complete operations. the complete description of each instruction must be supplied by the manufacturer. the complete set of 8085 mnemonics is called the 8085 assembly language and a program written in these mnemonics is called an assembly language program. Example Machine Code Mnemonic Remark 1000 0001 ADD C is an instruction that adds the number in the register named C to the number in the accumulator and stores the result in the accumulator 0111 1000 MOV A, B is an instruction that copies the number in the register named B to the accumulator An assembly language program written for one microprocessor is not transferable to a computer with another microprocessor unless the two microprocessors are compatible with their machine code. Advantages of assembly language Easy to learn and remember. With a glance through the program, it is much easier to visualize its function of the program. An Assembly language program is also executed faster than a program written in a high-level language. Disadvantages of assembly language The programs are written in assembly language not portable. Computer architecture and organization must be known before writing the program. An assembler is needed for translating the assembly language program into machine code. Similar to machine language, assembly language is rarely used nowadays, except where very high-speed execution is required. both machine language and assembly language are termed low-level language. High-level language Even though assembly language was the advanced step in the development of programming language over machine language, both languages are machine-dependent. so the next development in the evolution of programming languages is high-level languages. some examples of high-level languages are as follows [br] BASIC (Beginners All-Purpose Symbolic Instruction Code) FORTRAN (Formula Translation) COBOL (Common Business Oriented Language) High-level language has its own sets of rules and is written with English words and mathematical symbols. a complete instruction written in a high-level language is known as a statement. [br] High-level languages are machine-independent os programmer is not supposed to know the details of the computer. Thus the programmer can mainly concentrate on the logic to solve the given problem or to fulfill the application. [br] Since the microprocessor can understand 0s and 1s only, a converter, which converts the high-level instruction to the binary pattern, is required. A compiler or interpreter is a program that takes English-like statements as to its input and after conversion produces machine language (binary pattern) as its output as shown in the given below image. The compiler is a program that translates the whole high-level program into object code (machine code). if it does not find any syntax error. on the other hand, the interpreter reads one instruction at a time, produces its object code, and executes the instruction before reading the next instruction. In the case of the compiler, the object code program is saved for further use of instructions for repetitive processes, whereas in the case of an interpreter, no object code is saved for future use because the translation and execution processes are alternatives. [br] The compiler is used for larger computers whereas the interpreter is used for small computers. compilers require large main memory as compared to interpreters. Assembler, compiler, and interpreter are put of system software that translates a source program written by the user to an object program that is meaningful to the hardware of the computer or to the microprocessor. These translators are also referred to as language processors since they are used for processing a particular language. Advantages of high-level language Easy to learn and remember. With a glance through the program, it is much easier to visualize its function of the program. The programmer is needed not to be familiar with computer architecture and organization. The program written in a high-level language is portable, provided the other computer has a compiler for the language in which the program is written. Productivity is enormously increased. Disadvantages of high-level language A compiler is required for translating the high-level language program into machine code. Each high-level instruction is translated into more than one instruction in machine language so it is quite expensive. The code generated by the compiler might not be as compact as written straightway in the low-level language. Thus a program is written in high-level language usually takes longer to execute. The knowledge of specifies rules, syntax, and programming techniques for any particularly high-level language is required. Additional software and hardware support is required. [br] A high-level language is almost always used nowadays except where very high-speed execution is required. Nowadays nonprocedural languages like Object Oriented Programming languages (OOPs) and Graphical User Interface Languages (GUI) are the most common high-level languages. These can be drawn into different categories of an advanced high-level language. In these languages many commonly used tasks are predefined. user has to simply specify the name of that procedure instead of writing many statements as in the case of a high-level language. computer fundamentals microprocessor developer guideengineering subjectsinternet