Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.

Similar presentations


Presentation on theme: " Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language."— Presentation transcript:

1

2  Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language  Translation Translation  Compiler Compiler

3 To write a program for a computer, we must use a computer language. A computer language is a set of predefined words that are combined into a program according to predefined rules (syntax). Over the years, computer languages have evolved from machine language to high-level languages. To write a program for a computer, we must use a computer language. A computer language is a set of predefined words that are combined into a program according to predefined rules (syntax). Over the years, computer languages have evolved from machine language to high-level languages.

4 In the earliest days of computers, the only programming languages available were machine languages. Each computer had its own machine language, which was made of streams of 0s and 1s. The only language understood by a computer is machine language.

5 The next evolution in programming came with the idea of replacing binary code for instruction and addresses with symbols or mnemonics. Because they used symbols, these languages were first known as symbolic languages. The set of these mnemonic languages were later referred to as assembly languages.

6  Although assembly languages greatly improved programming efficiency, they still required programmers to concentrate on the hardware they were using. Working with symbolic languages was also very tedious, because each machine instruction had to be individually coded. The desire to improve programmer efficiency and to change the focus from the computer to the problem being solved led to the development of high-level languages.  Over the years, various languages, most notably BASIC, COBOL, Pascal, Ada, C, C++ and Java, were developed.

7  Programs today are normally written in one of the high-level languages. To run the program on a computer, the program needs to be translated into the machine language of the computer on which it will run.  Programs today are normally written in one of the high-level languages. To run the program on a computer, the program needs to be translated into the machine language of the computer on which it will run. To change a program we write in a high level language into a low level language we use a program called a translator  There are 2 types of translator program we can use: ◦ Interpreters ◦ Compilers

8 1. A compiler normally translates the whole source program into the object program. 2. Source program is in machine language. 3. Object program is in High level language. 4. These work by translating the whole program at once (the object code) and saving the compiled low level version (the source code). 5. This can be slow to use when creating programs as even if an error is found the whole program is translated. 6. Once a completed program is translated it can be run over and over again without the need to retranslate.

9 machine Language High level language Compiler

10 1. Some computer languages use an interpreter to translate the source program into the object program. 2. Interpretation refers to the process of translating each line of the source program into the corresponding line of the object program and executing the line

11 A computer interpreter works much like a human interpreter: 1.It translates a single line of the program at a time. 2.Each line is then run by the computer as it is translated. 3.This is done every time the program is run. 4.This allows errors to be located quickly when making a program but can be slow when running a finished program.


Download ppt " Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language."

Similar presentations


Ads by Google