about me jonid.8m.com microsoft.com sun.com apple.com litestep.com darkstep.com skinz.org deskmode.com

 

Programming Languages

Programming languages, Contain the series of commands that create software. In general, a language that is encoded in binary numbers or a language similar to binary numbers that a computer's hardware understands is understood more quickly by the computer. A program written in this type of language also runs faster. Languages that use words or other commands that reflect how humans think are easier for programmers to use, but they are slower because the language must be translated first so the computer can understand it.

Application of Programming Languages, Programming languages allow people to communicate with computers. Once a job has been identified, the programmer must translate, or code, it into a list of instructions that the computer will understand. A computer program for a given task may be written in several different languages. Depending on the task, a programmer will generally pick the language that will involve the least complicated program. It may also be important to the programmer to pick a language that is flexible and widely compatible if the program will have a range of applications. The examples above are programs written to average a list of numbers. Both C and BASIC are commonly used programming languages. The machine interpretation shows how a computer would process and execute the commands from the programs.

 

Machine Language

Computer programs that can be run by a computer's operating system are called executables. An executable program is a sequence of extremely simple instructions known as machine code. These instructions are specific to the individual computer's CPU and associated hardware; for example, Intel Pentium and Power PC microprocessor chips each have different machine languages and require different sets of codes to perform the same task. Machine code instructions are few in number (roughly 20 to 200, depending on the computer and the CPU). Typical instructions are for copying data from a memory location or for adding the contents of two memory locations (usually registers in the CPU). Machine code instructions are binary\'97that is, sequences of bits (0s and 1s). Because these numbers are not understood easily by humans, computer instructions usually are not written in machine code.

Assembly Language

Assembly language uses commands that are easier for programmers to understand than are machine-language commands. Each machine language instruction has an equivalent command in assembly language. For example, in assembly language, the statement \'93MOV A, B\'94 instructs the computer to copy data from one location to another. The same instruction in machine code is a string of 16 0s and 1s. Once an assembly-language program is written, it is converted to a machine-language program by another program called an assembler. Assembly language is fast and powerful because of its correspondence with machine language. It is still difficult to use, however, because assembly-language instructions are a series of abstract codes. In addition, different CPUs use different machine languages and therefore require different assembly languages. Assembly language is sometimes inserted into a higher-level language program to carry out specific hardware tasks or to speed up a higher-level program.

 

Higher-Level Languages

Higher-level languages were developed because of the difficulty of programming assembly languages. Higher-level languages are easier to use than machine and assembly languages because their commands resemble natural human language. In addition, these languages are not CPU-specific. Instead, they contain general commands that work on different CPUs. For example, a programmer writing in the higher-level Pascal programming language who wants to display a greeting need include only the following command:

Hello, Jonid!

This command directs the computer's CPU to display the greeting, and it will work no matter what type of CPU the computer uses. Like assembly language instructions, higher-level languages also must be translated, but a compiler is used. A compiler turns a higher-level program into a CPU-specific machine language. For example, a programmer may write a program in a higher-level language such as C and then prepare it for different machines, such as a Cray Y-MP supercomputer or a personal computer, using compilers designed for those machines. This speeds the programmer's task and makes the software more portable to different users and machines. American naval officer and mathematician Grace Murray Hopper helped develop the first commercially available higher-level software language, FLOW-MATIC, in 1957. Hopper is credited for inventing the term , which indicates a computer malfunction; in 1945 she discovered a hardware failure in the Mark II computer caused by a moth trapped between its mechanical relays. From 1954 to 1958 American computer scientist Jim Backus of International Business Machines, Inc. (IBM) developed FORTRAN, an acronym for slation. It became a standard programming language because it can process mathematical formulas. FORTRAN and its variations are still in use today. Beginner's All-purpose Symbolic Instruction Code, or BASIC, was developed by American mathematician John Kemeny and Hungarian-American mathematician Thomas Kurtz at Dartmouth College in 1964. The language was easier to learn than its predecessors and became popular due to its friendly, interactive nature and its inclusion on early personal computers (PCs). Unlike other languages that require that all their instructions be translated into machine code first, BASIC is interpreted\'97that is, it is turned into machine language line by line as the program runs. BASIC commands typify higher-level languages because of their simplicity and their closeness to natural human language. For example, a program that divides a number in half can be written as

10 Input "Enter A Number",X
20 Y=X/2
30 Print "Half Of The Number",Y

The numbers that precede each line are chosen by the programmer to indicate the sequence of the commands. The first line prints ENTER A NUMBER on the computer screen followed by a question mark to prompt the user to type in the number labeled \'93X.\'94 In the next line, that number is divided by two, and in the third line, the result of the operation is displayed on the computer screen.}\par\pard\ql\fi0\li0\ri180\sb0\sa140\sl280\plain{\f1\fs20\cf1 Other higher-level languages in use today include C, Ada, Pascal, LISP, Prolog, COBOL, HTML, and Java. New compilers are being developed, and many features available in one language are being made available in others.

 

Object-Oriented Programming Languages

Object-oriented programming (OOP) languages like C++ are based on traditional higher-level languages, but they enable a programmer to think in terms of collections of cooperating objects instead of lists of commands. Objects, such as a circle, have properties such as the radius of the circle and the command that draws it on the computer screen. Classes of objects can inherit features from other classes of objects. For example, a class defining squares can inherit features such as right angles from a class defining rectangles. This set of programming classes simplifies the programmer's task, resulting in more reliable and efficient programs.

Home