You are on page 1of 248

A Y I

HPOOPIKH

HIAKA YTHMATA
B'

A Y I
HMHTPIO NIKOO
K T M H/Y &

ATPA 2001




HPOOPIKH

HIAKA YTHMATA
B'
A Y I

HMHTPIO NIKOO
K T M H/Y &


XAPIHMO BEPO
T M H/Y &


KPATH KATIKA
T M A

EPAIMO MPATH

EIA BAKAOOY

...

TYPORAMA

/ 19972001
ISBN: 9605381966
K : H 21/2
Copyright 2000

& , 26222 : (0610) 314094, 314206 : (0610) 317244
. 2121/1993,
.

A
E,
B,

E E


K 1

, ,

, ,
E ............................................................................................................... 13
1.1
1.2
1.3

1.4
1.5

.............................................................................................................. 14
.......................................................................................... 16
, .............................................. 21
1.3.1 ............................................................................................. 22
1.3.2 .................................................................... 24
1.3.3 ......................................................................................................... 28
1.3.4 (Cache memory) .................................................................... 33
1.3.5 (Virtual Memory) ................................................................... 37
........................................................................................................................ 39
/ .................................................................................................. 40
........................................................................................................ 42

.................................................................................................................................... 44
K 2

, ,
E ............................................................................................................... 47
2.1

2.2

......................................................................................................................................... 48
2.1.1 ............................................................................................. 48
2.1.2 .................................................................................... 57
........................................................................................................................ 60
............................................................................................................................................. 61
2.2.1 .................................................................. 61
2.2.2
(Addressing Modes) ................................................................................................ 63
2.2.3 ......................................................................... 68
2.2.4 .......... 69
2.2.5 ...................................................... 72

A Y I

........................................................................................................................ 74
.................................................................................................................................... 74
K 3

, ,
E ............................................................................................................... 77
3.1

............................................................................ 78
3.1.1 ................................... 78
3.1.2 ..... 79
3.1.3 .... 94
........................................................................................................................ 98
3.2 ...................................................................................................................... 98
3.2.1 ............................................................................... 98
3.2.2
......................................................................................................................... 101
3.2.3
.......................................................................... 102
3.2.4 .............................................................................................. 114
..................................................................................................................... 115
................................................................................................................................. 115
K 4

, ,
E ............................................................................................................ 117
4.1

4.2

............................................................................................................. 119
4.1.1 ............................................................................................. 119
4.1.2 ............................................................................................... 129
4.1.3. ....................................................................................................... 132
..................................................................................................................... 134
.................................................................................................................... 136
4.2.1. ........................................................................... 138
4.2.2. ........................................................................................... 140
4.2.3. ............................................................................................................................ 141
4.2.4. ...................................................................... 141

EPIEXOMENA

..................................................................................................................... 142
4.3 ........................................................................................................................... 143
4.3.1
(fetch policy) ............................................................................................................... 144
4.3.2
................................................................. 145
4.3.3
...................................... 159
4.3.4
....................................................................................... 160
..................................................................................................................... 164
4.4 ............................................................................................................................. 166
................................................................................................................................. 169
K 5

, ,
E ............................................................................................................ 171
5.1 (Buses) .................................................................................................................. 172
5.1.1 ........................................................................................................... 172
5.1.2 ..................................................... 179
5.1.3 ................................................................................................ 183
5.1.4 ......................................................... 183
..................................................................................................................... 187
5.2 / ................................. 188
5.2.1 / ..................... 188
5.2.2
/ ......................................................................................................... 190
5.2.3 / .......... 191
..................................................................................................................... 198
................................................................................................................................. 198
A PA P T H M A A

, ,
E ............................................................................................................ 201
.1 ............................................................................... 201

10

A Y I

.2 ............... 204
A A A ..................................................................... 209
E A ..................................................................... 237
/ E ...................................................................................................................... 239
B ............................................................................................................................................ 243

, , . .
.
.
, , .
, ,
/.
.
, .
. . , / .

.




. .

.
.
.

5 2000

, ,

, ,
. .

, :




Y


.
.
. ,
, /. , .

14

, ,

1.1

(hardware)
(software). .

, :

, ,

,
,
,
. ,
, , , ,
, . ,
. , , , ,
.
.
(hardware)
(software). ,
,
, , .
,
.

. ,
:

T (system software)
T (diagnostic software)
T (application software)


. :
1. (operating system).
,
.
2. (utility programs). , , :

,
. "explorer" WINDOWS 95.
, , (editors).
(library routines). , .
(translators) (interpreters).
,
.
. ,
,

. ,
.
.

15

, ,

16

. (Data Base Management Systems), , , (Computer Aided Design),


.

1.1

1.2

. , .

;
. .
.
.
. .

1.2


.

, :
, ,

, . -

17

,
.
,
, ' , . , ,
' ,
. ,
, ,

. '
, . , ,
,
' .

APXITEKTONIKH

XPHTE

z
z

z
z

z
z

-z

1.1

18

, ,

1.1
.
.
. , . .
' .
.
, , (device allocation) (scheduling). '
.
,
,
, , (addressing modes). . ,
,
.
, .
, .
.
,
,

, , , (implementation)

(performance). , , ,
, CMOS, BiCMOS
.
(ripple carry) (carry lookahead) .
,
,
.
, , , ,
. /4300, (IBM, Motorola, Apple)/PowerPC
HewlettPackard/PARISC. ,
/ / ,
.

, .

. ' ,
, ,
. ' . PA2.0 HewlettPackard,
PARISC.
, , . ,
,
(compiler), .

19

, ,

20

,
.
,
, .

.
,
. ,

, .

1.3

:
.
.
.
.

1.4

. , , ;
.
.
;
i. ,

.
ii. ,
.

iii.
, ,
.

1.3 ,

().
, ()
. , ,
, 1.5.

, :





. 1.3.1
, .
1.3.2 , 1.3.3 . 1.3.4 1.3.5 ,
.

21

, ,

22

1.3.1


(), , / . 1.2
.

.
(Data Path)
(Control Unit). , .

Mz
z

Kz

Ez
z

A
1.2

, , ,
. , . ,
,

, . , , (
)
. , ,
.

.
,
. , , .
1.2 , , (
' 1.3.5), ( ' 1.3.4),
.

(bits) (bytes),
. 0 1 . ,
, :
Kbytes KB, 1 KB = 210 bytes =1024 bytes
Mbytes MB, 1 MB = 220 bytes =1024 Kbytes
Gbytes GB, 1 GB = 230 bytes =1024 Mbytes
, , , G.
/ . / .
,

. .
2. 1.2 /

23

, ,

24

.
. , 1.2
, /,
( ) .
/.

1.5

,
.

1.6

,
.

1.7

,
.

1.8

:
GBytes, (bits), Kbytes, (bytes), Mbytes.
H ________.
H ,
, ________.
H ________.
H ________.

1.3.2

, , (Data Path) (Control Unit).



(Integrated Circuit, IC) (processor). ,

,

, (cache memory) , , (Memory Managment Unit, MMU).

,
.
,
(fixed point arithmetic)
(floating point arithmetic) ( 2.). , , , . ,
, , , (coprocessor) .
, . ,
, . ,
, .
. ,
, , , . .
(program counter),

25

, ,

26

, (index registers), , (stack pointer),


,
(status register),
. 1.1
,
, .
1.1

.
/ /

21064 / DEC / 1992

32 64

32 64

PowerPC 601 / IBM,


Motorola, Apple / 1993

32 32

32 64

Pentium / Intel / 1993

8 32

8 80

PowerPC 620 / IBM,


Motorola, Apple / 1996

32 64

32 64

, , ,

. , , , (CPU cycle time)
.
(CPU clock rate) .
,
. ,
. :

27

1. , ,
.
2. ,
.
3.
, .
4. .
5. .
6. .
7. 1 .
, , 4 6
. ,
5, 7.

. , .
. .
. 7 . .
.
.
, .
.
,
.

, .

.

1.9

, ,

28

1.3.3


(,
) .
,
, .

. , 0 1 ( 1.3.). .
,
.
, .

1.3

H
,
8
.

: ) ,

, ) )
.
, , (access time)
.
.
, .
,
, . , ( ), ,
(cycle time of the
memory). ,
,
. (data transfer rate bandwidth). .
, . , , . ,

, .
, . ,
,
,

, .

29

30

, ,

. ,
, 2 .

(system configuration),
,
. , . ,
. , ,
.

(Random Access Memory, RAM). RAM, , SRAM, ,
DRAM. SRAM, DRAM ,
SRAM DRAM. ,
DRAM.
(Read Only Memory, ROM),
, .
ROM,
, ,

, , ROM , RAM . ROM ,
,
, .

31

, .
, . , , , .

. ,
. 1.4
, . , , ,
.

100

10

1
101

102
10

104
1.4

105
106
107
108
10

DRAM
SRAM


, .
(overflow), -

,

.

, ,

32

, , .

, .. , , . .
, (serial access) (direct access).
, .
. , , (tracks),
.
, . . ,
4.

1.1

1.10

,
,

.

. :
. .
. .
.
RAM ROM.
.
ROM;

1.3.4 (Cache memory)

, , .
,
. ,
(cache memory).
, , .
(principle of locality) .
( )
, .
,
,
.

SRAM,
DRAM,
. , ,
.

33

1.11

1.12

34

, ,



. , ,
.
, . ,
,

.
, ,
,
( 1.5). ,
,
(hit rate).
,
. 4 , .
()
(unified cache memory),
(data cache) (instruction cache). , . , , , , , .

.

1.3.3,
, -

35

KME

1.5

( 1.4).
, ,

. (multiprogramming) -

36

, ,

,
,
/ / .
/, .
, (disk
cache).
.
. .
,
.
DRAM.

.
(file cache). , , .
,


. ,
. ,
. , . , WINDOWS 95
.
, 8%~10%
, .
, WINDOWS 95
.

. , ,


.

37

1.2

. .

:
.
.

1.3.5 (Virtual Memory)

, , . . ,
,
(virtual memory).
, .
, , (logical
addresses) (logical address space).
H (Memory Management Units, MMU)

. . , , , ,
,
, .
. ,
. ,

1.13

38

, ,

, . 4.
, .
.
,
,
. ,
( ). , ,
( ) .
, .
. , ,
,
, , , , , .
,
,
,
.
, .
.
,
,
, ( 1.5).
.

1.5,
,
. , , : ,
.

:
. .
. ;


,
, / .
,
,
. . ,
. .
, . ,
,

, .

39

1.3

1.14

40

, ,

1.4 /


/, /,
.

, :
,
, , , ,
.
/

/ .
, .
/ ,
, /
.
. ' ,

, ,
. ( ' )
(scanner).
. , , , ,
.
' .
.

, ' . , , . (floppy disk)


, ,
,
/ . , .
,
,
, . . , /, , CDROM, .
, , , ,

, , .. . /
.
,
, ,
, , .
/
, ,
, . ,
10 ,
200.000
.

41

, ,

42

1.15

:
, , , , , , , ,
, , , .
O _____________ .
O _____________ .
O _____________ .
O _____________ .

1.5

.

, :

,
, MIPS ( )
MFLOPS ( ). .
. MIPS Million Instructions Per
Second

.
o ,
. . . , . , ( 3)
(Instruction Set) ,
.

MIPS . MIPS.
MIPS , .
MFLOPS Million FLoatingpoint Operations
Per Second (
2).
. MIPS .

, . .
,
. 100% MFLOPS , 100% . ,
, , , .

43

, ,

44

.
. (execution time)

.
(response time).
(throughput).
.

.
,
, , . SPEC92 (benchmarks). SPEC92
SPECint92 ,

, SPECfp92, .

1.16


100 MIPS 150 MIPS.
;


,
, .

. , .

, ( , 3).

, , .
.
,
, , /
. . ,
, .
KBytes, MBytes GBytes.
.
. ,
.
/ . .
MIPS MFLOPS
, . , .

.

45

.

.

, :





A
A
E
T

.
.
.

48

2.1

, .

, :

.
.

. 2.1.1 ,
. 2.1.2
.
2.1.1

.
.

. ,
.
. ,
. (truncation). ,
.
.

(rounding).

/2, .
= 0.3729836 10 4/2 = 0.00005,
0.3730336
0.3730.
0.3729.
,

, (roundoff errors).
, .
,
. , .
.
. ,
, .
,
.
.
,
.

. , .
, , .

49

50

.
.
.
, 2.1. (Binary Coded
Decimal, BCD, numbers).
2.1

0 9.

0000

0001

0010

0011

0100

0101

0110

0111

1000

1001


(fixed point representation)
(floating point representation).


.
, .
. ,

51


:
12 10, 1, 2, , 0 < .

, 1, 0 1.
(1)1 +
(1)2 + +(1)

= ( 1)/ (1) =1/, 1 = (1) 1 = (1) .
, 0 , 0 1.

0.
.

. 0,
, 1, . O :
. (signmagnitude representation).
() = 0a2a3 a1a0,
() = (1)a2a3 a1a0,
. (diminished
radix complement representation).
() = 0a2a3 a1a0,
() = (1) a2a3 a1a0,
a = (1) a 0 2.

1.
. (radix complement representation).
() =0 a2a3 a1a0,
() =(1) a2a3 a1a0 +1
.

52

2.1
8 (10) = 11 (10) = 11 :
.
(10) = 11 (2) = 00001011
(10) = 11 (2) = 10001011
.
(10) = 11 (2) = 00001011
(10) = 11 (2) = 11110100
.
(10) = 11 (2) = 00001011
(10) = 11 (2) = 11110101


.
2.2

(21 1) (21 1)
(1111) (0111)

000 1000

(21 1) (21 1)
(1000) (0111)

000 111

21 (21 1)
(1000) (0111)

000


.
, 2

32 (231, 231 1). . , .


, , = .
12 10, .
, .

. ,
0.000003706 103, 0.0003706 101 0.3706 102 .

,
,
(normalized) . ,
. , .

,
.

, , .

,
.
754. 1980 .

53

54

. ,
2 32 . 32 2.1.
z
z

z
z

2.1

32


754.

z
z


25 ,
24 . ,
. .
.

,
23 , , .
, .
,
, .
IEEE 754 .

, . .
,
, .
, . . ,
.
2.2
, 1.0 21 1.0 2+1
:

, ,
.
00000000
11111111. . 754
127,
127 754.
2.3
1.0 21 1.0 2+1
2.1.
754, 1 +1 127, 126(10) = 01111110(2) 128(10) = 10000000(2).
, 1.0 21 1.0 2+1
2.2. 2.2. . -

55

56

.
2.2


. 1.0 21
. 1.0 2+1
754.

,
754, :
(1) x (1 + ) 2( )

(2.1)

x 0 < 255.

.
.
64 , , 11 52 .
754,
:
(1) (1 + ) 2( ),

(2.2)

= 1023 0 < 2047.

2.1

.

.
(2) = 101110.001001
(2) = 101011.011001
(2) = 101011.01001
(10) = 97832.0016
(10) = 105389.09601
(10) = 5389.09404

BCD : (10) = 472.01


(10) = 902.34

(2) = 10110, (2) = 011110 (2) = 111011, . . , . 1 . 2.

754 .

2.1.2

. , ,
. .
7
ASCII (American Standard Code for Information Interchange) , 2.3.

57

2.2

2.3

2.4

58

2.3

O ASCII

, ,
928
. 2.4.
, 00/0 15/7,
ASCII. . ,

ASCII.

O 928

2.4

59

60

M , . ,
. , Unicode 16 . M 38.885 A, E, M
A, A, I, A . O 65.000 . To Unicode
.

2.5

R, q, [, %,
, , ASCII 928 .


.
,
. .

,
. ,
.

. ASCII

, , , 928.

2.2


.

.

, :






2.2.1


.

, . , MIPS
17 20 9 0000001000
1101000100100000100000.


(machine language) .

.

(operands) . -

61

62

.
(operation
code, opcode). ,
,
.
, . 2.3.
.
1. .

.
.
5000

, .
2. . .
, , .
3. .
Boole ,
.
4. . , .
. .
, , , .

5. /.

/.
. ,
10 12
20
.
2.2.2
(Addressing Modes)


.
(IMMEDIATE ADDRESSING MODE)

,
.
(DIRECT ADDRESSING MODE)

:
. .

,
. ,

. 232 ,
,
32 .

63

64

2.3

. .
, ,
.
. 64 ,
6 .

2.4

(INDIRECT ADDRESSING MODE)

, .
:
. ,
.

65

. ,
.

2.5

2.6

, .


(pointer) ,
. , .
-

66

. .

, .

.

(relative addressing mode), , (offset displacement).
. ,

. :
1.
, .
2. ,
(statically position independent programs). (program counter relative addressing mode). , ROM 4K ,
.
, ROM,
ROM
. , ,
ROM ROM. ROM
(configuration) .


ROM ROM, (
, ROM).
ROM
.
3. ,

.
,

(relocatability of programs and data segments). .
4. ,
.
(index register).
.
(0)
, () +.
,
() .
,
.
( ) .

.

(stack).
.

67

68

,

.
(stack pointer).

, . ,
, .

.

RAM

2.7

2.2.3


. .
, .

. ,

.
, , .
BCD
,
. ,
, . .

.
32 . 8 (
), 16 ( ), 32 ( ), 64 ( )
, 32 , 64 8 16 .

, IEEE 754 ASCII
Unicode. BCD .
2.2.4

,
(stack architectures), (accumulator architectures)
(generalpurpose
register architectures).

.

69

70

.

PUSH,
POP.

C :
Push A
Push B
Add
Pop C
, ,
.
:
Load A
Add B
Store C

.
. C.

, (loadstore) (registerregister).
:
Load R1, A

Add R1, B
Store C, R1
R1
.
R1
R1.
R1
C.
.
Load R1, A
Load R2,
Add R3, R1, R2
Store C, R3
R1
.
R2 .
R1
R2 R1.

R3 C.

. (hardware)
. ,
(compilers)
.
picoJava Sun, Java.
RISC (Reduced Instruction Set Computers)
CISC (Complex Instruction Set Computers),

71

72

.
,
. , ,
. ,
, .
Power PC MIPS,

8086 68000.
2.2.5


,

,
. 2.2.1, . .
.
, . ,
. ,
,
,
, ,

73

,
. .
.

. , VAX 3 19
0 6 .
. MIPS,
Power PC SPARC.
,
. Intel 80X86.

, ,
.

2.2.1: Load A, Store A, Add R1, R2, R3, AND R1,


R2, R3, JUMP X1 ( ), JUMPE X1 (

,
1).

.
.
. .

2.6

2.7

74

2.8

2.1


.
, ,
1 2.
1 2 ; .


= +
. , [3], 2931, .


. .

,

.
.



.

.
.
,
. , , , .


(BCD).

,
. . ,
.
754.
, , ,
,
. ,
ASCII.
ASCII .
928
.

. .
, , , /.

, . ,
, , .

75

76


,
754
ASCII Unicode.

.
.
,
RISC, , CISC. RISC
,

.
CISC
,

, .

, :

, ,


M
A
Y
M
M
M

1.3.2, , ,
(Data Path) (Control Unit). . 3.1

. 3.2
,
.

78

3.1

,
.

, :



3.1.1



.

, (fixed point arithmetic)
(floating point arithmetic),
3.1.
, ,
.
(
3.2.) .

, .

,

79

.

,

. .

M E
Y z
Y

Y Kz
Y

AM

M O

3.1

3.1.2

, ,
.
.

80

3.2, / .
/.

3.2

/
3.3.
. (ripple carry adder), (carry
lookahead adder)
. , ,
.

81

3.3

/
/ , , . =+' = ,
' .

,
( / XOR ) ( / ,
, /).
, 1.

, . , ,
. , =11100000=22410
=01000001=6510 ,
8 , =00100001= 3310 =1.

82

21, 25510, ,
, +2 +25610 = 22410 + 6510 25610 = 28910 25610 = 3310.
2 .

.
.
3.1

.
A-1 B-1 -2 -1 Y

,
, . , , . ,
. =11100000
=01000001, 3210 6510
=00100001 3310.

, . .
3.1 1 -

83

1 1 .

= '1 . '1 . 2 + 1 . 1 . '2

(3.1)


1 = 1 . 1 + 1 . 2 + 1 . 2,

= 1 2,

(3.2)


(exclusive OR).
(3.1) (3.2)
/ . 3.3
(3.2).
3.3 , .
3.1. 3.1
,

1 = 1 1 2
.
. , =( 012
1) =(012 1).
i i i=1, 2, 3, , 1.
f(i, i), i, 16. ,
, 0, 1, 2 3. .
/.

84

3.4
16 .

A-1
-1
3.4

B-1

(general
purpose register file)
. , ,
. , , RAM,
. , .
,
3.5
. , .
, .

0 2
3.
, 0, 2 3 . ,
. :
. 0 ,
. 3.5 0 AND ,
, 0 . 1, 2 3
. , AND,
1, 2 3,
, ,

.

85

86

-A

-B

Az
A

Az
B

Az

D Q

D Q

D Q

0
z
CLK

0
-A

0
-B

D Q

D Q

D Q

CLK

1
-A

1
-B

D Q

D Q

D Q

2
z
CLK

2
-A

2
-B

D Q

D Q

D Q

3
z
CLK

3
-A

3
-B

3.5

. 2 ,
. 3.5 2 AND ,
, 2 . 0, 1 3 , AND 0, 1, 3
,
.
. 3 ,
.
,
CLK AND
. 3 3 ,
CLK flipflops 3. flipflops
CLK ,
3. ,
0, 1 2 ,
flipflops 0, 1 2
, .


flipflops
.

.
, <, , , . ,
barrelshifters ,

0 1 .

87

88


flipflops,
.
.
3.6 , 3.2.

Level 0

Level 1

Level 2

3.6

3.2

3.6
t1t0

00

01

10

11

89

.
. . 3.6 41,
21.
41 t1t0

3.2 . 21 , =0, 1, 2, 3, C.

5 .
, 3.2, t1
t0 1 0 , ,
C2, C1 C0 1, 0 1 ( 101 5) .
,
3.2
, = 2 > 0,
.
( 41
21). 41 t1t0. 21 C, = 0, 1, , 1.
, 2 . , C3
16 1, 23 = 8 . ,
0, . ()
:
k -1

C 2

i =0

, 1

90

C 1.
, 3.2 , . ,
,
.


.
, , 21 .
, /, .
, , :

.
,

91

.
, ,
. 3.7
, .
flipflops,
. 1
2
.

3.7

3.8 . 1/2 1 2 . ()
,
. 3.7
1/2 .
1/2 .

.
,
. 3.9
-

92

3.8



3.7.

3.9

.
.
, 2,
. (carry propagate). .
carrysave .
,
Booth. carrysave , carrysave . carrysave ,
, , .

carrysave, Booth,
.

.



. 3.7,
, . 1/2

. .

93

94

3.1.3

, , 754.
,
. ,
, .

. 3.10 3.11

.

3.1

3.2


.
, ,


.
.
. = 01011000, = 10100010
. = 10010100, = 10011100
. = 00001010, = 01111111

95

3.10

96

3.11

, 64 . flipflops ,
,
3.6. ;

97

3.3

. O .
. O 30 .


, ,
;

3.4

. M .
. M 3.7.

3.7 3.8.
3.7
8 . 10(10)
38(10).

3.10

.
;

3.5

3.6

98



.

, , ,
, .
.
3.2

,
.

, :

,
,
3.2.1

1.3.2.
:
1.
.
2. ,
.
3.
, , .
4. .

99

3.12

5. .
6. .
7. 1 .

. ,
. ,
,
.

, . , .
.
,
.

,

100

.

. ,
.

:
. (jump)
(branch).
. (call
for subroutine).
. (exception),
, .
. (interrupt), /.
.
, . ,
.
. , .
,


, .
.
.

, , ,

, .
.

. , .
,

.
, ,
.
.

,
(microprogramming).
3.2.2

, . ,

, ,
.

" ", . ,

.
,
-

101

102

, ,
, (debugging).

(state assignment).

(flipflops). log2 .
. ,
, . '
,

, (onehot encoding). , s0, s1, s2, s3
s4, (00001), (00010), (00100),
(01000) (10000).
, , ' ,
.
, ,

.

(clock) , . ,
.
3.2.3

. -

(microprogrammed control unit).




, (control
memory).
(microinstruction)
. .
,
, (microprogram)
. .
( ), . ,
.
, (interpreter) . ,
,
(emulator) . 1 2
2, 2
1.
1 2.


.
-

103

104

,
.
.
(microprogrammable control
units). '

, .
. , , ,
.
. '
, , . .
3.13
.
,
3.14.

105

3. 13

3.14

, . .
,
, " " .
,

106


. ,

.
,
,
. ,
.
.

, .

.
, ,
().
. . ,
, ,
.


.
,

" " . ,

107

" " .
,
, ,
" " .

.
. .
. ,
. .
,
. ,
. ,
3.15.
,
,
.
,
.

3.15

, ,
.

108

3.16 .
000, .
001, 010, 011, 100, 101
110 .

3.16

()
.
() M .

,

,
3.17. , ' . ,
.
. ' , , , .
,
, .

109

3.17


, .
,
, . ' , . ,

110

.
' log2(100+1) = 7 , , 3.18, c0 c99 .

c0 c99, .
, ,

, ,
.

3.18

,
3.19, . , , , , ,

111

.
, , . , '
,
.

3.19


.
.


. '
, 3.20. .
, (optimal) .

112

3.20


(horizontal). .
(vertical).

.


.

, .

(

113

(pipelining))
Y .

,


( 3.21.). .

.
. '
.

3
3

2
2

1
1

2
3
3.21

X .

114

. ( 3.21.).

.
' ( 3.21.).
3.2.4

.
' ,
.

. ,
.

3.7

. .

3.8

3.9


.
100 , 2048
200 .
(), ;

. ; .


.

. .
(RISC) .


.

, , ,
, .
-

115

3.10

3.11

116

.

.
.

,
.

.

.
. .
, .

, .
.

.

. ,

,
. : ) , ) , ) .


,
.

, :





H

O
I

K

, .

.

118

/,
.
,
.

.
(virtualmemory) .
, , .
.
.
, .
.

. ,
.

4.1

.
.

, :





,
,

.

.
.
4.1.1

(RANDOM ACCESS MEMORIES, RAM)

,
,
.
,
.

119

120


4.1.
,

. 1
0, AND
0,
. H 1

.
1, AND
.
. .

clk
4.1



, .

4.2 16 , .

, , 0 1, -

121

24. 4.2,
. 0,
AND 1, ,
AND 2 .
0,
, (
x 4.2) .

1
A0

A1
2

E/Az

2
E/E3

E/E2

E/E1

E/E0
4.2

, .
4.1

122

.
1 0 =1 1=0.
. .
. / 0,
AND 1, , 0
,
1 .
AND 2 1, x
, 1 .
. / 1
AND 1, , , /
.
, 4.1,
.
/ ,
0=1 1=0, . . AND 2 0,
x
.

.

. ,
1 byte
16 Mbytes .
4.3 . 4
EO
1Mbyte, 20 220
.

123

4.3

16
Mbytes
16

1 Mbyte .

,
,
. ,
, 1
bytes 32 Mbytes . 4.4 .
4 4 16 . 16
,

124

16 2 1 Mbyte = 32 Mbytes. , .

4.4

32
Mbytes 32 1 Mbyte .


(CONTENT ADDRESSABLE MEMORIES, CAM)

(associative).

, ,
,
. , , .
,
(mask register).
,
,
, .
4.5. , .
, ,
, .

.
4.6.

,
1,
0.

125

126

4.5

127

clk

4.6


1.
.
XOR () .
, , 0. ( 4.7)
, i
, i 0.
( 4.5)
i .
, i
.. ,
.0, .1, .2 .3
i.

128

4.7

129

4.1.2

, , . (tracks),
4.8.. (sectors).
. . ,
,
.

4.8

H .

130

,
. .
/.

.
( 4.8.).
.
.
(disk controller)

.

,

, ,

,
, .
, , ,
.


,
.
X (seek time).
/

.

.
X (latency time rotational delay).

/
,
, /.
(access time).
,
, / . .
, / .

(movinghead disks).
/. .
(fixedhead disks).

(hard disks). (floppy disks),
. ,
/. , 1.4 ,
.
.

. (back up storage), , , . . -

131

132

, , .
6.35 ,
200 . .
9
, 8 .
/ .
/. ,

.

.
.
, (effective datatransfer rate), ,
.
4.1.3

, CDROMs, . .
, ,
. CDROM,
. 12
CDROM 600 , 240.000
. 100 ms 3.6 /s (
CDROM).
CD.

133

CD
(digital video disk, DVD).
, /
16 GB.

.
,
CDROM.



.

.
,
4.3.
.

4.6.

, , 32 M (32Mbytes) 16
8 .

. 4.1 4.6.
. 4.2 4.5
,
.

4.1

4.1

4.2

134

4.3

:
. .
.
.


,
, .
: )

. , / (SRAM, DRAM ),
' (ROM),
1. , ,
. )
. '
, ,
.
.
.

. , . . -

. .

. , .
, . .
, .
CDROM, .

135

136

4.2

.

, :




. , . .
, .

1, 2
,., n. 1
. 4.9 4.10 .
Ci, ti Si ,
i i. Mi Mi+1 :
Ci > Ci+1
ti < ti+1
Si < Si+1

137

./ : ,
.. :
. : .
i i+1.
i

4.9

.
,
.


,
.
,


,
.

138

i+1. i i+1. (data consistency coherence problem)


, . i+1
i.
.
1, i,
i1,
1,
. ,

1.

, 1, .
4.2.1


, , , (locality of references). , ( ) .


.
,
i i1.
, ,

,

,
,

.

4.10


139

140

+1. ,
1,
. i , SPi .
i
Mi+1. , , i,
SPi1 I, ,
i i1.
SPi2 Mi1,
, i2 .
SP1 ,
1, .

,
1 ,
.

(loops) . . ,
1, .
4.2.2


1
n.
,
.
:
1. ,
.

141

2. ti i.
3. .
4. .
5. (allocation algorithm) I
i+1. Mi
,
.
4.2.3 K



+
+ ...+
C = C 1S1 C 2 S 2 C nS n
S1 + S2 + .... + S n

Ci i, Si i
n . ,
, C Cn,
S1 Sn.
4.2.4 A


. . (hit ratio) Ei i
1, 2, , i1 i. i

i, Ni+1,.N i, i+1,...
Ei =

Ni
N i + N i +1 + ... N n

142

i i
Ai=1Ei. A
i, i+1 i
t Bi +1 , i+1
Ti +1 = t1 + t B 2 + t B3 + ... + t Bi +1 = t1 +

i +1

t
j =2

Bj

t1 .
T1 = t1 .
T=

E T

i i

i =1

4.4

.
.
. .
. ;


1, 2, , .
1 .
. i i+1.

.
.

1
.

. i
1, 2, , i1
i. .
4.3

, .

, :
,






. 4.3.1

143

144


. 4.3.2

.
,
. 4.3.3. 4.3.4
.


.
,
:


, .

,
.
4.3.1 (fetch policy)

(fetch policy)

(on demand) (prefetch).

.

.
, .

4.3.2
(placement policy)


(placement policy) .
,
(direct mapped),
(kway set associative) (fully associative).
,
. , ,
, .

.


.
,
, . 4.11 .
.
, ,

, 1, 5, 9 13.

145

146

0z
1z
2z
3

4.11




.

4
,
16
.

00z
01z
10z
11

0z
1z
2z
3z
4z
5z
6z
7z
8z
9z
10z
11z
12z
13z
14z
15

00000000z
00000001z
00000010z
00000011z
00000100z
00000101z
00000110z
00000111z
00001000z
00001001z
00001010z
00001011z
00001100z
00001101z
00001110z
00001111

,
. 4.11

. ,
1, 5, 9 13
01, , 01.
.
2 ,
2 . 2+ .
2 ,
<, 2 . 2+ .

4.12.

147

4.12

4.13 . RAM,
. RAM
, . 4.13,
. ,

. 4.13

, . ,
. , ,

. , .

148

0
0z
1z
2z
3z
4z
5z
6z
7z
8z
9

4.13

2 -1

. . ,
.
,

.

.

.

. ,
.
,
,
.

, .
4.1
4
. 64 ,
. 16 1 . , 4.12 4.13, =2, =4, =10 =6.
2
34
.
34 16 (16 ) 2. 34, 10 ,
0000100010 6 -

149

150

000010 . 2 000010. :
. 000010001000. 00
. 4 0010 .
0010

, . ,
, /
,
.
. 000100001001.
01
. 4 0010 .
0010

000100 , .
,
/
. , .

. ,
, , ,
. ,

151

. ,
4.14 5
.

0z
1z
2z
3

00z
01z
10z
11

0z
1z
2z
3z
4z
5z
6z
7z
8z
9z
10z
11z
12z
13z
14z
15

00000000z
00000001z
00000010z
00000011z
00000100z
00000101z
00000110z
00000111z
00001000z
00001001z
00001010z
00001011z
00001100z
00001101z
00001110z
00001111

2 ,
2 . 2+ .
2 ,
<, 2 . 2+ .
,
4.15.

4.14

152

4.15

4.16 ( , ).
,
(associative content addressable memory)
. ,
.
RAM.
RAM . ,
, . . . ,
, . 4.16 , , , ,
.

153

1)
1)
1)
1)
1)
1)
0)
0)
0)
0

11000000000000)
00010000110000)
00000000100010)
00000000000101)
00000000000000)
11110000000000)
11110000000000

0000)
0011)
0100)
1110)
0110)
0111)
0110

1111)
1000)
0000)
0010)
1111)
0000)
0111

2 -1

0)
0)
0

4.16

,
.
.

154

, .
, .
4.16,
. / ,

, ,
.

.
4.2
64
. 64
.
16 16 . ,
4.15 4.16, =2 =14.
34
.
.
34, 14 ,
00000000100010, .

00000000100010. :
. 0001000011000001. 14 00010000110000
. .

. / 1

.

01 .
. 0001000010010000. 14 00010000100100
.
,
/ 0, .
,
,
.
,
,
.
.


, ,
. .

, . 4.17 ,
, . ,
, 1, 5, 9 13.
4.17

155

156


.
, 1,
5, 9 13,
01, 01.

.

0z

00z

1z

01z

2z

10z

11

0z
1z
2z
3z
4z
5z
6z
7z
8z
9z
10z
11z
12z
13z
14z
15

00000000z
00000001z
00000010z
00000011z
00000100z
00000101z
00000110z
00000111z
00001000z
00001001z
00001010z
00001011z
00001100z
00001101z
00001110z
00001111

4.17

.
2 8 , 16 .

2 ,
2 . 2+ . 2 , 2 , +<, 2 .
2++ .

, 4.18.

157

4.18

4.19
2 . RAM,
. RAM
,
.
,
.

. .

RAM . .
RAM .
, /
,
.
, , , .

2 .

4.19

0z
1z
2z
3z
4z
5z
6z
7z
8z
9z
10
0z
1z
2z
3z
4z
5z
6z
7z
8z
9z
10

158


,
.
, =1, , . , , .

.

.
4.3.3
(replacement
policy)

, ,
,
, ,
. ,
. (replacement policy)
. ,
,
,
.

,
.
:

159

160

(Random policy). .
(LeastRecently Used, LRU,
policy).
. ,

. ,
. ,
.

(FirstIn/FirstOut, FIFO, policy). .

. ,
.
.
,

. .
4.3.4


. , , .
-

.
, , .


. . , ,
. . . ,
, .

,

(updade policy):
(write through store through).
.
(write back copy back store in).

(dirty bit) .

.
.
.
.
. ,
.

161

162


, :
(write allocate fetch on write).
.
(nowrite allocate write
around).
.


, ,
.

,
.

4.5

.
.
. ,
.

4.6

. .

, 16 .

3, 4, 6, 8, 9, 12 13. .
.

32 8
.
16
8 .

163

4.7

4.8

.
;
. ,
690F8(16).
. ,
960(16).

32 16
.
8
.
. ,
79233(16).

4.9

164

4.10

32 16
.
4 64 16 .
.
;
. ,
960F8(16).
. ,
60(16).

4.11

E

.
, '
1.

,
,
,
.
,
.

, .

,
.
, ,

.


, .

, .

: ,
.
, , .
'
. .

,
.

165

166

4.4


, .

, :






, .

(datatransfer rate bandwidth) . , 50 ns 32 ,


640 Mbits .
, , (memory configuration) .
.
, .

. -

167

,

.
(demand
rate) .
=2n .
n
n1n2.10. =2m . 2n/2m= 2nm . .

z
( )

z
(- )

-
/

2-1


4.20

168

=2m
0 2nm1,
2nm 2 2nm1 . i, 0 i M1, i . 2nm (i+1) 2nm1.
m , nm ,
4.20. (highorder interleaving).
1.
, (
2) .

. m nm
. , =2m
, 0, 1, 2, ., i,.
: i
j i=j(mod N).
(way
loworder interleaving).

.


1 .
:
. .
. 4 .

K
.
/
.
,
.
. , ,
,
, /
` .

.
'
.
'
, i
j
i. ,
,

169

4.12

170

.
. ,
.

, .

, .


.



.
. ,
,
. , , . .

.

:


/

A

A
A
A


. . /
.

172

5.1 (Buses)

(buses)

.

, :


/
,


. . .

.
.
5.1.1

, . , ,
/. .


. (dedicated buses). -

(BUSES)

173

,
(1)/2 .

, .
. .
.

,
5.1.
(shared bus).
.
, , . .
. .

.
, .
.
.

5.1

174


.
. 5.2 5.3. 5.2
, .
/
/.

5.2

(BUSES)

175

5.3



,
,


/.

5.3 ,
,
, /
(local bus). ,

.
/
/
.
/.

. , /

176

.
/
.

. , / (latency) (bandwidth).
, ,
.
, ,
. . , .
,
.
, ,
.
5.3 ,
/ / , .
(local buses)
Peripheral Component Interconnect (PCI),
Intel IBM Apple.
/ : Industry
Standard Architecture (ISA), Extended ISA (EISA), MicroChannel, EIDE
SCSI.

(BUSES)

177

5.4


21066.

5.4
21066. 21066 PCI (PCI bus
interface). PowerPC 601 , .
5.5 5.6
PowerPC 601.

178

5.5

PowerPC 601.

(BUSES)

179

5.6

PowerPC 601.

5.1.2


, ,
. ,

180

. ,
(
5.7).

,
.

, ,
, .

,
( ,
).

/
5.7

. .

(BUSES)

:
. ,
.
. .
,
,

.

, .
(handshaking protocol).
,
.
, (request) (Acknowledge).
.
. 5.8
.

, /
.

181

182

/
5.8

(BUSES)

5.1.3

. , (latency) .


.
:
. .
. .
. ,

.
.
. ,
, , ,
, .
.
.
5.1.4


(master)
,
(slave). , .

. , .

183

184

.

.
.
.
:
1. (Daisy chain arbitration).
, _
(Bus
Request),
_
(Bus
Grant),

_ (Bus_Busy). ,
_, _, _. _
_
_ _ . _
, 5.9.
.
.
_
. .
, , .

.

(BUSES)

185

5.9

_. ,
,
. , _ , _. , _,
_
_.
, _.
VME .
2. (Centralized Parallel Arbitration).
_
_, 5.10. . ,

.

186

5.10

3. (Distributed arbitration by selfselection).


,
.
.

. ,
.
.
. NuBus Apple
Macintsh II, .
,
, , .

(BUSES)

:
ISA, SCSI, PCI, EISA, EIDE.

187

5.1

O _______________ .
O _______________ .
O _______________ /.

. / ;
. ;
.
.
. / ;

E
.
. .
,
.
, , /
.
.
.
, '
.
.

5.2

188

5.2 /


/.

, :
/
/,

.
/.
/.
/
.
5.2.1 /

/
. ,
, /. /
.
/ , 5.11.
/
Intel 80X86.

189

5.11

/.

, ,

/ (memory mapped I/O).

/, 5.12. Motorola 6800.

190

5.12

/.

5.2.2
/

/, /.
/.
/ . /
,
/ . ,

.
/ ,
. /. .

, /

/.
/, .. ,
, (seek) . / , .
(interrupts). / (throughput).
5.2.3 /

/
. /, ,
,
. ( 5.13)
(buffer register) ,
.
/
. /
.

191

192

5.13

/.

.

/
. /,
/
,
/
.
/. ,
/.
,
.

/ (interrupts).
/ /
. /
/, .

. . ,
/
.
, /,
,
.
, , ,
. ,
.
, ( )
.
,
( ) /.

(. ) , .

193

194

.

/ ,
/ /
.
(Direct Memory Access, DMA)
/ . ,
.
. . . ()
/. ,
/ .
/, /
. / ,
,
.
, .
5.14
.

195

5.14

. .
, , (DMA request). ,
,
, 5.15,
, (DMA Acknowledge).

196

5.15

O

(DMA block transfer)

(cycle stealing).

.
, .
.
.
.

197

DOS, (singletasking
operating system), / ,
. , . UNIX Windows, (multitasking), /
.
/ /.
/ /,
/ (/ processor, IOP). /
.
/ /
/ /
/ .

DOS
;
.

. / .
. .
. / .

5.1

5.3

198

E
/.
/
,
.
/,
, /.
/.
/
. /
, /. , /
/.
K

.

. '
. ' ,
/.

. , /
, .
,
-

.

, ,
. ,

.


, , .
.

,
. , / .
. , . ,
, , .

.
.
, ,
.

. /
,
.
,
.

199

200

,
/
. ,
, /.
/,
/
,
/. / .
/, . , .


.

, :



A
B

.1

:
C=

A.1

= -1

:
, 2,
,
, 0 1,
.
1, 2, , 0, 1, 2, 1, 2, ,
0, 1, 2, . ,
, .
(),
, ,

202

. 12 012 .
=2,
8, 10, 16 , , .
.1. ,

, .
.1

, , .

9
A
B
C
D
E
F

203

()
, = 0
= 1, 2, 3, .
. ()
Z() = 12 012 . .
.1 :
C=

= -1


1
2.
A.1
, , .
: 00110010, 10011111, 1110000
: 12765, 763554, 777560
: 987699, 56749, 234561
: FFDAOO45, 0986734, 111111

,
.

,
. ,
.

204

A.1

A.2

, , ,
, : . 00101001, . 12765, . 763554, . 987699, . 90110,
. FF901, . A9909.

;
1. 0110110 .
2. 0110110 .
3. 9763 .
4. 9763 .
5. 8763 .

.2


, .1 .
A.2
(2) = 1001101.1 . ( .1)
:
C(10 ) =

-1

l =6

l2

= 1 26 + 0 25 + 0 2 4 + 1 2 3 + 1 22 + 0 21 + 1 20 + 1 2 -1 = 77.5

A.3
(16) = 24F0 . ( .1)
:

C(10 ) =

16
l=4

= 2 16 4 + A 16 3 + 4 162 + F 161 + 0 160 =

= 2 16 4 + 10 16 3 + 4 162 + 15 161 + 0 160 = 173296


,
, A, B, C, D F 10, 11, 12, 13,
14, 15 .

.
= 12 0
.
12 0, 0 1 = 0, 1, 2,
, 1. (.1),
, :
= (((1 +2) + +2)+ 1) +0
, ,
0
((1 +2) + +2)+ 1 . , 1.

. 12
, ,
(.1), , :
= 1{1 + 1 [2 + 1 ( 3+.)]}.
,
1
1 [2 + 1 ( 3+.)]. ,

. , ,
,
. ,
, .

205

206

A.4
(10)= 59,735
. .
(10) 59, :
1. 0 = 59/2=1
59/2=29
2. 1 = 29/2=1
29/2=14
3. 2 = 14/2=0 14/2=7
4. 3 = 7/2=1 7/2=3
5. 4 = 3/2=1 3/2=1
6. 5 = 1/2=1 1/2=0
59 111011.
(10) 0.735.
6 , 6 .
1. 1 = 20,735 = 1 =0,47
2. 2 = 20,47 = 0 =0,94
3. 3 = 20,94 = 1 =0,88
4. 4 = 20,88 = 1 =0,76
5. 5 = 20,76 = 1 =0,52
6. 6 = 20,52 = 1 =0,04
, 0,735 0.
101111. 0.101111
1.21+0.22 +1.23+1.24+1.25 +1.26 = 0,734375, 0,735.
0,735 6 .
. ,

.
(10), (10)
(2)=111011.101111.
,
. .
, .
,
.
A.5

(2) = 101111000.10011101 (2) = 1110010.1 .
(2) = 101 111 000 . 100 111 010
5

(8) = 570.472.
(2) = 001 110 010 . 100
1

(8) = 162.4.

,

.
A.6

3 .

207

208

(2) = 0001 0111 1000 . 1001 1101


1

(16) = 178.9D.
(2) = 0111 0010 . 1000
7

(16) = 72.8.

A.3

:
. (2) =101111.011,
. (8) = 101127 . (16) = 109AC.D

A.4

:
. (10) = 20.36,
. (16) = DA905.43
. (8) = 7605.42


. ,
, .

.

1.1
,
. 1.1
, .
, . , , .
1.2
. , .
, , .
. .
,
.
, , .
, , .
. .
, . , ,
. ,
,
.
, . , , .
1.3
.
, , , ,

A Y I

210

, .
. , ,
. , 1.2
.
.
.
. .
' ,
.
1.4
.
. :

,
. i ii,
.
2. .
.
. , ,
, , .
, .
1,
1.2.
1.5

, , .

, .

, , ,
. , .
/.
,
/.
1.6
.
. . , , , .
, . , , .
1.7
, , , .
.
, .
, ,
.
1.8
,
Kbytes, Mbytes
Gbytes. ,
: , Kbytes, Mbytes
Gbytes.
, .
, ,

211

A Y I

212


. ,
9 GB 9.663.676.416 , 9 GB
.
1.9
.
. , ' .
, . , , .
. . , ,
,

.
, , . , 1.3.2 .
. :
1. , , .
2. ,
.
3.
, .
4. .
5. .
6. .
7. 1, .

, ,
. ,
1.3.2. ,
.
1.10
. .
, ,

. , .
, RAM ROM, .
, , , .
. (access
time) .

. , ,
,
(cycle time of the memory).

(data transfer rate
bandwidth).
.
, . , ,
.
. ) )
.

213

A Y I

214

:
i.

T RAM , ,
ROM
, .

ii. ,
RAM ,
ROM .
, , , .
. .
, .
' .
ROM, () ' .
. ,
, . , , .
1.11

RAM ROM,
, . , , (
1.4).
, . ,
1.3.
1.12
, ' . .

1.13
. .
. , .
,
, , ' .
, . , , .
1.14
.
, '
.
.
.
( ) . .
1.15
O , ,
.
O ,
.
O / / .
O , / .

215

A Y I

216

1.16
,
MIPS , .
2.1
. :
1. (2) = 101110.00
2. (2) = 101011.01
3. (2) = 11011.010
4. (10) = 97832.001
5. (10) = 105389.09
6. (10) = 5389.0940
. :
1. (22)/2 = 23, (2) = 101110.01.
2. (22)/2 = 23, (2) = 101011.10.
3. (23)/2 = 24, (2) = 101011.010.
4. (103)/2 = 0.0005, (10) = 97832.002.
5. (102)/2 = 0.005, (10) = 105389.10.
6. (104)/2 = 0.00005, (10) = 5389.0940.

, .
, . ,
.
2.2
. (10) = 4 7 2. 0 1
BCD = 0100 0111 0010. 0000 0001.
. (10) = 9 0 2. 3 4
BCD = 1001 0000 0010.0011 0100.

, . , 2.1.1 .
2.3
1. (2) = 10110
1, .
. .
, (10) = +6.
. 1.
(2)
1, (2) = 01001 (10) = 9.
. 2.
(2)
2, (2) = 01010 (10) = 10.
2. (2) = 011110
0 ,
(10) = + 30.
3. (2) = 111011
1, .
. .
, (10) = 27.
. 1.
(2),
1, (2) = 000100 (10) = 4.
. 2.
(2)
2, (2) = 000101 (10) = 5.
, . , ,
.

217

A Y I

218

2.4
. 2.1 2.1 (2) = 01101101, (10)
= 109. ,
, '(10) = 109 127 = 18.
(2) = 1.1, (10) = 120 + 121 = 1.5.
(10) = + 1.5218.
. , ,
.
,
, . , (10) = 1.5218.
. (2) = 10110000, (10) = 176. , , '(10) = 176 127 = 49.
(2) = 1.0, (10) = 120 = 1.
(10) = + 1249.
. , .

754.
2.1.1.
2.5
ASCII ,
, ,
ASCII.
. ASCII R: 1010010, q: 1110001, [: 1011011 %:
0100101
. 928 R: 01010010, q: 01110001, [: 01011011,
%: 00100101, : 11100001, : 11100010, : 11100110 : 11111001.
R, q, [ %,
928

ASCII, .
, . ,
.
2.6
Load A: H , .
Store A: H , .
Add R1, R2, R3: H
, R2 R3 .
AND R1, R2, R3: H
, AND R2 R3, ,
.
JUMP X1: H . .

1.
JUMP X1: H . .
, ,
1. ,
JUMP X1
.

219

A Y I

220

2.7
. /
.
.
.

.
2.8
1 2 .
,
,
, ,
.
3.1
, ,
.
3.2
. = 01011000, = 10100010
1. .
01011000(2)
10100010(2)

11111010(2)
,
.
(10) + (10) = 88 + 162 = 250.

8 28 1=255, 250, 250<255, .


2.
.
01011000(2)
10100010(2)

11111010(2)
(3.2) = 1 2 ,
. .
(10) + (10) = 88 + (94) = 6.
8 27 = 128,
6, .
. = 10010100, = 10011100
1. .
10010100 (2)
10011100 (2)

100110000 (2)
, ,
.
(10) + (10) = 148 + 156 = 304.
8 28 1=255, 304, 304>255, 8 .

221

A Y I

222

2.
.
10010100 (2)
10011100 (2)

100110000 (2)
(3.2) = 1 2,
. ,
.
(10) + (10) = 108 + (100) = 208
8
27 = 128, 208,
.
. = 00001010, = 01111111
1. .
00001010(2)
01111111(2)

10001001(2)
,
.
(10) + (10) = 10 + 127 = 137.
8 28 1=255, 137, 137<255, .
2.
.
00001010(2)
01111111(2)

10001001(2)


(3.2) : = 1 2, . . , .
(10) + (10) = 10 + 127 = 137.
8
27 1 = 127, 137,
.
3.3
64 , 3.6, log2(64) = 6 .

,
. ,
.
30 , ,
30 .
3.4
.
:
. 21 , 21
.
. .

3.7.
3.5
3.3

223

A Y I

224

3.8. 1010 = 00001010(2)


3810 = 00100110(2). 1/2
0000000101111100 = 38010.

3.3

(1/2)=0

1
00000000

1/2
.

00000000

(1/2)=1

+00001010

00100110

1/2
.

00000101

00001001

(1/2)=1

+00001010

00001010
00001001

00000111 10000100

(1/2)=0

00001010

00000011

11000010

(1/2)=0

1/2
.

00001010

00001010
00010011

1/2
.

00010011

00001010

1/2
.

00001010

00001111

00001010

00000001

11100001

(1/2)=1

1/2

7

+00001010

00001010

00001011

11100001

00000101

11110000

(1/2)=0

1/2

8

225

00001010

00000010

11111000

(1/2)=0

1/2

00001010

00000001

3.6
,
. , ,
,
. ,
,
. , , ,
,
.
3.7
,
(clock) ,

.
,
.

01111100

A Y I

226

3.8
:
.
,
.
:


.
3.9
. .
. , .
. .
3.10
2048
100 = 204800 .
,
200 ,
, 100 ,
. 2048 , , 8
.
200 100 + 2048 8 = 36384 .

.

,
,
.

3.11
, . , .
, .
4.1

4.2
. 4.6 -

227

A Y I

228

4.1 AND 2 ,
XOR .

4.6 ,
4.1. 4.6 .
. 4.2 4.5 , . ,

.
4.3
. ' .
.
. .


,
/, . , ,
.
, . , , .
4.4
.
.

229

(loops) .

.
.
i i1.
,
, +1. , 1,
, ,
. 1, 1
, .
.
T =

E T .
i i

i =1


i

i , i=1, 2, .., .
4.5
.
(on demand) (prefetch).
.

. , . ' .

A Y I

230

4.6
, .

.
. , , ,
.

.
.
, , .

,
.
4.7

, 4 ( ) .
3, 4, 6, 8, 9, 12 13 3, 0, 2, 0, 1, 0 1
.
4.8
. 16 , 214 , 4 , 214/22 =
2142 = 212 . 32 , 232 .
232 . ,
8 .

,
232/22 = 230 230/212 = 23012 = 218 .
. 690F8(16) = 0110 1001 0000 1111 1000(2).
4 ,

. =
01 1010 0100 0011 1110(2).

690F8(16)
212. 12 , 0100 0011 1110(2) = 43D.
690F8(16)
43D.
.
960(16)
RWZYX960, W,
Z, Y X 0 F(16), R
0 3.
4.9
, A79233(16) .
4.10
. 64 , 216 4 , 216/22 =
2162 = 214 . 4 ,
214/22 = 2142 = 212 . 32 ,
232 . 2 32 .
, 8 .

, 232/22 = 230
230/212 = 23012

231

A Y I

232

= 218 .
. 960F8(16) = 1001 0110 0000 1111 1000(2).
4 ,

. =
10 0101 1000 0011 1110 (2).
,
960F8(16)
212. 12 , 1000 0011 1110(2) = 83E.
960F8(16)
83E
.
. 212 230
,
60(16) RWZYX060 W, Z, Y
X 0 F(16), R 0
3.
4.11
,
.
4.12
. 210 ,
210 .
. 4 ,
, , ,
.
5.1
H PCI .
O ISA, EISA, EIDE SCSI /.

5.2
. / .
,
.
.
, ( ,
).
, .
.
.

, .
.
.
/ . /
,
.
.
5.3
. Intel 80X86 /. , Motorola 6800
/.
.
.
:
1.
.

233

A Y I

234

2. (
).
3. .
. / .
/,
(multitasking), ,
/.
.1
, , 0 1, 0 7, 0 9 0 15 .
10 15 A, B, C, D, F. , . 00101001 0 1, , , .
. 12765, 1,
.
, . , . 763554
, , . 987699
. 90110 .
FF901 . A9909 .
, . , ,
.
.2
: 1. , 2. , 3. , 4. , 5. .
1.
, . ,

.

.3
. ,
, .2 :
(10) = 1. 25+0 . 24+1. 23+1. 22+1. 21+1. 20+0 . 21+1 . 22+1. 23 = 47,375
.
, .2 :
(10) = 1. 85+0 . 84+1. 83+1. 82+2 . 81+7 . 80 = 33367
. , 16, .2 :
(10) = 1 . 164+0 . 163+9 . 162+. 161+C. 160+D . 161 =
= 1 . 164+0 . 163+9 . 162+10. 161+13. 160+14 . 161 = 68013,875
.4
. .
:
1. 0 = 20/2= 0
20/2=10
2. 1 = 10/2=0 10/2=5
3. 2 = 5/2=1 5/2=2
4. 3 = 2/2=0 2/2=1
5. 4 = 1/2=1 1/2=0
(2) : 10100
(10), 0.36,
. .
:
1. 1 = 2.0,36 = 0 =0,72
2. 2 = 2.0,72 = 1 =0,44
3. 3 = 2.0,44 = 0 =0,88
4. 4 = 2.0,88 = 1 =0,76

235

A Y I

236

: 0101.
(2) = 10100.0101
.
.
(16) = D

5 . 4

(2) = 1101 1010 1001 0000 0101 . 0100 0011


. .
(8) =

5 . 4

(2) = 111 110 000 101 . 100 010

1.1
, ,
, , . 32 SDRAM, , 14000 ,
4 G 45000 . , 4.2 104
1.0 105. , ,
40 .
1.2
.
:
, ,
, .
. ,
, .
, , , , , 1.2.4.
1.3
: < < . (
1.3.4), .
2.1
=+ postfix
:
= ()+ = ( )+ = +
, ,
PUSH,

A Y I

238

. POP
. :
PUSH
PUSH
MULT
PUSH
ADD
POP X
4.1

clk

5.1
.
.
DOS, (singletasking
operating system), / , ;
UNIX Windows, (multitasking),
/ .

/E

(ripple carry
adder)
(carry
lookahead adder)

(secondary memory)
(utility programs)
(machine language)
(stack pointer)

(alphanumeric data)
(diagnostic software)
(Direct Memory
Access, DMA)

(bus grant)

(Immediate
Addressing Mode)

(memory configuration)

(Bus Request)

(floppy disks)

(Bus Busy).


(Binary Coded Decimal, BCD, numbers)

, ,
(Direct Memory Access Request, DMA request)

(interpreters)

(bit)

(performance)

, DRAM

(arithmetic logic
unit)

(exception)

(dedicated buse)
(shared bus)

(Million
Instructions Per Second, MIPS)

(local bus)


(Million FLoatingpoint
OPerations per Second,MFLOPS)

(computer
architecture)

(printer)

(stack based architecture)

(Indirect
Addressing Mode)


(accumulator based architecture)

(unified cache
memory)

(general purpose register


architecture)

(instructions)


(FirstIn/FirstOut, FIFO, policy)

(jump instruction)
(branch instruction)
(call for

A Y I

240

subroutine instruction)
(processor)
(Random Access
Memories, RAM),

(direct mapped
cache memory)

(kway set associative cache memory)
(fully
associative cache memory)


(Content Addressable
Memories, CAM), (associative memories)

(data cache)

(normalized
presentation)

(file cache)

(Distributed
arbitration by selfselection)

(virtual memory)

(exception)
(register)
(index register)
(status register)
(buffer
register)
(on demand)
( direct access )
(Direct
Addressing Mode)
, ( central
processing unit)
(Centralized
Parallel Arbitration)
(cache memory)
(operation code, opcode)

(instruction cache)
(disk cache)

(main memory)

(memory hierarhy)
(Operating system)
(logical addresses)
(logical address
space).
(software)
(system software)
(application software)

(movinghead disks)

(fixedhead disks)
(LeastRecently
Used, LRU, policy).
(translators)
(program counter)
(benchmarks)

/E

(memory)
( Read Only Memory,
ROM )
(floppy disk)
/ (input/output unit)

241

(fixed point
representation)

(signmagnitude representation)

(radix complement representation)

(data path)
, , (Memory
Managment Unit, MMU).

(diminished radix complement


representation).

(fixed point arithmetic unit)


(multitasking)

(floating point arithmetic unit)

(truncation)
(multiprogramming)

(Control Unit)
(library routines)
(CDROM)
(prefetch)

(microprogrammed control unit)
(microprogramming)
(microinstruction)

(handshaking protocol)
(hit rate)
(data transfer rate
bandwidth)

(microprogram)
(scanner)

(microprogrammable control units)
(control memory)

(way loworder interleaving)

(serial access)
(acknowledge)
(request)
(interrupt)

(shifter)

(hard disk)

(Integrated Circuit, IC)


(replacement policy)

(tracks)
(floating point
representation)

(rounding)
1 (1s complement)

A Y I

242

2 (2s complement)
(coprocessor)
(system configuration)

(Reduced
Instruction Set Computers, RISC)

(Complex Instruction Set Computers, CISC)

(instruction set)

(highorder
interleaving)

(CPU clock
rate)

(seek time)

(roundoff errors)

(latency time rotational


delay)

(relative
addressing mode)

(execution time)

(write through
store through)
(update policy)

(nowrite allocate write around).
(write
allocate fetch on write)
(fetch
policy)
(write back copy
back store in)
(principle of locality)

(placement policy)
(addressing
modes)
(Random policy)
(overflow)
(hardware)
(implementation)

(CPU cycle time)


(cycle time of the
memory)
(access time)
(byte)

243

, . . , . . ,
, , 1987.
8
, 9
/.
A. J. van de Goor, Computer Architecture and Design, Addison Wesley,
1989.
, .
.
D. A. Patterson, J. L. Hennessy, Computer Organization & Design, The
Hardware/ Software Interface, Morgan Kaufmann, 1994.
.
.
J. L. Hennessy, D. A. Patterson, Computer Architecture, a Quantitative
Approach, second edition, Morgan Kaufmann, 1996.
. D, ,

Intel 80286, 80386, 80486 Pentium.
J. P. Hayes, Computer Architecture and Organization, McGrawHill, Third
edition, 1998.

.
, .
,
.
AMD: www.amd.com
ARM : www.arm.com
Digital: www.digital.com
HewlettPackard: www.hp.com

K 1

A Y I

244

IBM: www.chips.ibm.com
Intel: www.intel.com
Motorola: www.mot.com/SPS/General
Texas Instruments: www.ti.com
Siemens Semiconductor: www.sci.siemens.com
Philips: www.semiconductors.philips.com

K 2

D.A. Patterson, J. L. Hennessy, Computer Organization & Design, The


Hardware/Software Interface, Morgan Kaufmann, 1994.
4 .
I. Koren, Computer Arithmetic Algorithms, Prentice Hall, Englewood
Cliffs, New Jersey, 1993.
1 2
.
J. P. Hayes, Computer Architecture and Organization, second ed.,
McGraw Hill, 1998.
3
.

K 3

A. Patterson, J. L. Hennessy, Computer Organization & Design, The


Hardware/ Software Interface, Morgan Kaufmann, 1994
.
J. P. Hayes, Computer Architecture and Organization, McGrawHill, Third
edition, 1998.
4 5
.

D. A. Patterson, J. L. Hennessy, Computer Organization & Design, The


Hardware/ Software Interface, Morgan Kaufmann, 1994

245

K 4

J. P. Hayes, Computer Architecture and Organization, McGrawHill, Third


edition, 1998.
B. Prince, High Performance Memories, John Wiley & Sons, 1998.

D. A. Patterson, J. L. Hennessy, Computer Organization & Design, The


Hardware/ Software Interface, Morgan Kaufmann, 1994

K 5

J. P. Hayes, Computer Architecture and Organization, McGrawHill, Third


edition, 1998.
D. B. Gustavson, Computer BusesA Tutorial, IEEE Micro, August
1984, pp. 722.
G. White, A Bus Tour, Byte, September 1989, pp. 296302.

. ,
EIDE SCSI http://www.lionsgate.com/home/baden/public
html_index/SCSI/EIDE_versus_SCSI.html

I. Koren, Computer Arithmetic Algorithms, Prentice Hall, Englewood


Cliffs, New Jersey, 1993.
1.3 ,

.
M. M. Mano, , , 1992.
.

You might also like