computer programming language
-
What is a computer programming language?
A computer programming language serves as a medium through which a problem is dissected into smaller parts and organized into a sequence of instructions for a computer to execute. Software developers use various programming languages to write code that enables a computer to follow instructions and complete tasks.
These languages utilize control structures to express algorithms and data structures to organize information. Sequence, conditional, and iterative structures are basic control structures used in procedural languages.
4 Britannica SourcesCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles. -
Why do people use programming languages when working with computers?
Programming languages enable software developers to write code that instructs a computer to perform specific tasks. They serve as a medium through which a problem is broken down into component parts, which are then ordered as instructions for a computer to execute.
Early programming languages were close to the binary-encoded instructions executed by the computer. Over time, higher-level languages like FORTRAN and ALGOL were developed, allowing programmers to use algebraic expressions. Contemporary languages offer control and data structures, with control structures in procedural languages providing means to express algorithms.
4 Britannica SourcesCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles. -
What are some examples of popular programming languages?
Many programming languages enable software developers to communicate instructions to a computer. Here are some popular examples:
-
JavaScript JavaScript is a scripting language that brings interactivity to websites and web applications. It can be used for server-side scripting as well.
-
C Originally designed as a minimalist language for writing operating systems, C is often used with UNIX-type systems and remains an option for writing system software.
-
C++ An extension of the C language, C++ incorporates features like object-oriented programming and facilitates both low-level and high-level programming.
-
Java Designed to be versatile, Java is known as a "write once, run anywhere" language, meaning that software written in Java can run on various operating systems.
-
Python Python is an interpreted, object-oriented, high-level language with dynamic semantics. Its clear syntax enhances readability, and it can be used for procedural or functional applications.
5 Britannica SourcesCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles. -
-
How do humans write instructions for a computer using a programming language?
Software developers use programming languages to write code that instructs computers to perform specific tasks. These languages allow humans to communicate with computers by providing instructions they can follow.
Most programming languages share basic control and data structures. Control structures direct the flow of a program using sequences, conditionals, and iterations. A sequence executes instructions one after another; a conditional (IF-THEN) structure allows a program to choose alternative paths; and iteration, or looping, repeats a sequence as often as needed.
There are different types of programming languages, including object-oriented, procedural, declarative, and scripting languages. The trend has been toward more abstract languages that allow programmers to communicate with machines at a level further removed from machine code. Some languages are better suited to certain tasks. For example, Java is ideal for creating Web-based applications.
5 Britannica SourcesCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles. -
What is the difference between a high-level and a low-level programming language?
High-level languages differ from low-level languages in their level of abstraction. Low-level languages require programmers to manage a computer's hardware and data storage features. High-level languages shield the programmer from these concerns and use notations that are easier to read and write. High-level languages allow the programmer to communicate with the machine at a remove from machine code.
2 Britannica SourcesCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles. -
How does a program written in a programming language get turned into something the computer can run?
Programs written in a high-level language must be translated into machine language for a computer to execute them. This translation can occur through interpretation or compilation.
An interpreter examines a program one instruction at a time and executes the corresponding machine operations. Alternatively, a compiler translates the entire program into machine code, which is then saved and executed when needed. Some compilers translate high-level language into an intermediate assembly language, which is then translated into machine code by an assembler. Java, for example, is compiled into Java Bytecode, an intermediate language, which runs on the Java Virtual Machine (JVM).
4 Britannica SourcesCreated from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.
News •
computer programming language, any of various languages for expressing a set of detailed instructions for a digital computer. Such instructions can be executed directly when they are in the computer manufacturer-specific numerical form known as machine language, after a simple substitution process when expressed in a corresponding assembly language, or after translation from some âhigher-levelâ language.
Machine and assembly languages are âlow-level,â requiring a programmer to manage explicitly all of a computerâs idiosyncratic features of data storage and operation. In contrast, high-level languages shield a programmer from worrying about such considerations and provide a notation that is more easily written and read by programmers.
See also List of Programming Languages
Language types
Machine and assembly languages
A machine language consists of the numeric codes for the operations that a particular computer can execute directly. The codes are strings of 0s and 1s, or binary digits (âbitsâ), which are frequently converted both from and to hexadecimal (base 16) for human viewing and modification. Machine language instructions typically use some bits to represent operations, such as addition, and some to represent operands, or perhaps the location of the next instruction. Machine language is difficult to read and write, since it does not resemble conventional mathematical notation or human language, and its codes vary from computer to computer.
Assembly language is one level above machine language. It uses short mnemonic codes for instructions and allows the programmer to introduce names for blocks of memory that hold data. One might thus write âadd pay, totalâ instead of â0110101100101000â for an instruction that adds two numbers.
Assembly language is designed to be easily translated into machine language. Although blocks of data may be referred to by name instead of by their machine addresses, assembly language does not provide more sophisticated means of organizing complex information. Like machine language, assembly language requires detailed knowledge of internal computer architecture. It is useful when such details are important, as in programming a computer to interact with peripheral devices (printers, scanners, storage devices, and so forth).
Algorithmic languages
Algorithmic languages are designed to express mathematical or symbolic computations. They can express algebraic operations in notation similar to mathematics and allow the use of subprograms that package commonly used operations for reuse. They were the first high-level languages.
FORTRAN
The first important algorithmic language was FORTRAN (formula translation), designed in 1957 by an IBM team led by John Backus. It was intended for scientific computations with real numbers and collections of them organized as one- or multidimensional arrays. Its control structures included conditional IF statements, repetitive loops (so-called DO loops), and a GOTO statement that allowed nonsequential execution of program code. FORTRAN made it convenient to have subprograms for common mathematical operations, and built libraries of them.
FORTRAN was also designed to translate into efficient machine language. It was immediately successful and continues to evolve.
ALGOL
ALGOL (algorithmic language) was designed by a committee of American and European computer scientists during 1958â60 for publishing algorithms, as well as for doing computations. Like LISP (described in the next section), ALGOL had recursive subprogramsâprocedures that could invoke themselves to solve a problem by reducing it to a smaller problem of the same kind. ALGOL introduced block structure, in which a program is composed of blocks that might contain both data and instructions and have the same structure as an entire program. Block structure became a powerful tool for building large programs out of small components.
ALGOL contributed a notation for describing the structure of a programming language, BackusâNaur Form, which in some variation became the standard tool for stating the syntax (grammar) of programming languages. ALGOL was widely used in Europe, and for many years it remained the language in which computer algorithms were published. Many important languages, such as Pascal and Ada (both described later), are its descendants.
C
The C programming language was developed in 1972 by Dennis Ritchie and Brian Kernighan at the AT&T Corporation for programming computer operating systems. Its capacity to structure data and programs through the composition of smaller units is comparable to that of ALGOL. It uses a compact notation and provides the programmer with the ability to operate with the addresses of data as well as with their values. This ability is important in systems programming, and C shares with assembly language the power to exploit all the features of a computerâs internal architecture. C, along with its descendant C++, remains one of the most common languages.
Business-oriented languages
COBOL
COBOL (common business oriented language) has been heavily used by businesses since its inception in 1959. A committee of computer manufacturers and users and U.S. government organizations established CODASYL (Committee on Data Systems and Languages) to develop and oversee the language standard in order to ensure its portability across diverse systems.
COBOL uses an English-like notationânovel when introduced. Business computations organize and manipulate large quantities of data, and COBOL introduced the record data structure for such tasks. A record clusters heterogeneous dataâsuch as a name, an ID number, an age, and an addressâinto a single unit. This contrasts with scientific languages, in which homogeneous arrays of numbers are common. Records are an important example of âchunkingâ data into a single object, and they appear in nearly all modern languages.

" height="20" alt="HEW Logo">