Computer languages have evolved since the early mainframes that accepted programs in the form of a series of switch combinations entered in succession. Early languages were sometimes syntactically cryptic and difficult to learn. Modern computer languages approach everyday English but still have their syntax rules. Computer languages have been labelled as "first generation," "second generation," "third generation" and "fourth generation." First-generation languages were closer to machine language, while 4GLs approach English. A less granular division of computer languages refers to them as high-level and low-level languages.
The language of computers consists of 1s and 0s combined in groups of eight to form characters. This is because computers operate on switches that can be either on (1) or off (0). Each 1 or 0 is a bit, and eight bits form a byte. Early computers required input in the form of machine language, but this was too cumbersome, so computer languages were developed to take the tediousness out of entering a program into a computer. These languages are either interpreted, as was the early versions of BASIC, or compiled. Either process turns English text into machine language. Interpreters do the conversion on the fly as each statement is encountered, while compilers generate a machine language file that's executable on its own.
Low-level languages are closer to machine language and are far more cryptic than high-level languages. Assembler is the most common low-level language on most computers, whether personal computers or mainframes. Instructions for a mainframe assembler program looks like this: MVC A, B. That instruction tells the computer to move the contents of variable B to variable A. Low-level languages are typically written by highly skilled technical people and are used for utilities and speed-intensive programs. Low-level languages can be used to produce extremely efficient code.
High-level languages approach English in syntax and are easier to write, requiring less technical skill on the part of the programmer. Languages that fall into this category are more numerous than those that fall in the low-level category. BASIC, which stands for Beginners All-purpose Symbolic Instruction Code, is an example of an early high-level interpreted language. As the program runs, each statement is interpreted into a machine language instruction and executed. COBOL is a high-level language that's typically used in mainframe business applications. The moniker stands for Common Business Oriented Language, which implies its intended use. Typical COBOL statements look like this: MOVE TOTAL-CHARGE TO PRINT-LINE-21. The characteristics of a high-level language make it usable by someone who's more business oriented than technically skilled. Fortran, short for "formula translation," is a high-level language that's used primarily for scientific purposes. It's not quite as plain English as COBOL, but Fortran programmers are typically more technically oriented than COBOL programmers.
Over the years a category of mid-level languages has developed that includes object-oriented languages. An example of a mid-level language is Java, which translates programmer-produced code into "tokenized" instructions. A tokenized instruction is one that is no longer in human-readable format but isn't quite machine language format. It requires a run-time interpreter, such as the Java Virtual Machine, to turn the tokenized code into machine code at the time the program is run. This allows the tokenized version of the program to run on multiple computer platforms, giving a level of independence from a specific operating system or machine. Tokenized code runs faster than interpreted code but slower than compiled code. Mid-level languages are typically used for creating the graphical user interfaces which serve as front ends for mainframe COBOL applications. Middle-level language programmers are more technically oriented than high-level language programmers but less so than low-level language programmers.