Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Учебник II.doc
Скачиваний:
245
Добавлен:
22.02.2015
Размер:
25.39 Mб
Скачать

Vocabulary practice section 1

1. Complete the following definitions with the words and phrases in the box.

the various parts of the program may occur in programs language binary numbers a given problem instruction

1. algorithm

The step-by-step specification of how to reach the solution to …….

2. flowchart

A diagram representing the logical sequence between …….

3. coding

The translation of the logical steps into a programming …….

4. machine code

The basic instructions understood by computers. The processor operates on codes which consist of …….

5. debugging

The techniques of detecting, diagnosing and correcting errors (or "bugs') which ……..

2. Complete these steps in the writing of a program using the words from the box.

debug documentation flowchart problem compile instructions

1. Understand the ……. and plan a solution.

2. Make a ……., which shows the steps of the program.

3. Write ……. in a programming language.

4. ……. the program – that is, turn it into machine code.

5. Test for errors and ……. the program.

6. Prepare ……. , for example the instruction manual.

3. Put these programming steps into the correct order. Explain what each step means.

KEY INFORMATION SECTION 2

Programming languages

Computers cannot understand ordinary spoken English or any other natural language. The only language they can understand and execute directly is called machine code. This consists of the 1s and Os (binary codes) that are processed by the CPU.

Machine code as a means of communication is very difficult to write, so we use symbolic languagesthat are easier to understand. The translation of symbolic instructions to machine code is accomplished through the use of a special program called alanguage processor. There are three types of language processors:assemblers,compilers, andinterpret­ers. Each translates symbolic instructions to machine code, but each does it differently.

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that specify the behavior of a machine, to implement algorithms precisely. A programming language must convey the logical steps of the program plan so that the control unit or the CPU can interpret and follow the instructions.A programming language's surface form is known as its syntax. Most programming languages are purely textual; they use sequences of text including words, numbers, and punctuation, much like written natural languages. On the other hand, there are some programming languages which are more graphical in nature, using visual relationships between symbols to specify a program. Programming languages have improved throughout the years, just as computer hardware has improved. They have progressed from machine-oriented languages that use strings of binary 1s and 0s to prob­lem-oriented languages that use common mathematical and/or English terms.

The so-called assembly languagesuse abbreviations such as ADD, SUB, MPY to represent instructions. These mnemonic codes are like labels easily associated with the items to which they refer. Basic languages, where the program is similar to the machine code version, are known aslow-level languages. In these languages, each instruction is equivalent to a single machine code instruction, and the program is converted into machine code by anassembler.A low-level language does not need a compiler or interpreter to run; the processor for which the language was written is able to run the code without using either of these. These languages are still quite complex and restricted to particular machines. Machine code and assembly languages are called low-level languages because they are close to the hardware and provide little or no abstraction from a computer's instruction set architecture.

To make the programs easier to write and to overcome the problem of intercommunication between different types of machines, high-level languageswere designed such as BASIC, COBOL, FORTRAN or Pascal. These are allproblem-orientedrather thanmachine-oriented. High-level languages are closer to human languages; they

use forms resembling English, which makes

programming easier; they provide strong

abstraction from the details of the computer and hide the details of CPU operations, they are more portable across platforms.Programs written in one of these languages (known assource programs) are converted into a lower-level language by means of acompiler(generating theobject program). On compilation, each statement in a high-level language is generally translated into many machine code instructions. Some languages are interpreted by aninterpreterprogram, which converts the program into machine code one line at a time as each line is required by the processor. A compiled program only needs to be compiled once, but an interpreted program needs to be interpreted every time it is used. Compiled programs are faster than interpreted programs.

Different programming languages support different styles of programming (called programming paradigms).

The details look different in different languages, but a few basic instructions appear in just about every language:

  • input: Get data from the keyboard, a file, or some other device.

  • output: Display data on the screen or send data to a file or other device.

  • math: Perform basic mathematical operations like addition and multiplication.

  • conditional execution: Check for certain conditions and execute the appropriate sequence of statements.

  • repetition: Perform some action repeatedly, usually with some variation.

The languages used to create Web documents are called markup languages; they use instructions (markups) to format and link text files. Examples are:

HTML (Hyper Text Markup Language) - the code used to create Web pages. It is a page description language used for creating webpages. HTML uses a system of tags to mark page links and formatting. For example, the tag <u> tells the program to start underlining a text. Although programs cannot be created using HTML, small programs can be embedded in HTML code using a scripting language like JavaScript.

VoiceXML- it makes Internet content accessible via speech recognition and phone.

Instead of using a web browser on a PC, you use a telephone to access voice-equipped websites via a VoiceXML interpreter (a voice browser). For input, VoiceXML uses voice recognition. For output, it uses pre-recorded audio content and speech synthesis (text-to-speech). You just dialthe phone number of the website and then give spoken instructions,commands, and get the required information. A typical VoiceXML page could be ‘sports. vxml’

People communicate instructions to the computer in symbolic languages and the easier this communication can be made, the wider the application of computers will be. Scientists are already working on Artificial Intelligence and the next generation of computers may be able to understand human languages.