Студопедия
Случайная страница | ТОМ-1 | ТОМ-2 | ТОМ-3
АрхитектураБиологияГеографияДругоеИностранные языки
ИнформатикаИсторияКультураЛитератураМатематика
МедицинаМеханикаОбразованиеОхрана трудаПедагогика
ПолитикаПравоПрограммированиеПсихологияРелигия
СоциологияСпортСтроительствоФизикаФилософия
ФинансыХимияЭкологияЭкономикаЭлектроника

Computer arithmetic

A Content review | C Content review | Contextual reference | A Content review | Understanding the passage | Contextual reference | Cause and effect | Data processing | Steps in problem solving | Content review |


Читайте также:
  1. A FIRST LOOK AT COMPUTERS
  2. Active Directory Users and Computers
  3. Ali learned to use the computer. Then he taught his sister. 1 страница
  4. Ali learned to use the computer. Then he taught his sister. 2 страница
  5. Ali learned to use the computer. Then he taught his sister. 3 страница
  6. Ali learned to use the computer. Then he taught his sister. 4 страница
  7. An Electronic Computer

[1] The digital computer is an electronic machine which contains thousands 1
of tiny circuits characterized by the fact that they have only two states:
complete and broken. A complete circuit signifies that the electricity is
on, whereas a broken circuit signifies that the electricity is off. It is
through the on and off states that information is transmitted by the 5

computer. Substituting numbers for these states, one can say that 1 is on
and 0 is off; this is the number system on which the computer operates.
Because there are only two digits in this system, it is termed a binary
system with the 0 and 1 being called bits — B from binary and it from
digit. They can represent all other numbers, the alphabet, and special 10

characters such as $ and #.

[2] In our everyday arithmetic, we use the decimal system, which is based on ten digits — 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. In the decimal system, multiplication by ten would yield the following results:

10 = (10°x0) + (101xl) 15

100 - (10° x 0) + (101 x 0) + (102 x 1) 1000 = (10° x 0) + (101 x 0) + (102 x 0) + (103 x 1)

In tabulating this, we notice that we multiply by 10 each time we move

a number one column to the left; that is, we increase the base number

10 by the power 1. 20

(103) (102) (101) (10°)
1000 100101

1 (1)

1 0 (10)

1 0 0 (100) 25

10 0 0 (1000)

Therefore, 652 in the decimal system is equal to 2 + 50 + 600:
100 101

2 (1x2)

5 0 (10x5) 30

6 0 0 (100x6)


[3] Since the binary system is based on two digits, 0 and 1, we multiply by
2 instead of by 10 each time we move a number one column to the left.
So to convert binary to decimal, we use the base number 2 with
sequentially increasing powers. 35

(23) (22) (21) (2°) 8 4 2 1

As an example, the decimal number 1 is 0001 in binary.

8 4 2 1 (decimal)

0 0 0 1 (lxl) 40

The decimal number 2 is equal to 1 x 2 plus 0 x 1 or 0010 in binary.

8 4 2 1

0 0 1 0 (0x1) plus (1 x 2)

The decimal number 3 is equal to 1 x 1 plus 1 x 2 or 0011 in binary.

8 4 2 1 45

0 0 11

Let us tabulate the decimal numbers 0 to 15 in the binary system.

(23) (22) (21) (2°)
8 421

0 0 0 0 (0) so

0 0 0 1 (1)

0 0 1 0 (2)

0 0 1 1 (3)

0 1 0 0 (4)

0 1 0 1 (5) 55

0 1 1 0 (6)

0 1 1 1 (7)

1 0 0 0 (8)
1 0 0 1 (9)

10 10 (10) eo

10 11 (11)

110 0 (12)

110 1 (13)

1110 (14)

1111 (15) 65

[4] The binary system is very tedious for humans, especially in the handling
of long numbers, and this increases the possibility of committing errors.
To overcome this limitation, two number systems were developed which
are used as a form of shorthand in reading groups of four binary digits.
These are the octal system with a base of 8, and the hexadecimal?o

system with a base of 16. CDC computers use the octal system, whereas IBM computers use the hexadecimal.


[5] The table above shows that four binary digits may be arranged into 16 different combinations ranging from 0000 to 1111. This forms the basis of the hexadecimal system. To represent these binary combinations, the 75 system uses the digits 0 to 9 and 6 letters of the alphabet: A, B, C, D, E, and F. Following is a table that shows the relationship between the binary, the octal, the hexadecimal, and the decimal systems.

Decimal Hexadecimal Octal Binary

0 0 0 0000 so

1 1 1 0001

2 2 2 0010

3 3 3 0011

4 4 4 0100

5 5 5 0101 85

6 6 6 0110

7 7 7 0111

8 8 10 1000

9 9 11 1001

 

10 A 12 1010

11 B 13 1011

12 C 14 1100

13 D 15 1101

14 E 16 1110

15 F 17 1111 95

[6j On some computers, addition is the only arithmetic operation possible. The remaining arithmetic operations are based on the operation of addition (+): subtraction (—) can be thought of as the addition of negative numbers; multiplication (x) is repeated addition; division (h-) is repeated subtraction. How do we add in the binary system? There are 100 four basic rules of addition which we must remember: 1 + 0=1 0+1 = 1

0 + 0 = 0

1 + 1 = 0 and carry 1 or 10 (read from the right 105

to the left as zero-one). Here is an example:

Binary Decimal
1110 14

10008 110

10110 22


Exercises

Main idea

Which statement best expresses the main idea of the text? Why did you eliminate the other choices?

1.Therearefourdifferentnumbersystems.

2. Most arithmetic operations can be analysed in terms of addition. [U 3. Computer arithmetic is based on 0 and 1.


Дата добавления: 2015-11-14; просмотров: 49 | Нарушение авторских прав


<== предыдущая страница | следующая страница ==>
Understanding words| Understanding the passage

mybiblioteka.su - 2015-2024 год. (0.006 сек.)