Introduction to Computer Programming Languages

A programming language allows a programmer to develop the sets of instructions that constitute a computer program. Many different programming languages have been developed, each with its own unique vocabulary; grammar, and use.

Machine Languages

Machine Languages (or first-generation languages) are the most basic level of programming languages. In the early stages of computer development, all program instructions had to be written using binary codes unique to each computer. This type of programming involves the difficult task of writing instructions in the form of strings of binary digits (ones and zeros) or other number systems. Programmers must have a detailed knowledge of the internal operations of the specific type of CPU they are using. They must write long series of detailed instructions to accomplish even simple processing tasks. Programming in machine language requires specifying the storage locations for every instruction and item of data used. Instructions must be included for every switch and indicator used by the program. These requirements make machine language programming a difficult and error-prone task.

Assembler Languages

Assembler languages (or second-generation languages) are the next level of programming languages. They were developed to reduce the difficulties in writing machine language programs. The use of assembler languages requires language translator programs called assemblers that allow a computer to convert the instructions of such languages into machine instructions. Assembler languages are frequently called symbolic languages because symbols are used to represent operation codes and storage locations. Convenient alphabetic abbreviations called mnemonics (memory aids) and other symbols represent operation codes, storage locations, and data elements.

Advantages and Disadvantages. An assembler language uses alphabetic abbreviations that are easier to remember in place of the actual numeric addresses of the data. This greatly simplifies programming, since the programmer does not need to know the exact storage locations of data and instructions. However, assembler language is still machine oriented, because assembler language instructions correspond closely to the machine language instructions of the particular computer model being used. Also, note that each assembler instruction corresponds to a single machine instruction, and that the same number of instructions are required in both illustrations.

Assembler languages are still widely used as a method of programming a computer in a machine oriented language. Most computer manufactures provide an assembler language that reflects the unique machine language instruction set of a particular line of computers. This feature is particularly desirable to system programmers, who program system software (as opposed to application programmers, who program application software), since it provides them with greater control and flexibility in designing a program for a particular computer. They can then produce more efficient software, that is, programs that require a minimum of instructions, storage, and CPU time to perform a specific processing assignment.

High-level Languages

High-level Languages (or third-generation languages) use instructions, which are called statements, that use brief statements or arithmetic expressions. Individual high-level language statements are actually macroinstructions; that is, each individual statement generates several machine instructions when translated into machine language by high-level language translator programs called compiler or interpreters. High-level language statements resemble the phrases or mathematical expressions required to express the problem or procedure being programmed. The syntax (vocabulary, punctuation, and grammatical rules) and the semantics (meanings) of such statements do not reflect the internal code of any particular computer. For example, the computation   X= Y + Z would be programmed in the high-level languages of BASIC and COBOL.

Advantages and Disadvantages. A high-level language is obviously easier to learn and understand than an assembler language. Also, high-level languages have less-rigid rules, forms, and syntaxes, so the potential for errors is reduced. However, high-level languages programs are usually less efficient than assembler language programs and require a greater amount of computer time for translation into machine instructions. Since most high-level languages are machine independent, programs written in a high-level language do not have to be reprogrammed when a new computer is installed, and computer programmers do not have to learn a new language for each computer they program.

Fourth Generation Languages

The term fourth-generation language describes a variety of programming languages that are more nonprocedural and conversational than prior languages. These languages are called fourth generation languages (4GLs) to differentiate them from machine languages (first generation), assembler languages (second generation), and high-level languages (third generation).

Most fourth-generation languages are nonprocedural languages that encourage users and programmers to specify the results they want, while the computer determines the sequence of instructions that will accomplish those results. Users and programmers no longer have to spend a lot of time developing the sequence of instructions the computer must follow to achieve a result. Thus, fourth-generation languages have helped simplify the programming process. Natural languages are 4GLs that are very close to English or other human languages.

Advantages & Disadvantages. There are major difference sin the case of use and technical sophistication of 4GL products, INTELLECT and English Wizard are examples of natural query languages that impose no rigid grammatical rules, while a query language like SQL requires concise structured statements. However, the ease of use of 4GLs is gained at the expense of some loss in flexibility. It is frequently difficult for an end user to override some of the pre-specified formats or procedures of 4GLs. Also, the machine language code generated by a program developed by a 4GL is frequently much less efficient (in terms of processing speed and amount of storage capacity needed) than a program written in a language like COBOL. Major failures have occurred in some large transactions processing applications programmed in a 4GL. These applications were unable to provide reasonable response times when faced with a large amount of Realtime transaction processing and end user inquiries. However, 4GLs have shown great success in business applications that do not have a high volume of transaction processing.

Object-Oriented Languages

Object Oriented programming (OOP) languages have been around since Xerox developed Smalltalk in the 1960s. However, object-oriented languages like Visual Baisc, C++, and Java have become major tools of software development. Briefly, while most other programming languages separate data elements from the procedures or actions that will be performed upon them, OOP languages tie them together into objects. Thus, and object consists of data and the actions that can be performed on the data. For example, an object could be a set of data about a bank customer’s saving account, and the operations (such as interest calculations) that might be performed upon the data. Or an object could be data in graphic form   such as a video display window, plus the display actions that might be used upon it.

In procedural languages, a program consists of procedures to perform actions on each data element. However, in object-oriented systems, objects tell other objects to perform actions on themselves. For example, to open a window on a computer video display, a beginning menu object could send a window object a message to open and a window will appear on the screen. That’s because the window object contains the programs code for opening itself.

Object-oriented languages are easier to use and more efficient for programming the graphics-oriented user interfaces required by many applications. Also, once objects are programmed, they are reusable. Therefore, reusability of objects is a major benefit of object-oriented programming. For example, programmers can construct a user interface for a new program by assembling standard objects such as windows, bars, boxes, buttons, and icons. Therefore, most object-oriented programming packages provide a GUI that supports a “point and click”, “drag and drop” visual assembly of objects known as visual programming.

HTML and Java

HTML and Java are two relatively new programming languages that have become vital tools for building multimedia Web pages, Web sites, and Web-based applications.

HTML (Hypertext Markup Language) is a page description language that creates hypertext or hypermedia documents. HTML inserts control codes within a document at points you can specify that create links (hyperlinks) to other parts of the document or to other documents anywhere on the World Wide Web. HTML embeds control codes in the ASCII text of a document that designate titles, headings, graphics, and multimedia components, as well as hyperlinks within the document.

Several of the programs in the top software suites will automatically convert documents into HTML formats. These include Web browsers, word processing and spreadsheet programs, database managers, and presentation graphics packages. These and other specialized HTML editor programs provide a range of features to help you design and create multimedia Web pages without formal HTML programming.

Java is an object-oriented programming language created by Sun Microsystems that is revolutionizing the programming of applications for the World Wide Web and corporate intranets and extranets. Java is related to the C++ and Objective C programming languages, but is much simpler and secure, and is computing platform independent. Java is also specifically designed for real-time, interactive, Web-based network applications. So Java applications consisting of small application programs, called applets, can be executed by any computer and any operating system anywhere in a network.

The case of creating Java apples and distributing them from network servers to client PCs and network computers is a major reason for Java’s popularity. Apples can be small special purpose application programs or small modules of larger application programs. Applets can reside at Web sites on a network server until needed by client systems, and are easy to distribute over the Internet or intranets and extranets. Applets are platform independent too–they can run on Windows, OS/2, UNIX, and Macintosh systems without modification. So Java is becoming the programming language alternative to Microsoft’s Active X language for many organizations internet on capitalizing on the business potential of the Internet, as well as their own intranets and extranets.

Leave a Reply

Your email address will not be published. Required fields are marked *