Introduction to programming languages



A "programming language" is a language designed to describe a set of consecutive actions to be executed by a computer. A programming language is therefore a practical way for us (humans) to give instructions to a computer.

There are three basic types of computer programming languages. They are machine, assembly and high-level. Each of these types of programming languages is described below.

Machine language

Machine language is the only language that a computer understands. Each statement in a machine language program is a sequence of bits. Each bit may be set to 0 or 1. Series of bits represent instructions that a computer can understand. For example, the number 455 is represented by the bit sequence 111000111. Machine language is a low-level programming language. It is easily understood by computers but difficult to read by people. This is why people use higher level programming languages. Programs written in high-level languages are compiled and/or interpreted into machine language so computers can execute them.

Assembly language

Assembly language is a representation of machine language. In other words, each assembly language instruction translates to a machine language instruction. The advantage of assembly language is that its instructions are readable. For example, assembly language statements like MOV and ADD are more recognizable than sequences of 0s and 1s. Though assembly language statements are readable, the statements are still low-level. Another disadvantage of assembly language is that it is not portable. In other words, assembly language programs are specific to a particular hardware. Assembly language programs for a Mac will not work on a PC. But this can be an advantage for programmers who are targeting a specific platform and need full control over the hardware.

High-level language

High-level languages are what most programmers use. Languages such as C++ and Java are all high-level languages. One advantage of high-level languages is that they are very readable. The statements in these languages are English-like. For example, you can gain a basic understanding of what a Java program is doing by simply reading the program source code. High-level languages use English words as statements. Loops in Java programs are indicated by the words for, while and do. To get the current system time (ms) in Java you would call System.currentTimeMillis(). Another advantage of high-level languages is that they are less tedious to use. A single statement in a high-level language can translate into many machine language statements. Finally, high-level languages are usually portable.

A disadvantage of high-level languages is that they are usually less powerful and less efficient. Since statements are high-level, you cannot code at the bit level the way you can with assembly language. High-level languages also need to be compiled and/or interpreted into machine language before execution.

That is a basic description of the three basic types of programming languages. Until people can process information like


Author

Written by Admin

Aliquam molestie ligula vitae nunc lobortis dictum varius tellus porttitor. Suspendisse vehicula diam a ligula malesuada a pellentesque turpis facilisis. Vestibulum a urna elit. Nulla bibendum dolor suscipit tortor euismod eu laoreet odio facilisis.

0 comments: