У вас вопросы?
У нас ответы:) SamZan.net

по теме SSEMBLER LNGUGE для студентов специальности 145 01 03 ~ Сети телекоммуникаций специализации 145 01 03 04.html

Работа добавлена на сайт samzan.net:

Поможем написать учебную работу

Если у вас возникли сложности с курсовой, контрольной, дипломной, рефератом, отчетом по практике, научно-исследовательской и любой другой работой - мы готовы помочь.

Предоплата всего

от 25%

Подписываем

договор

Выберите тип работы:

Скидка 25% при заказе до 26.12.2024

3 Read the texts below and explain.

Text 3 «IEEE single precision», Text 5 «IEEE double precision».

Reading

TEXT 1 Non-integral binary numbers

When number systems were discussed in the first chapter, only integer values were discussed. Obviously, it must be possible to represent nonintegral numbers in other bases as well as decimal. In decimal, digits to the right of the decimal point have associated negative powers of ten:

Not surprisingly, binary numbers work similarly:

This idea can be combined with the integer methods of Chapter 1 to convert a general number:

Converting from decimal to binary is not very difficult either. In general, divide the decimal number into two parts: integer and fraction. Convert the integer part to binary using the methods from Chapter 1. The fractional part is converted using the method described below.

Consider a binary fraction with the bits labeled a, b, c, . . . The number in binary then looks like:

Multiply the number by two. The binary representation of the new number will be:

Note that the first bit is now in the one’s place. Replace the a with 0 to get:

and multiply by two again to get:

Now the second bit (b) is in the one’s position. This procedure can be repeated until as many bits needed are found. Figure 6.1 shows a real example that converts 0.5625 to binary. The method stops when a fractional part of zero is reached.

As another example, consider converting 23.85 to binary. It is easy to convert the integral part (23 = 101112), but what about the fractional part (0.85)? Figure 6.2 shows the beginning of this calculation. If one looks at the numbers carefully, an infinite loop is found! This means that 0.85 is a repeating binary (as opposed to a repeating decimal in base 10)1. There is a pattern to the numbers in the calculation. Looking at the pattern, one can see that 0.85 = 0.1101102. Thus, 23.85 = 10111.1101102.

One important consequence of the above calculation is that 23.85 can not be represented exactly in binary using a finite number of bits. (Just as 1/3 can not be represented in decimal with a finite number of digits.) As this chapter shows, float and double variables in C are stored in binary. Thus, values like 23.85 can not be stored exactly into these variables. Only an approximation of 23.85 can be stored.

To simplify the hardware, floating point numbers are stored in a consistent format. This format uses scientific notation (but in binary, using powers of two, not ten). For example, 23.85 or 10111.11011001100110 . . .2 would be stored as:

 

(where the exponent (100) is in binary). A normalized floating point number has the form:

TEXT 2 IEEE floating point representation

The IEEE (Institute of Electrical and Electronic Engineers) is an international organization that has designed specific binary formats for storing floating point numbers. This format is used on most (but not all!) computers made today. Often it is supported by the hardware of the computer itself. For example, Intel’s numeric (or math) coprocessors (which are built into all its CPU’s since the Pentium) use it. The IEEE defines two different formats with different precisions: single and double precision. Single precision is used by float variables in C and double precision is used by double variables.

Intel’s math coprocessor also uses a third, higher precision called extended precision. In fact, all data in the coprocessor itself is in this precision. When it is stored in memory from the coprocessor it is converted to either single or double precision automatically.2 Extended precision uses a slightly different general format than the IEEE float and double formats and so will not be discussed here.

TEXT 3 IEEE single precision

Single precision floating point uses 32 bits to encode the number. It is usually accurate to 7 significant decimal digits. Floating point numbers are stored in a much more complicated format than integers. Figure 6.3 shows the basic format of a IEEE single precision number. There are several quirks to the format. Floating point numbers do not use the two’s complement representation for negative numbers. They use a signed magnitude representation. Bit 31 determines the sign of the number as shown.

The binary exponent is not stored directly. Instead, the sum of the exponent and 7F is stored from bit 23 to 30. This biased exponent is always non-negative.

The fraction part assumes a normalized significand (in the form 1.sssssssss). Since the first bit is always an one, the leading one is not stored! This allows the storage of an additional bit at the end and so increases the precision slightly. This idea is know as the hidden one representation.

How would 23.85 be stored? First, it is positive so the sign bit is 0. Next  the true exponent is 4, so the biased exponent is 7F+4 = 8316. Finally, the fraction is 01111101100110011001100 (remember the leading one is hidden). Putting this all together (to help clarify the different sections of the floating point format, the sign bit and the faction have been underlined and the bits have been grouped into 4-bit nibbles):

This is not exactly 23.85 (since it is a repeating binary). If one converts the above back to decimal, one finds that it is approximately 23.849998474. This number is very close to 23.85, but it is not exact. Actually, in C, 23.85 would not be represented exactly as above. Since the left-most bit that was truncated from the exact representation is 1, the last bit is rounded up to 1. So 23.85 would be represented as 41 BE CC CD in hex using single precision. Converting this to decimal results in 23.850000381 which is a slightly better approximation of 23.85.

How would -23.85 be represented? Just change the sign bit: C1 BE CC CD. Do not take the two’s complement!

Certain combinations of e and f have special meanings for IEEE floats. Table 6.1 describes these special values. An infinity is produced by an overflow or by division by zero. An undefined result is produced by an invalid operation such as trying to find the square root of a negative number, adding two infinities, etc.

Normalized single precision numbers can range in magnitude from 1.0× 2−126 (1.1755 × 10−35) to 1.11111 . . . × 2127 (3.4028 × 1035).

TEXT 4 Denormalized numbers

Denormalized numbers can be used to represent numbers with magnitudes too small to normalize (i.e. below 1.0×2−126). For example, consider the number 1.0012×2−129 (1.6530×10−39). In the given normalized form, the exponent is too small. However, it can be represented in the unnormalized form: 0.010012 × 2−127. To store this number, the biased exponent is set to 0 (see Table 6.1) and the fraction is the complete significand of the number written as a product with 2−127 (i.e. all bits are stored including the one to the left of the decimal point). The representation of 1.001×2−129 is then:

0 000 0000 0 001 0010 0000 0000 0000 0000

TEXT 5 IEEE double precision

IEEE double precision uses 64 bits to represent numbers and is usually accurate to about 15 significant decimal digits. As Figure 6.4 shows, the basic format is very similar to single precision. More bits are used for the biased exponent (11) and the fraction (52) than for single precision.

The larger range for the biased exponent has two consequences. The first is that it is calculated as the sum of the true exponent and 3FF (1023) (not 7F as for single precision). Secondly, a large range of true exponents (and thus a larger range of magnitudes) is allowed. Double precision magnitudes can range from approximately 10−308 to 10308.

It is the larger field of the fraction that is responsible for the increase in the number of significant digits for double values.

As an example, consider 23.85 again. The biased exponent will be 4 + 3FF = 403 in hex. Thus, the double representation would be:

0 100 0000 0011 0111 1101 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1010

or 40 37 D9 99 99 99 99 9A in hex. If one converts this back to decimal, one finds 23.8500000000000014 (there are 12 zeros!) which is a much better approximation of 23.85.

The double precision has the same special values as single precision. Denormalized numbers are also very similar. The only main difference is that double denormalized numbers use 2−1023 instead of 2−127.

Exercises

4 Answer the questions.

1 Is it possible to represent nonintegral numbers as well as decimal ones in other bases?

2 In what format are float and double variables stored in C?

3 What does the consistent format use?

4 What formats with different precisions defines the IEEE?

5 How many bits does IEEE double precision use to represent numbers?

5 Supply the   sentences with the missing   words.

A consistent format, decimal, extended precision, binary, finite number of bits.

1 Converting from … to … is not very difficult either.

2 One important consequence of the above calculation is that 23.85 can not be represented exactly in binary using … … … .

3 To simplify the hardware, floating point numbers are stored in … ….

4 Intel’s math coprocessor also uses a third, higher precision called … … .

6 Find definitions to the following consepts.

1 … … describes a system for numerical representation in which a string of digits (or bits) represents a real number.

a) IEEE

2 … … is a computer numbering format that occupies two adjacent storage locations in computer memory. A … … number, sometimes simply called a double, may be defined to be an integer, fixed point, or floating point.

b) floating point

3 … … is a computer numbering format that occupies one storage location in computer memory at a given address. A … … number, sometimes simply a single, may be defined to be an integer, fixed point, or floating point.

(c) single precision

4 The term … … refers to storage formats for floating point numbers taking advantage of an opportunity not falling in to a regular sequence of single, double and quadruple precision such as 32-bit, 64-bit and 128-bit occupying two, four or eight 16-bit storage words or similar accountancy.

e) double precision

5 The … is an international organization that has designed specific binary formats for storing floating point numbers.

d) "extended precision"

7 Put in prepositions where necessary.

1 It is the larger field … the fraction that is responsible … the increase … the number … significant digits … double values.

2 … a computer many numbers can not be represented exactly … a finite number … bits.

3 … the examples … this section, numbers … an 8-bit significand will be used … simplicity.

4 Double precision magnitudes can range… approximately 10−308  …o 10308.

8 Put the verbs in brackets into a proper tense form.

1 Single precision floating point (to use) 32 bits to encode the number.

2 The direction flag (DF) in the FLAGS register (to determine) where the index registers are incremented or decremented.

3 A special instruction prefix called REP ( to tell) the CPU to repeat the next string instruction a specified number of times.

4 They (to be) useful for comparing or searching arrays.

5 They (to set) the FLAGS register just like the CMP instruction.

9 Find the infinitive and explain its functions in the following sentences.

1 The parameters are encoded so that the class can overload the set data method to take other parameters just as normal C++ functions.

2 To store its data the size of a Big int is measured by the size of the unsigned array.

3 A more sophisticated implementation of the class would allow any size to be added to any other size.

4 One uses the virtual keyword to enable it.

5 There are some practical lessons to learn from this.

6 A clock is used by computers to synchronize the execution of the instructions.  

10 Find Russian equivalents for the following words and  word-combinations and then put them down in  the right column.

number systems

integer values

non-integral numbers

a binary fraction

an infinite loop

a finite number of bits

a consistent format

specific binary formats

numeric coprocessors

single and double precision

extended precision

single precision floating point

a signed magnitude representation

double precision

double precision magnitudes

11 Translate into Russian.

Text 2 «IEEE floating point representation», Text 4 «Denormalized numbers».

12 Translate into English.

1 Для написания программ на Ассемблере, необходимо изучить шестнадцатеричную систему счисления.

2 Шестнадцатеричная система счисления состоит из 10 цифр (от 0 до 9) и 6 букв латинского алфавита (A, B, C, D, E, F).

3 В Ассемблере после двоичного числа всегда должна стоять буква "b". Это нужно для того, чтобы Ассемблер смог отличать десятичные, шестнадцатеричные и двоичные числа.

Unit 19

1 Learn the following words and word-combinations.

floating point

число с плавающей точкой

significand, n

мантисса (мантисса числа)

exponent, n

экспонента, показатель степени

approximation, n

аппроксимация, приближение

infinite precision

бесконечная точность

rounding up

округление в большую сторону

shifting

Смещение

addition, n

Суммирование

subtraction, n

Вычитание

multiplication, n

Умножение

division, n

Деление

ramifications, n

Разветвления

 

2 Learn  the   following  abbreviations.

IEEE (Institute of Electrical and Electronics Engineers) – Институт инженеров электроники и электротехники;

EPS (Encapsulated PostScript) – инкапсулированный формат PostScript.

3 Read the texts below and explain.

«Addition», «Floating Point Arithmetic».

TEXT 1 Floating Point Arithmetic

Floating point arithmetic on a computer is different than in continuous mathematics. In mathematics, all numbers can be considered exact. As shown in the previous section, on a computer many numbers can not be represented exactly with a finite number of bits. All calculations are performed with limited precision. In the examples of this section, numbers with an 8-bit significand will be used for simplicity.

TEXT 2 Addition

To add two floating point numbers, the exponents must be equal. If they are not already equal, then they must be made equal by shifting the significand of the number with the smaller exponent. For example, consider 10.375 + 6.34375 = 16.71875 or in binary:

These two numbers do not have the same exponent so shift the significand to make the exponents the same and then add:

Note that the shifting of 1.1001011 × 22 drops off the trailing one and after rounding results in 0.1100110×23. The result of the addition, 10.0001100×23 (or 1.00001100 × 24) is equal to 10000.1102 or 16.75. This is not equal to the exact answer (16.71875)! It is only an approximation due to the round off errors of the addition process.

It is important to realize that floating point arithmetic on a computer (or calculator) is always an approximation. The laws of mathematics do not always work with floating point numbers on a computer. Mathematics assumes infinite precision which no computer can match. For example, mathematics teaches that (a + b) − b = a; however, this may not hold true exactly on a computer!

TEXT 3 Subtraction

Subtraction works very similarly and has the same problems as addition. As an example, consider 16.75 − 15.9375 = 0.8125:

Shifting 1.1111111 × 23 gives (rounding up) 1.0000000 × 24

0.0000110 × 24 = 0.112 = 0.75 which is not exactly correct.

TEXT 4 Multiplication and division

For multiplication, the significands are multiplied and the exponents are added. Consider 10.375 × 2.5 = 25.9375:

Of course, the real result would be rounded to 8-bits to give:

1.1010000 × 24 = 11010.0002 = 26

Division is more complicated, but has similar problems with round off errors.

TEXT 5 Ramifications for programming

The main point of this section is that floating point calculations are not exact. The programmer needs to be aware of this. A common mistake that programmers make with floating point numbers is to compare them assuming that a calculation is exact. For example, consider a function named f (x) that makes a complex calculation and a program is trying to find the function’s roots4. One might be tempted to use the following statement to check to see if x is a root:

if ( f (x) = = 0.0 )

But, what if f (x) returns 1 × 10−30? This very likely means that x is a very good approximation of a true root; however, the equality will be false. There may not be any IEEE floating point value of x that returns exactly zero, due to round off errors in f (x).

A much better method would be to use:

if ( fabs( f (x)) < EPS )

where EPS is a macro defined to be a very small positive value (like 1×10−10). This is true whenever f (x) is very close to zero. In general, to compare a floating point value (say x) to another (y) use:

if ( fabs(x − y)/fabs(y) < EPS )

Exercises

4 Ask your partner to answer the following questions on the text.

1 Is floating  point arithmetic on a computer different than in continuous mathematics?

2 What operations with floating points numbers do you know?

3  Is floating point arithmetic on a computer (or calculator) always an approximation?

4 How   does multiplication work?

5 What  does mathematics assume which no computer can match?

6 What  common mistake do programmers make when working with floating point numbers?

5 Supply the   sentences with the missing   words.

Limited precision, the significand, infinite precision, floating point, the exponents.

1  If they are not already equal, then they must be made equal by shifting … of the number with the smaller exponent

2  Mathematics assumes … … which no computer can match

3  … …  arithmetic on a computer is different than in continuous mathematics.

4  To add two floating point numbers, … must be equal

5  All calculations are performed with … … .

6 Match the concepts with their definitions.

1 EPS

a) are performed with limited precision.

2 The IEEE 

b) is a macro defined to be a very small positive value.

3 Addition

c) is an international organization.

4 Calculations 

d) is the process to add two floating point numbers.

7 Put in a, the or no article.

1 It is important to realize that floating point arithmetic on …computer (or calculator) is always … approximation.

2 On … computer many numbers can not be represented exactly with … finite number of …bits.

3 …subtraction works very similarly and has … same problems as addition.

4 In … examples of this section, numbers with … 8-bit significand will be used for simplicity.

5 … exponents must be equal to add … two floating point numbers,

8 Make the following sentences in Passive.

1 A function named f (x) makes a complex calculation.

2 Computer memory does not store these numbers in decimal (base 10).

3 Hexadecimal numbers use base 16.

4 The Central Processing Unit (CPU) is the physical device that performs instructions.

5 Computers use a clock to synchronize the execution of the instructions.

9 Find Participles in the following sentences and explain their tense forms and functions.

1 It would look like a function that was explicitly passed a pointer to the object being acted on as the code in Figure 7.14 shows.

2 The –S switch on the DJGPP compiler tells the compiler to produce an assembly file containing the equivalent assembly language for the code produced.

3 This is the data member of the Simple object being acted on, which being the only data in the class, is stored at offset 0 in the Simple structure.

4 If the column is blank, the corresponding bit is not affected at all.

10 Find Russian equivalents for the following words and  word-combinations and then put them down in  the right column.

floating point arithmetic

a finite number of bits

continuous mathematics

limited precision

the laws of mathematics

a macro

a very small positive value

floating point calculations

the function’s roots

the floating point registers

11 Translate into Russian in writing. 

Text 1 «Ramifications for programming», Text 2 «Addition».

12 Translate into English.

 1 Институт инженеров электроники и электротехники  является международной организацией, которая проектирует  двоичные форматы для того, чтобы хранить числа с плавающей запятой.

2. Форма нормализованного числа с плавающей запятой: 1.sssss×2eeeee , где  1.sssss –это мантисса  числа и  eeeee – это экспонента.

3. Не всегда законы математики с плавающей точкой работают на компьютере, и это происходит потому, что математика принимает бесконечную точность.


Keys

Unit 1

Ex 4 1 store, 2 unit, 3 data, 4 access, 5 frequency.

Ex 5 1-c; 2-b; 3-a; 4-e; 5-d.

Ex 6 1 are represented, 2 may be converted, 3 is labelled, 4 are stored. 

Ex 7 1 use, 2 does not keep, 3 consists, 4 does not have, 5 extends, allows.

Ex 12

1 Registers are used very intensively in assembly programs.

2  Most of them have a definite functional assignment.

3 Microprocessor’s program model has several groups of registers, available for use in a program.

Unit 2

Ex 4 1 directives, 2 assembly instructions, machine code, 3 opcode,       4 address, registers.

Ex 5 1-e; 2-d; 3-c; 4-b; 5-a.

Ex 6 1 processing, performing, 2 written, converted, 3 associated, 4 synchronizing, 5 fixed, known. 

Ex 7 1 are not translated, 2 are named; be used, 3 are used, 4 are stored, 5 are composed

Ex 8

1 a, an, the,  the; 2 - , -; 3 the, the, the; 4 -, the, the.

Ex 12

1 Heading files are connected to a compiled file of an initial code by means of the #include preprocessor directive which is followed by the name of a heading file in quotation marks or angular brackets.

2 A property can be assigned with a value or the value can be extracted from  it, and in general one can do with a property all he can do with a simple field.

Unit 3

Ex 4 1assembly, 2 segment registers, 3 code segment, 4 conventions.

Ex 5 1-b; 2-a; 3-d; 4-c.

Ex 6 1 the, the, an; 2 the, the, -, -, an; 3 the, the; 4 -, -, -; 5 the, the, the.

Ex 7

1 The teacher said that it was unusual to create a stand alone program written completely in assembly language.

2 My group-mate asked what compilers I had read about in text 3.

3 The developer said that Borland C/C++ compiler used the Microsoft OMF format for object files.

4 The teacher asked if the most common character code was known as ASCII (American Standard Code for Information Interchange).

Ex 11

1 Assembler allows to write the fastest access applications to hardware.

2 Data initialization should be terminated with a null character.

3 In contrast to C the assembler variables are local by default.

Unit 4

Ex 3 1-c; 2-d; 3-a; 4-b.

Ex 4 1 signed magnitude, 2 two’s complement, 3 increasing, 4 signed integers. 

Ex 5 1 a; 2 the, the; 3 the, the, a; 4 -, -, -; 5 -, the, an.

Ex 6 1 are represented, 2 be written, 3 be defined, 4 is performed, 5 be accessed.

Ex 10

1 To find one's complement of hexadecimal number without conversion to binary presentation is a difficult operation.

2 Decreasing the size does not operate, if the data size exceeds a specified place.

3 There are two types of integers: signed and unsigned.

Unit 5

Ex 3 1 two byte type, keyword, 2 code labels, 3 control structures,        4 branch instructions, 5 statement.

Ex 4 1-b; 2-d; 3-a; 4-c.

Ex 5 1 the, the, the; 2 the; 3 the, the, the; 4 the, the, the. 

Ex 6 1 works, uses, 2 does not know, 3 looks, finds, 4 does not have, has, 5 is.

Ex 10

1 Assembler is a low-level programming language which does not support structured conditional operators.

2 You can jump to any point of the program using conditional operators.

3 It is not enough to be just a programmer to program on assembler language. You must know very well the hardware you are writing a program for.

Unit 6

Ex 4 1 to perform, 2 multiplication, 3 rotate shift, logical shifts, 4 right shifts, 5 significant.

Ex 5 1-d; 2-a; 3-b; 4-c; 5-c.

Ex  6 1 the, a , the; 2 the, a; 3 the, the, the carry; 4 a, the, the; 5 a, the.

Ex 7 1 are designed, 2 is treated, 3 is destroyed, 4 is computed, are set,  5 are not translated. 

Ex 8 1 deciphering, 2 multiplying, 3 using, 4 porting. 

Unit 7

Ex 4 1 operators, 2 instructions, 3 exclusive, 4 bitwise, 5 store.

Ex 5 1-e; 2-d; 3-c; 4-b; 5-a.

Ex 6 1 -, the; 2 a; 3 the, the, the, the, a;  4 a, the.

Ex 7

1 of, for, of; 2 of, in; 3 for, of; 4 on; 5 of, by, of.

Ex 8 1 to define, 2 to run, 3 to know, to interface, 4 to define. 

Ex 12

1 A truth table completely describes a logical function by enumeration of all possible combinations of input values (signals) and corresponding output values (signals)  to every combination.

2 The AND operation on binary bits of operands (0,1) or on logical values (true, false) returns TRUE value only when both operands are equal 1 or both are true.

3 The OR operation – is a binary logical operation, that is TRUE only when at least one of  operands is true.

Unit 8

Ex 4 1 operators, 2 shift, 3 unsigned, 4 data, multiplication, division,    5 bits

Ex 5 1-f; 2-c; 3-a; 4-b; 5-d; 6-e.

Ex 6 1 of, by; 2 of, for; 3 of, -; 4 with, of, on, with, for.

Ex 7 1 performs, performs, 2 does not change, 3 applies, 4 evaluates, depends.

Ex 8 1 linking,  combining, 2 reversing, 3 finding, converting,               4 computing, negating, 5 placing, 6 doing.

Ex 9

  1.  C does provide operators for bitwise operations.
  2.  There are circuits in the CPU that maintain the values of AH and AL.
  3.  The XOR operation is represetned by the binary ^ operator.
  4.  The shift operations are performed by C’s << and >> binary operators.
  5.  Yes, they are the bitwise operators are used in C for the same purposes as they are used in assembly language.
  6.  The << operator performs left shifts.
  7.  To change the permissions of a file requires the C programmer to manipulate individual bits.
  8.  The left operand is the value to shift.
  9.  For example, the code below sets the permissions to allow the owner of the file to read and write to it, users in the group to read the file and others have no access.
  10.  One has to realize that the CPU is composed of many electronic circuits that simply work on bit values.

Ex 12

  1.  A typical C program is organized into one or more source file or modules.
  2.  The file starts with comments that describe the purpose of the module and provide other information, such as the name of the author and date.
  3.  Each file has a similar structure with comments, preprocessor directives, declarations of variables and functions and their definitions.

Unit 9

Ex 3 1 iterations, 2 loop, 3 precompute, store, 4 an array, 5 the odd bit positions.

Ex 4 1-a; 2-c; 3-d; 4-e; 5-b.

Ex 5 1 at of; 2 in, of, off, in; 3 up, into; 4 of, of, in.

Ex 6 1 looks, 2 provides, 3 take, 4 takes, 5 copies, copies.

Ex 7

1 A two dimensional array is expected to be a grid of elements.

2 An array is believed to be a contiguous block of list of data in memory.

3 The row wise representation of multidimensional arrays was discovered to have a direct effect in C programming.

4 Processors were believed to support these operations as instructions.

Ex 11

A loop operator works like this:

- initial value is calculated. Is happens only once on the first implementation of FOR operator;

- condition is checked. If condition is true, the operator specified in loop body is implemented. If condition is false, loop leaving takes place and next operator after loop is executed.

- counter changing occurs after execution of specified operator.

- a sequence of operations is iterated again from the condition checking.

Unit 10

Ex 3 1 functions and procedures; 2 an independent unit of code; 3 jump; 4 a label; 5 the PUSH instruction, the POP instruction.

Ex 4 1-e; 2-d; 3-a; 4-b; 5-c.

Ex 5 1 inserts; 2 shows; 3 requires; 4 is, uses; 5 does not require.

Ex 6 1 the; 2 the, the, the; 3 a, the, an; 4 the, the, a, an; 5 the, the.

Ex 7

1 The global byte bit count array is initialized by this function

2 Efficient access of the data is allowed by these properties.

3 Each row of the two dimensional array is stored contiguously in memory.

4 An implementation of this method is shown in figure 3.8

Ex 12

1 The assembly language implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture.

2 As a rule a modern assembler creates an object code by translating instruction mnemonics into operation codes, and by secifying symbolic names for memory locations and other entities.

3 Instructions (statements) in assembly language are generally very simple, unlike those in high-level languages.

Unit 11

Ex 3 1-d; 2-c; 3-a; 4-b.

  

Ex 4 1 is, 2 removes, 3 are, 4 make up, 5 supports.

Ex 5 1 after, over, on; 2 of, in; 3 of, of; 4 for, for; 5 for.

Ex 6

1 These shifts are designed to allow signed numbers to be quickly multiplied and divided by power of 2.

2 The assembly language programmer is allowed to manipulate the individual bits of data.

3 These operations are supported as instructions by processors.

4 An AND operation is performed by the TEST instruction.

Ex 10

1 Consider a subprogram that  passes a single parameter on the stack.

2 After the subprogram is over, the parameters pushed on the stack must be removed.

3 When a subprogram is invoked, the calling code and the subprogram  must agree on how to pass data between them.

Unit 12

Ex 4 1 the stack, 2 local variables, 3 multi-module programs, 4 the linker, 5 stack frame.

Ex 5  4-a; 1-b; 2-e; 3-c; 5-d.

Ex 6 1 are telling, 2 is saving, 3 is using, 4 is showing, 5 are working, 6 are doing. 

Ex 11

1 The part of the program used for temporary storage of any data is named as a stack. Convenience of a stack lies in its reuse.

2  Initial contents of registers are taken from a stack after return from the subroutine.

3 Data stored on the stack use memory only when the subprogram they are defined for is active.

Unit 13

Ex 4 1 assembly code, 2 function call, 3 types, 4 variables.

Ex 5 1-e; 2-d; 3-b; 4-c;5-a.

Ex 6

1 The teacher explained  that return values were passed via registers.

2 The student asked if finding the address of a label defined in the data or bss segments was simple?

3 My friend asked if the rules of the C calling conventions were specifically written to allow these types of functions?

4 The teacher answered  that when assembly was used, it was often only used for small parts of the code.

Ex 7 1 are, 2 require, 3 computes, stores, 4 allows, 5 is. 

Ex 11

1 Local variables are stored right after saving EBP value in the stack.

2 The function convention can be explicitly declared  when using the extension attribute.

3 The LEA instruction computes the address that would be read by another instruction.

  1.  Unit 14

Ex 3 1 conventions, 2 interfacing, 3 assembly code, 4 portability,           5 explicitly assign

  1.  Ex 4 1-e; 2-c; 3-a; 4-d; 5-b.
  2.  Ex 5 1 is, is using, calls; 2 supports; 3 executes, will be aborted; 4 asks, to use; 5 allows, to place.
  3.  Ex 6

1 A programmer said that the rules above described the standard C calling convention.

2 My friend asked if  an assembly routine could be interfaced to a C program.

3 The teacher recommended to use a common syntax to declare calling convention.

4 The software team advocated that the GCC compiler would allow different calling conventions.

5  My group-mate asked what one great advantage of interfacing C and assembly was.

Ex 10

  1.  1 When interfacing with assembly language it is very important to know what calling convention the compiler is using when it calls your function.
  2.  2 Speed will be the main advantage when using conventions to store int values in a stack or in a register.

Unit 15

Ex 4 1 reentrant subprograms, 2 recursive routine, 3 ENTER, 4 automatic.

Ex 5

1-c, 2-b, 3-d, 4-a, 5-e.

Ex 6 1 a; 2 the, the, the, the; 3 an, a; 4 the, the, the; 5 an, the, the. 

Ex 7 1 is marked, 2 will be aborted, 3 is not called, 4 are stored.

Ex 10

1 Floating point arithmetic on a computer is different than that one in mathematics.

2 The laws of mathematics do not always work with floating point numbers on a computer.

3 To add two floating point numbers, the exponents must be equal.

Unit 16

Ex 4 1 columnwise representation, 2 one dimensional arrays, 3 multidimensional arrays, 4 a grid, 5 an array. 

Ex 5 1-b; 2-a; 3-c; 4-d.

Ex 6

1 Other conventions are thought to be different.

2 This operation was known to be allowed  by the C convention.

3 The stack is considered to be a convenient location for local variables.

4 A multi-module program is expected to be composed  of more than one object file.

Ex 11

Because of these properties arrays allow efficient access to elements by their indices and increase performance when working with a great amount of one-type data.

Unit 17

Ex 4 1 index registers, 2 incremented, 3 Decremented, 4 prefix.

Ex 5 1-d; 2-a; 3- c; 4-b.

Ex 6 1are designed, 2 is used, 3 are stored, 4 is used, is supported, 5 is produced.

Ex 7 1 the,-; 2 the, the; 3 The, the, the, the; 4 the, an, a. 

Unit 18

Ex 5 1 decimal, binary, 2 a finite number of bits, 3 a consistent format,

4 extended precision. 

Ex 6 1-b; 2-e; 3-c; 4-d; 5-a.

Ex 7 1 of, for, in, of, for; 2 on, with, of; 3 in, of, with, for; 4 from, to. 

Ex 8 1 uses, 2 determines, 3 tells, 4 are, 5 set.

Ex 12

1 A hexadecimal notation is to be learned for writing programs on the Assembler.

2 The hexadecimal notation consists of 10 figures (from 0 to 9) and 6 Latin letters (A, B, C, D, E, F).

3 A binary number should always be followed by the letter "b" in the Assembler. It is necessary for the Assembler to differentiate between decimal, hexadecimal and binary numbers.

Unit 19

Ex 5 1 the significand, 2 infinite precision, 3 floating point, 4 exponents, 5 limited precision.

Ex 6 1-b; 2-c; 3-d; 4-a.

Ex 7 1 a, an; 2 a, a, -; 3 -, the; 4 the, an; 5 the, -. 

Ex 8

1 A complex calculation is made with a function named (x).

2 These numbers are not stored in decimal (base 10) in computer memory.

3 Base 16 is used by hexadecimal numbers.

4 Instructions are performed by the Central Processing Unit (CPU).

5 A clock is used by computers to synchronize the execution of the instructions.  

Ex 12

1 The IEEE (Institute of Electrical and Electronic Engineers) is an international organization that has designed binary formats for storing floating point numbers.

2 A normalized floating point number has the form:

1.sssss×2eeeee , where 1.sssss is significand and eeeee is exponent.

3 The laws of mathematics do not always work with floating point numbers on a computer, because mathematics assumes infinite precision

LIST OF ENGLISH-RUSSIAN TERMS

A

access

обращаться, иметь доступ

addition, n

суммирование

approach, n

подход, метод

approximation, n

аппроксимация, приближение

arbitrary

произвольный

arbitrary bit

произвольный, случайный бит

arithmetic shift

арифметический сдвиг

array, n

массив (данных)

array instruction  

Команда работы с массивом

assembly

собирать

assemble, v

собирать, компоновать, транслировать программу

assembly language

язык ассемблера

attribute extension

расширение свойства (признака, атрибута)

available

доступный

B

binary, a

Бинарный, двоичное число

binary operation

операция над двоичными числами, бинарная операция, операция с двумя операндами

binary representation

двоичное представление, запись в двоичной системе (счисления)

binary system

2-ная система исчисления

bit, n

Бит

bitwise, a

поразрядный, побитовый

boolean, a

логический

boundary, n

граница (предел)

branch, n

ветвь(исп. в условных операторах)

built-in support

встроенная поддержка

byte, n

Байт

C

calling convention

соглашение о вызовах

code snippet

фрагмент кода

columnwise representation

представление в виде столбцов

compiler, n

компилятор

complicate, (v)

затруднять, осложнять, усложнять;

compute, v

вычислять, рассчитывать

condition, n

условие, состояние, ситуация

constant, n

константа, постоянная величина

content, n

содержание, содержимое

convention, n

соглашение

convert, v

конвертировать, преобразовывать

consider, v

рассматривать, обсуждать, полагать

contiguous

соприкасающийся, смежный, граничащий, прилегающий

coprocessor

сопроцессор

corresponding, a

соответственный

D

data, n

данные, информация

data segment

сегмент данных

decimal  

десятичное число

decimal digits  

десятичные цифры

decimal system

10-ная  система исчисления

deciphering, n

декодирование

decrease, (n)

уменьшение, убывание, убавление, сокращение;

decrement , n

декремент, убывание, уменьшение

default type

тип по-умолчанию

define, v

определять

definition, n

определение, описание

denormalized numbers

денормализованные числа

direction flag

флаг управления

directive, n

директива

designed

разработанный

determine, v

определять, вычислять, решать, устанавливать

device, n

устройство

digit, n

Цифра

direct, a

Прямой

directive, n

директива

divide   

разделить

division, n

Деление

double word

двойное слово

drawback,(n)

недостаток, отрицательная сторона;

dump, n

дамп, вывод содержимого памяти

E

efficiently, adv

эффективно, продуктивно

efficient access

эффективный доступ

electronic circuit

электрическая цепь

encode, v

кодировать, закодировать

equivalent, n

эквивалент, равноценный

essential, a

Главный, существенный, присущий

exclusive OR

исключающее ИЛИ

executable program

выполняемая программа

explicitly , adv

однозначно, ясно, точно

explicitly assign

однозначно\явно установленный

exponent, n

экспонента, показатель степени

extension, n

расширение

F

final result

конечный результат

flexible, a

Гибкий

floating point

число с плавающей точкой

format string

форматирующая строка

fortunately, adv

к Счастью

fraction

Дробь

fractional part

дробная часть

frame, n

фрэйм

frequency, n

Частота

function, n

Функция

G

generalize,v

обобщать, сводить к общим законам

H

hardware

аппаратные средства

hexadecimal system

16-ная  система исчисления

high level code

код высокого уровня

high level programming languages

языки программирования высокого уровня

I

Implementation, n

внедрение, ввод в работу, реализация.

increment, n

инкремент, приращение, увеличение

Instruction, n

команда, инструкция, программа действий.

incidently (~ially), adv

случайно

increase, (n)

расширение, увеличение;

index register

индексный регистр

indirect, a

косвенный

infinite loop  

бесконечный цикл

infinite precision

бесконечная точность

initialize, v

инициализировать, устанавливать в исходное состояние

initialized array

инициализированный массив

(массив с присвоенныйми значениями элементов)

Instruction, n

команда, инструкция, программа действий.

integer, n

Целое

integral part  

целая часть

integer pointer

целочисленный указатель

integer representation  

целочисленное представление;

interface

интерфейс

iteration, n

Итерация, повторение, шаг цикла

K

Keyword, n

ключевое слово

L

label, v

помечать, отмечать

linker, n

компоновщик.

local variable

локальная переменная

location, n

ячейка памяти

lookup table

таблица поиска, таблица преобразования, справочная таблица, таблица соответствия

loop, n

цикл, петля

loop counter

счётчик цикла

loop unrolling

развертывание цикла, превращение цикла в линейную последовательность команд (может производиться для ускорения исполнения программы, поскольку сокращает каждый цикл на несколько команд)

M

machine code

машинный код, программа на машинном языке

measure, v

измерять

memory, n

память

memory access

выборка из памяти (запоминающего устройства); обращение к памяти (запоминающему устройству)

mnemonic. n

мнемосхема

modify, v

модифицировать, изменять

modular program

модульная программа

multidimensional array

многомерная матрица, многомерный массив

multi-module programs

многомодульные программы

multiple process

многократный процесс

multiplication

умножение

N

non-negative

неотрицательный

O

obvious, a

очевидный

odd, a

нечетный, добавочный.

odd position

нечетная позиция

one's complement , (n)

(поразрядное) дополнение до единицы; обратный код (числа) ( в двоичной системе );

opcode, n

код операции

operand, n

операнд, компонента операции

operator, n

оператор

original value

первоначальное значение

overflow, n

переполнение, избыток

P

parameter, n

параметр

perform, v

выполнять, совершать

pointer, n

указатель

portability, n

портативность

porting , n

перенесение

power, n

степень

precision

точность

precompute, v

предварительно вычислять

prefix, n

префикс

prefix instruction

команда  префикса

printf function

функция printf

processor, n

процессор

provide, v

обеспечивать, предусматривать

purpose, n

цель

push, v

помещать

Q

quotient, n

частное, отношение

R

ramifications, n

разветвления

recast, (v)

рассматривать;

recursion

рекурсия

recursively, adv

рекурсивно

reentrant, n

повторно используемая (программа)

reentrant code

повторно вводимый код

reference, n

ссылка

register

регистр

register-based calling convention  

соглашение о регистровых вызовах

remainder of a division

остаток от деления

represent, (v)

быть изображением, представлять;

representation, n

представление

require, v

требовать, нуждаться

reserved, p.p.

зарезервированный

restriction, n

ограничение

return, v

возвращать

reverse, (a)

перевернутый, обратный, оборотный, инвертированный;

rotate shift

обратный сдвиг

rowwise representation

предстваление в виде строк

rounding up

округление в большую сторону

routine, n

стандартная программа

S

shared library

совместно используемая библиотека, библиотека коллективного доступа

shift, v

перемещать, перестанавливать

shift instructions

инструкции сдвига

sign extension, (n)

расширение знака;

sign flag

флаг знака (+ или -)

signed integer, (n)

целое число со знаком;

signed magnitude, (n)

величина со знаком;

signed magnitude representation

представление величины со знаком

significand, n

мантисса (мантисса числа)

significant, a

существенный, значимый

simplify, v

упрощать

single precision

число одинарной точности

smart compiler

компилятор с развитой логикой

snippet of code

фрагмент, отрывок, кусок кода

source file

исходный файл

specify, v  

задавать, уточнять, определять

stack, n

стек

startup code

начальный код

statement. n

выражение, оператор

store, v

хранить

straightforward binary,

прямой код, прямое представление двоичного числа;

string, n

строка

string instruction  

команда работы со строками

subroutine, n

подпрограмма

subprogram, n

подпрограмма

subprogram call

вызов подпрограммы

subtract, (v)

вычитать;

succinctly, adv

кратко, сжато, локонично

T

technique, n

техника, технические приёмы, методика

tedious, a

утомительный

terminate, v

прекращать. прерывать

truth table

таблица истинности

two’s complement, (n)

двойное дополнение;

U

unary operation

одноместная операция, унарная операция, операция над одним операндом

underline

подчеркивание

unit, n

единица, часть, блок

universal convention

универсальное соглашение, договоренность

unnormalized form

ненормализованная форма

unsigned, a

беззнаковое

unsigned integer, (n)

целое число без знака;

V

variable, n

переменная (величина)

variable storage

переменное запоминающее устройство

vary, v

разниться; отличаться, различаться, расходиться

Y

yield, (v)

получать, давать (в результате какой-либо операции);

CONTENTS

Учебное издание

английский язык

Практикум

для развития навыков технического перевода,

чтения и устной речи

по теме

«ASSEMBLER LANGUAGE»

для студентов специальности

1-45 01 03 – Сети телекоммуникаций

специализации

1-45 01 03 04 – Программное обеспечение сетей телекоммуникаций

Составитель 

Игнатьева Евгения Матвеевна

Редактор Е. Б. Левенкова

Компьютерная верстка Н.И. Марковская,

Т. В. Белайшис

План 2008/2009, поз.

Подписано в печать 2009 Формат 60х84/16.

Бумага офсетная. Гарнитура «Times».

Печать цифровая.

Усл. печ. л.. Уч.-изд. л.

Тираж 50 экз. Заказ

Издатель и полиграфическое исполнение:

учреждение образования

«Высший государственный колледж связи»

ЛИ № 02330/ 0131902 от 03.01.2007

Ул. Ф. Скорины, 8/2, 220114, Минск.




1. на тему- Добровольное медицинское страхование Выполнил- Заинкова М
2. Короткі теоретичні відомості В кожному замкненому провіднику в разі зміни сили струму в ньому виникає Е
3. Муниципальное право комплексная отрасль права сформировавшаяся на стыке нескольких отраслей
4. Византия Современность 8 экскурсий Салоники ~ Касторья Корфу Метеора Дельфы Арголида Афины Сал
5. Обычный аналоговый звук представляется в аналоговой аппаратуре непрерывным электрическим сигналом
6. САМАРСКИЙ ГОСУДАРСТВЕННЫЙ ТЕХНИЧЕСКИЙ УНИВЕРСИТЕТ Кафедра Электроснабжение промышленных предприятий
7. Истоки пацифизма Л Н Толстого по Севастопольским рассказа
8. удельная производительность отдача влияние фактора на результат
9. Домашнее задание по лекции Спрос и предложение на индивидуальных рынках
10. 1 Сущность основные понятия моделей и методов международного стратегического менеджмента и маркетинга в
11. Военнотехнический кадетский корпус Министерства обороны Российской Федерации г
12. Мишель Дюфренн (Dufrenne)
13. тема способное выполнять заданную чётко определённую изменяемую последовательность операций
14. Реферат ldquo;Що ми знаємо про СНІДrdquo; Що ми знаємо про СНІД Один раз ранком Люк по
15. Фамилия имя отчество студента полностью- ___________________________________ 2
16. Принципы эконометрического анализа
17. і. Нічний переїзд по території Угорщини
18. Пищевая промышленность Украины
19. Создайте однотабличную форму СПРАВОЧНИК ТОВАРОВ для ввода просмотра и корректировки данных таблицы ТОВА
20. Тематический план Вопросы для подготовки к экзамену