First, Second, Third, Fourth Generation Computer Languages

First generation Language (Read, Write, Add, Subtract, Multiply, Divide)

Machine Code:

For example, the Ferranti Mark 1, also known as the Manchester Electronic Computer in its sales literature, and thus sometimes called the Manchester Ferranti, was produced by British electrical engineering firm Ferranti Ltd. in 1951 and was the world's first commercially available general-purpose digital computer. Based on the Manchester Mark 1, first operational in 1949, and one of the earliest stored-program computers

 

Neither Microsoft Windows, Google Android, or Apple's iOS operating systems will permit programs to communicate with its hardware directly.
Today, in fact for the past 20-30 years or so, machine code refers to code interfacing with the operating system's kernel through the intermediary of an application binary interface (or ABI).
The operating system kernel is able to manage memory when multiple tasks are running, oversee program "exception" conditions when an unexpected event occurs, and importantly, handle multiple processor "threads".
Click here for further details on "What is a processor thread?".

See more on operating systems below.

 

Second Generation Language (low level)

Assembly Code:
Requires an Assembler (translator / compiler) before the stored program will run and adds a "Branching" or "Goto" option to run inside the stored program. Called Autocode from 1952. Called Assembly language on the IBM System/360 introduced in 1964, then by Intel in 1971 and Motorola in 1974.

Click here for an early example of a Microsoft assembly program displaying the words "Hello World" on the screen in the days Microsoft allowed hardware & software interrupts.
Click here for the same assembly program written in "protected" mode on a modern Windows computer.

Click here to see BIOS firmware

 

Third Generation Languages (High-Level)

FORTRAN (1957): a great formulaic language for scientists and engineers. Developed at IBM using Assembly language over many man years.

BASIC (1964): a great, simpler form of FORTRAN for schools, colleges and small - medium sized businesses, was developed using Assembly language.
Microsoft implemented the original BASIC interpreter (1975) along with its later variants GW-Basic (1983), the QuickBasic compiler (1985), and QBasic (1991) using Intel's x86 Assembly language.
Their Visual Basic compiler (1991) on the other hand along with its graphical user interface (GUI), was written by them using C, and their Visual Basic.NET (2002) also known as VB.NET was written using C++. See more about C and C++ below.

COBOL (1960): a great language for governments and medium - large businesses, for Payrolls, Debtors, Audits etc.

 

C (1972) based on FORTRAN but with ALGOL-like language-building extensions, and also 8-bit byte memory addressing.

Followed eleven years later by the more graphics-oriented C++ (1983).

Two great languages to build

  1. New Languages and Operating Systems — a program that could run programs
  2. "Look-alike" operating systems and processing platforms — known as virtual machines
  3. 4GL run-time systems where the language is tied to an application such as a SQL database.

In the old days prior to the concept of byte addressing, machines fetched bits in memory by using its word address. So, to change the 16th character in a long character string of 6-bit characters using a 36-bit register, the program had to figure out that this occurred in the third word, fetch the third word, figure out that it wanted the fourth character in that word, mask out the old character from the value held in the register, put in the new one, and then store back the amended word. At least six machine instructions. Usually these were relegated to a subroutine, so every store or fetch of a single character involved the overheads of calling a subroutine and returning. With byte addressing that was achieved in one instruction: store this character code at that byte address. Text programs were immediately easier to write, smaller, and ran faster.

Then with C and C++, the individual commands that built entirely new language commands get passed through its own machine code, and in the process built up an associated library of templates (classes), and other files.

To elaborate on these templates or classes: Each C++ class in a class library provides reusable code that runs inside a program in the form of an "object", an "instance" of a specific class. These objects are called on to perform specific actions. The actual library itself is referred to as the "Application Programming Interface" or API.

 

JAVA (1995): A great example of a new language and its libraries, initially created through a C++ compiler.

 

JAVASCRIPT (1995): Another great example of a new language and its libraries, initially created through a C++ compiler, similar to Java but without its "stand-alone" capacity. Instead, it runs inside web browsers — Mozilla Firefox, Apple Safari, Opera, Microsoft Internet Explorer and Edge and of course Google Chrome.

 

C# (2002): Microsoft's most popular latest language and its libraries, that were initially created through a specialized Microsoft C compiler.

  4th Generation Language

Fourth Generation Languages providing Easier, High-Level, Stored programs using External Databases

Extract from Computers Ahead Cbse Class Ix by Rajiv Mathur

 

** End of file