by Dinesh Thakur Category: Computer Terms

Machine language is generally referred to as first-generation language, assembly language is known as second-generation language, and high-level languages such as C, C++, Java, etc., are called third-generation languages.

Assembly language: The oldest and simplest class of programming language, invented in the 1950S soon after the manufacture of the first computers. In assembly language, the instructional codes have been made more user-friendly in such a manner that by looking at a program written in assembly language one can understand some steps more easily than a sequence of 0s and 1s. An assembly language is a programming language that allows a programmer (a human) to tell the microprocessor (the chip) in the computer exactly what to do, in terms of the specific operations the processor knows how to perform. The computer instructions are written in easily understandable short words which are called mnemonics. For example, MOV stands for moving the data, SUB stands for subtraction, ADD stands for addition, etc. All instructions are written in capital letters. A program in assembly language needs software known as an assembler which converts the program consisting of mnemonics and data into machine language. In this case also the programs are not portable. Nevertheless, it is easier to write the programs and to debug them.

High-level languages (HLL) are more user-friendly. These languages consist of words called keywords and other syntax text which is easily understandable. An effort is made to make the language as close to our day-to-day language as possible. However, natural languages cannot be used as computer languages since they are not precise. In all high-level languages appropriate words are chosen and each of these words is made to represent a set of computer instructions. One keyword may translate into a number of machine language instructions. Thus, HLL also reduces the number of lines of code that a programmer writes. But the programs written in HLL have to be converted back to the machine language. For this we need compilers or interpreters. C is a compiled language. Compilers are available for almost all computing platforms. It is worthwhile to note that programs written in machine language are the most efficient in execution because it does not involve any translation or interpretation as is the case with all high-level languages.

You can think of the difference between assembly language and ahigh-level languagesuch as BASIC, C, or Pascal this way: A program in a high-level language is like saying "point at me," while the assembly language version is like telling a person to contract the muscles that elevate the shoulder, then contract the muscles that extend the elbow, and finally contract the muscles that extend the index finger. This analogy isn't perfect, but it should give you the flavor of the difference. In assembly, each programming line corresponds directly to an instruction in the processor'smachine language.

Besides being laborious to write, assembly language programs have another drawback: They only run on onemicroprocessor family,sometimes only on a single microprocessor. In other words, an assembly program written for the Mac won't run on a PC, and vice versa. That's because each processor knows a different set of operations.

Of course, there must be a reason people write programs in assembly language. Actually, there are three: speed, program size, and control. Assuming equal skill of the programmers, an assembly language program is almost always faster than the equivalent high-level program, and in its finished,executableform, it's usually much smaller (even though the assembly programmer had to write many more lines ofcode).And because you can control the microprocessor on a step-by-step basis, your program gives you exactly the results you want.

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Related Articles