Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CРС для 2 ПР, ЕК.doc
Скачиваний:
5
Добавлен:
20.11.2019
Размер:
413.18 Кб
Скачать

III. Oral practice.

Discussion points.

1. Software

2. System software and applications software.

3. Communications software.

IV. Reading and translation.

Exercise 7. Read and translate the following text with a dictionary in writing.

Running the Computer Program

The operating system is a collection of program provided by the computer's manufacturer that allows us to schedule jobs for the computer, to translate source programs into object programs, to sort data stored on secondary storage devices, and to copy data from any input device to any output device. These programs are called control programs, language programs and utility programs.

The control program (often called the supervisor, monitor, or executive) is a main-storage-resident program. Its functions are to schedule jobs, schedule input and output for our programs, and to monitor the execution of our programs.

The language processors arc programs that translate source programs into object programs. There are three types of language processors: assemblers, compilers, and interpreters. Each language has its own language processor.

The service programs are programs that are commonly used in all data processing centers. They have functions that are required by everyone using a computer. Examples of service programs include linkage editors to prepare object programs for execution, a librarian to catalogue programs into a library area on magnetic disk, utility programs to transfer data from device to device, and sort-merge programs for sorting data on magnetic tape or disk.

Unit 7 Basic Principles of Programming

I. Language

Vocabulary

To introduce

Уводити, знайомити

Subroutine

Підпрограма, частина програми

Routine

Стандартна програма

Flow-chart

Блок-схема, схема потоку інформації

To assign

Присвоювати

Debugging

Налагоджування

To invalidate

Виводити з ладу

Technique

Метод, методика, технічний прийом

Shorthand

Стенографія

To reemphasize

Підкреслювати знову

To erase

Стирати, вилучати, знищувати, руйнувати інформацію

Commercially available computers

Комп’ютери, що випускають серійно

The overall planning

Загальне планування

Running the code

Прогін коду

Octal numbers

Вісімкові числа

II. Reading and understanding

Exercise 1. Read the text “The Basic Principles of Programming” and translate it.

The Basic Principles of Programming

1. Introduction. The purpose of this chapter is to intro­duce the student to the fundamental principles of coding and programming. These principles are connected with the stages of programming, the flow-charting, using the subrou­tines the computer manual, temporaries, symbolic coding, library of subroutines. In order to leave students free to concentrate on these principles¹, the four-address format, with a minimum of instruction types, is utilized. However, it should be pointed out that the four-address format is used in this chapter for pedagogical reasons only. In practice commercially available computers use only three-, two-, or one-address formats, the latter perhaps being the most common.

2. The Terms 'Coding' and 'Programming’ are often used as synonyms. However, 'a code' is more specifically a short list of instructions that direct the computer to perform only a part of the entire calculations, whereas the term 'program' refers to the complete list of instructions used for the prob­lem. Hence the term 'programming' usually includes the over-all planning of the use of the computer for a particular problem as well as the writing of the instruction lists, or codes, whereas 'coding' is usually limited in meaning to the writing of the instruction lists. Sometimes a code is called a routine.

3. Stages in Programming. There are five stages in prog­ramming. First, the computations to be performed must be clearly and precisely defined. The over-all plan of the com­putations is diagramed by means of a so-called flow chart. The second stage is the actual coding. It is often best to write a code in terms of a symbolic language first, for then changes are easily made. Numbers are assigned to the sym­bols, and the final code is prepared. In the third stage some procedure is used to get the code into the memory of the com­puter. The fourth stage consists of debugging the code, i.e., detecting and correcting any errors. The fifth and final stage involves running the code on the computer and tabulating the results. In fact, it is well known that a single error in one instruction invalidates the entire code. Hence, programming is a technique requiring attention to details without loosing sight of² the over-all plan.

4. Instruction Format. Some bits of the instruction are set aside for the operation code designation³ — i.e., they tell the instruction is 'add', 'multiply', 'divide', etc. The rest of the bits usually defines the four addresses. For the more usual operations that involve two operands, such as addi­tion, multiplication, etc., two of the addresses are the ad­dresses of operands. The third address tells where the result is to be put; the fourth address tells where to obtain the next instruction. So, the instruction format is the way in which the different digits are allocated to represent specific func­tions.

5. Octal Shorthand. The first important detail of coding is the fact that the actual bits in an instruction are not writ­ten out in the binary code; rather, some shorthand is written instead, i.e., the octal equivalent would be written out. In other words, two octal numbers represent the instruction, and each address would be represented by three octal numbers. Thus, if 101 011 is the binary code for the command 'add’ then the instruction that says, "Add the contents of address 011 010 110 to the contents of address 011 100 101, put the result into address 011 110 100, and take the next instruction from address 100 000 001," is written in octal notation as: operation—53, the first operand address—326, the second operand address—345, the third address—364, and the fifth address—401. In such cases it evidently facilitates matters4 to call addresses in the memory by their octal numbers. Also, numerical quantities will be written on the code sheet in octal (i.e., they will have to be converted from decimal to octal before being written on the code sheet).

6. The Computer Manual. For the computer we must have a computer manual that gives the operation codes of differ­ent instructions and also defines precisely the meaning of the addresses for each instruction type. The coding manual must always be at the coder's side.5 Two further observations must be reemphasized: first, when a word is called into the arithmetic/logic unit from the memory, it is not erased from its memory address, but remains there also; second, when a word is put into a memory address, it replaces the previous contents of this address, i.e., it erases what had been there.

Notes:

1 In order to leave students free to concentrate on these principles – Для того, щоб дати можливість студентам сконцентруватись на цих принципах

2 without loosing sight of – не втрачаючи з погляду

3 are set aside for the operation code designation – відкладаються для зазначення коду операції

4 it evidently facilitates matters – це, очевидячки, полегшує ситуацію

5 must always be at the coder’s side – повинен завжди бути під рукою у програміста

Exercise 2. Find where in the text it is said about the points given below. Put down the number of the paragraph.

1. the difference between the terms “coding” and “programming”

2. the technique of programming

3. the way in which the different digits are allocated to represent functions

4. how the instruction and address are represented

5. why one must have a computer manual

Exercise 3. State which form corresponds to the given definition.

1. a set of instructions composed for solving a given problems by a computer;

2. the representation of data or instruction in two symbolic forms;

3. the sequence of steps required to solve a problem;

4. the process by which a set of instructions is produced for a computer to make it perform specified activity;

5. the way in which the different digits are allocated to represent specific functions.

Exercise 4. Find in the text English equivalents of the following words and word-combinations.

1. етапи програмування

2. слід вказати

3. трьох адресний формат

4. повний список

5. дійсне кодування

6. лише одна помилка

7. біти, що залишились

8. вісімкові числа

9. уводити код у пам’ять

10. виявити

11. не втрачаючи з погляду

Exercise 5. State whether the statements listed below are true or false.

1. The principles of programming are stages of programming, the flow-charting, using the subroutine and the computer manual, etc.

2. The terms “coding” and “programming” are often used as synonyms.

3. The term “programming” refers to a short list of instructions that direct the computer to perform only a part of the entire calculations.

4. There are three stages in programming.

5. Instruction format is the way of allocating and representing data in memory or in data base.

6. The computer manual defines the meaning of addresses for each instruction type.

7. When a word is put into a memory address it doesn’t replace the previous contents of this address, they remain there also.

Exercise 6. Find the answers in the text. Put down the number of the paragraph.

1. What is a code?

2. What is a program?

3. What does a term “programming” include?

4. Which are the stages of programming?

5. What does programming require?

6. What will happen if there is a single error in one instruction?

7. What does the computer manual give and define?

8. When does a word erase the previous contents of the memory address?

9. When is a word not erased from its memory address?

10. What are some bits of the instruction set aside for?

11. What is an instruction format?

12. Why is the octal code often used instead of the binary code?

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]