Page 17

Unit 2

Text Study: Programs and Instructions.

Additional Text: Languages and Extensions.

Grammar: The Passive Voice.

Text Study

I. Pre-reading Exercises

1. Repeat the words in chorus:

Sequence, to specify, execution, repertoire, to identify, to require, implicit, explicit, current, content.

2. While reading the text you will come across a number of international words. Try to guess what Ukrainian words they remind of you:

Location,  instruction,  arithmetic,  logic, special,  architectures,  operation,  code,  control, component,  actual,  a result,  a sum,  data,  a machine.

3. Pay attention to some grammatical points:

1) Ultimately, a program has to be represented as a sequence of instructions in memory. 2) Normally, instructions are executed in sequence and the machine is initialized with the program counter holding the memory location of the first instruction from the program and then the fetch-decode-execute cycle is started. 3) Each architecture will have its own special instructions that are not present on the other. 4) If a CPU uses a fixed size op-code, decoding is simple. 5) Many instructions require that data be specified. 6) So sometimes the "operand description" part of an add instruction will need to identify the two CPU data registers that are to be used. 7) Replacing the contents of the PC changes the next instruction executed.

II. Reading

Read the text and be ready to find in the text the answers to the following questions:

·         What is a sequence of instructions in memory?

·         What do different instruction sets depend on?

Programs and Instructions

Ultimately, a program has to be represented as a sequence of instructions in memory. Each instruction specifies either one data manipulation step or a control action. Normally, instructions are executed in sequence. The machine is initialized with the program counter holding the memory location of the first instruction from the program and then the fetch-decode-execute cycle is started. The CPU sends a fetch request to memory specifying the location specified by the PC (program counter); it receives back the instruction and stores this in the Instruction Register (IR). The PC is then updated so that it holds the address of the next instruction in sequence. The instruction in the IR is then decoded and executed. Sometimes, execution of the instruction will change the contents of the PC. This can happen when one gets a "branch" instruction (these instructions allow a program to do things like skip over processing steps that aren't required for particular data, or go back to the start of some code that must be repeated many times).

A CPU is characterized by its instruction repertoire – the set of instructions that can be interpreted by the circuits in the timing and control unit and executed using the arithmetic logic unit.  (Instructions are usually given short "mnemonic" names – names that have been chosen to remind one of the effect achieved by the instruction, like ADD and CLeaR.).

 Different CPU architectures have different instruction sets. There will be lots of instructions that are common – ADD, SUB, etc. But each architecture will have its own special instructions that are not present on the other. Even when both architectures have similar instructions, e.g. the compare and conditional branch instructions, there may be differences in how these work. An instruction is represented by a set of bits. A few CPUs have fixed size instructions; on such machines, every instruction is 16-bits, or 32-bits or whatever. Most CPUs allow for different sizes of instructions. An instruction will be at least 16-bits in size, but may have an additional 16, 32, or more bits.

The first few bits of an instruction form the "Op-code" (operation code). These bits identify the data manipulation or control operation required. Again CPUs vary; some use a fixed size op-code, most have several different layouts for instructions with differing numbers of bits allocated for the op-code. If a CPU uses a fixed size op-code, decoding is simple. The timing and control component will implement a form of multiway switch. The meaning of the remaining bits of an instruction depends on the actual instruction. Many instructions require that data be specified. Thus, an ADD instruction needs to identify which two values are to be summed, and must also specify a place where the result should be stored. Often some of this information can be implicit. An ADD instruction can be arranged so that the sum of the two specified values always replaces the first value wherever this was stored.

Although some data locations can be implicit, it is necessary to define either the source or destination locations for the other data. Sometimes a program will need to add numbers that are already held in data registers in the CPU; at other times, the program may need to fetch additional data from memory. So sometimes the "operand description" part of an add instruction will need to identify the two CPU data registers that are to be used; other times, the "operand description" will have to identify one CPU register and one memory location. Occasionally, the "operand description" part might be used to identify a CPU register and the value that is to added to that register's existing contents. It is here that things get a bit complex. CPUs have many different ways of encoding information about the registers to be used, the addresses of memory locations, and the use of explicit data values. A particular machine architecture will have a set of "addressing modes" – each mode specifies a different way of using the bits of the operand description to encode details concerning the location of data values. Different architectures have quite different sets of addressing modes. Some instructions don't need any data. For example, the "Bcc" (conditional branch) group instructions use only information recorded in the CPU's Flags register. These instructions have different ways of using the operand bits of instruction word. Often, as with the Bcc instructions, the operand bits encode an address of an instruction that is to be used to replace the current contents of the program counter. Replacing the contents of the PC changes the next instruction executed.

Vocabulary Notes

ultimately ['AltimitlI]– в кінцевому рахунку, в кінці кінців

to execute – виконувати, реалізовувати

in sequence – послідовно  

to skip over – перескакувати

to implement виконувати, забезпечувати інструментами, постачати

architecture ['RkItektS(q)] – побудова, структура організації

to initialize [I'nISlaiz] – повертати в початковий стан

a fetch – виборка, виклик (команди чи даних з пам’яті)  

to fetchдостати, приносити

request [ri'kwest] – прохання, вимога, запрос, заявка

instruction repertoire ['repqtwR] – система (набір) команд

to remind – нагадувати  

to achieve [q'tSJv] – досягати, доводити до кінця, виконувати

to compare – порівнювати  

a layout – розміщення, схема розміщення, формат

multiway switch – багатопозиційний перемикач, багатоканальний перемикач

implicit [Im'plIsIt] – не явно виражений, скритий

destination – призначення  

contents – зміст, суть, значення

explicit [Iks'plIsIt] – явний, відкритий, прямий

to specify – точно визначати, встановлювати, детально викладати інформацію

Instruction Register – регістр команд

bit – мінімальна одиниця інформації, подвійний розряд

Comprehension

1. Tell what sentences are true and what are false.

1) Each instruction specifies one data manipulation step. 2) Normally, instructions are executed in sequence. 3) The instruction repertoire is the set of instructions.  4) Different CPU architectures have the same instruction sets. 5) An instruction is represented by a set of bytes. 6) Although some data locations can be implicit, it is necessary to define either the source or destination locations for the other data. 7) CPUs have one way of encoding information about the registers to be used. 8)  Some instructions don't need any data.

2. Choose the right answer:

1) The machine is initialized with the program counter holding the memory location of the  instruction from the program.

a) final;

b) first;

c) second.

2) Sometimes, execution of the instruction will … the contents of the PC.  

a) define;

b) influence;

c) change.

3) Instructions are usually given short "mnemonic" names – names that have been chosen … one of the effect achieved by the instruction.

a) to remind;

b) to forget;

c) to recognize.

4) Each architecture will have its own special … that are not present on the other.

a) names;

b) instructions;

c) programs.

5) The timing and control component will implement a form of … .

a) multiway switch;

b) multiway choice;

c) computer word.

6) Although some data locations can be … , it is necessary to define either the source or destination locations for the other data.

a) unknown;

b) exlicit;

c) implicit.

3. Complete the sentences:

1) A program is … . 2) Instructions are executed (in what way?)… . 3) Program counter  receives back the instruction and stores this in the … . 4) A CPU is characterized by its … . 5) The first few bits of an instruction form the … . 5) The timing and control component will implement a form of … .  6) Different architectures have quite different … .

4. Answer the questions:

1) What is program? 2) How are instructions executed in sequence? 3) What is a CPU characterized? 4) What are common instructions? 5) Why will each architecture have its own special instructions that are not present on the other? 6) What is an instruction represented by? 7) What do the first few bits of an instruction form? 8) What will the timing and control component implement? 9) Can some of this information be implicit? 10) What do different architectures have?

5. Find as quickly as possible and read out the sentences containing the following important information:

  • instruction repertoire
  • instruction sets
  • data locations

*6. Try to tell the gist of the text.

Word Study

1. Give Ukrainian equivalents of the following.

To be represented, a sequence of instructions, to specify one data manipulation step, control action, to be executed in sequence, the fetch-decode-execute cycle, to receive back the instruction, the Instruction Register, to change the contents, to skip over processing steps, particular data, to be repeated many times, the instruction repertoire, fixed size instructions, to identify the data manipulation, to control operation required, several different layouts,  to implement a form of multiway switch,  to require the data,  to identify two values,  information can be implicit,  to define the source or destination locations,  to fetch additional data from memory,  encoding information,  explicit data values,  addressing modes,  to replace the contents.

2. Give English equivalents of the following.

Послідовність команд, змінити зміст, виявити маніпулювання даними, вимагати даних, регістр команд, особливі дані, цикл «взяти-розкодувати-виконати», встановити крок маніпулювання інформацією, взяти додаткові дані з пам’яті, контрольна дія, бути представленим, виконуватись послідовно,  система команд, одержати команду назад, змінити зміст, декілька різних розміщень, перескочити певні кроки обробки, повторюватись багато раз, команди фіксованого розміру, контролювати необхідну інформацію, набувати форми багато позиційного перемикача,  інформація може бути неясною, визначати дві величини, визначити джерело і місце розміщення,  розкодування інформації,   чіткі величини даних,   спосіб адресування.

3.  Match the words in A with their synonyms in B:

A                                 B

ultimately                    to perform

to execute                   outspoken

request                        unspoken

to remind                    to reach

to achieve                   to remember

to compare                  to correspond

implicit                                   to correspond

explicit                                    demand

4. Fill in the gaps with the words from Vocabulary Notes in the appropriate form.

a sequence / implicit /  bits / to remind / to identify / to be executed / layouts / the arithmetic logic unit / the instruction repertoire / to require / to implement / addressing modes

1) А program is … of instructions in memory. 2) Instructions … in sequence. 3) … means the set of instructions that can be interpreted by the circuits in the timing and control unit and executed using … .  4) Instructions are usually given short "mnemonic" names … one of the effect achieved by the instruction. 5)  An instruction is represented by a set of … . 6) The first few bits … the data manipulation or control operation required.  7) Most CPUs have several different … for instructions with differing numbers of bits allocated for the op-code. 8) The timing and control component … a form of multiway switch. 9) Many instructions … that data be specified. 10) Some data locations can be … . 11) Different architectures have quite different sets of … .

5. Translate sentences into English using words and word combinations from the Vocabulary Notes.

1) Кожна команда програми точно визначає крок маніпулювання даними або контрольну дію. 2) Команди дозволяють програмі виконувати різні дії, наприклад перескакувати певний крок обробки, якщо він не вимагається цими даними. 3) Кожен центральний процесор характеризується своєю системою команд, які мають короткі назви, щоб нагадувати про своє призначення. 4) Різна побудова центрального процесора має різні набори команд та особливі команди, які характерні тільки йому. 5) Команди представлені системою бітів, мінімальних одиниць інформації. 6) Деякі центральні процесори мають фіксований розмір команд. Це означає, що кожна команда становить 16 бітів чи наприклад 32 біти і т.п. 7) Кілька перших бітів команди утворюють операційний код. 8) Деякі команди не потребують жодних даних.

Grammar in Use

The Passive Voice

1. Read and translate the following sentences paying attention to the predicates in the Passive Voice:

1) These digits are easily multiplied. 2) I was asked many questions about my work. 3) They were explained how to solve this problem on a computer. 4) The sequence of reasonable operations has been performed by the computer. 5) The new department of mathematics has just been opened. 6) Many books on computers' organization and architecture had been translated from Ukrainian into English by the end of last year.  7) The experiments on the new microcomputer were being I carried out during the whole month. 8) All the digits are recorded on the paper tape when addition is performed. 9) The new key adding machine was transferred into the next room; yesterday. 10) The sequence of reasonable operations is now being carried out by this microcomputer. 11) The conference was addressed by a well-known scientist. 12) The invention of computers was spoken of at the last lecture. 13) Modern I personal computers are always looked at with interest. 14) Many new branches of industry have been developed in your country since the beginning of XX century.

2. Fill in the gaps in the following sentences using the appropriate form of the verb in brackets.

1) Microsoft ... (found) by Bill Gates.  2) Computer language ... (develop) in the 1970s. 3) During that period enormous advances ... (make) in computer technology. 4) The following year, twice as many personal computers ... (sell). 5) The first digital computer ... (build) by the University of Pennsylvania in 1946. 6) Last year more software companies ... (launch) than ever before. 7) Intel (release) the first microprocessor. 8) They (perform) many data processing operations in nanoseconds, which (to be) billionths of seconds. 9) Fourth generation computers (become) smaller as more components (squeeze) onto microchips.

3. Put the verbs in brackets in an appropriate tense form.

Computers, as we know them today, (to appear) comparatively recently. Only in the mid-1940s the first working digital computer (to complete). Then computers (to evolve) tremendously. Vacuum tubes used in the first-generation computer (to replace) by transistors in the second-generation computer at the beginning of the early1960s. By the end of the 1960s, transistors themselves (to replace) by tiny integrated circuit boards and a new generation of computers (to be) on the market. Fourth-generation computers (to be) now produced   with circuits that (to be) much smaller than before and can be on a single chip. Even today, new technologies (to develop) to make even better machines.

Additional Text

(for individual work)

Read and translate the text.

Languages and Extensions

Now we will examine the relationship between languages and extensions. Traditionally, the term language refers (in the computer world) to some form of computer language, a set of common instructions that when properly assembled, create a program or application. Most users are well aware of at least one computer language: BASIC, Pascal, FORTRAN, C, and so on. Such languages are traditionally understood to be real languages because one can cab construct a program with them that can thereafter run generally without need of external support from an interpreter.

Today, the climate is different. For example, the popularity of shell languages, which are used primarily on the UNIX platform, has greatly increased. They are written in a syntax that meets the requirements of the shell or command interpreter of the given platform. These languages cannot create entirely standalone programs that execute without a command interpreter, yet these languages have become vastly popular. A programmer who can proficiently program is such a language is almost guaranteed to land a job somewhere.

As such, these languages stretch the definition of language itself. For even these programs cannot run without assistance from the underlying system, they are indeed full-fledged programs that can and often do run various services and functions of the Internet.

Similarly, there are interpreted languages such as Perl that offer extreme power to the user. They can often interface not just with their own interpreter, but with various shell languages and system calls. They can even be nested within other language constructs. A typical example would be a Perl script nested within a TCL script or within a C program. These are languages that cross the barriers (or perhaps bridge the gaps) between one or more real languages.

Hypertext Markup Language (HTML) is a language, but it should be interpreted by a hypertext reader (Navigator, Internet Explorer, Grail, Arena, Lynx, Opera, Powerbrowser, Netcruiser, and so forth). JavaScript and VBScript are languages that stand between Perl and HTML.  But they perform only a limited set of tasks. In order to create a fully functional and dynamic Web-page environment, one must use a combination of languages.  So we can call a language any set of instructions that can perform more than simple display processes, dynamically and without user intervention (that is, any set of instructions that could potentially automate a task).

In contrast, an extension is any set of instructions, declarations, or statements that formulate one application of a particular language. Most commonly, the term extension refers to HTML extensions. For example, tables in HTML are extensions. They are statements that alter the face of a Web page. The use of tables is becoming more common because tables provide control of the Web page’s appearance. Perhaps the easiest way to grasp  the concept of extensions is to understand that they are statements that extend the originally  intended implementation of HTML.

1. Divide the text into the logical parts and give a title to each one.

2. Put questions to the text.

3. Discuss it with your groupmates.