汇编语言与计算机系统组成 _李心广_课后答案[1-8章]
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
+[-My]
+[My]
+[-My]
00011010 11000100 11011110 10111100 00111100 11111000 11110000 00111100 00101100 01011000 11000100 00011100 00111000 11000100 11111100 11111000 00111100 00110100 01101000 1 1 0 00 1 0 0 0 0 1 0 1 10 0
1 PC MDR
PC M[MAR] IR
IR A C
R2OUT CPA R3OUT SUB CPC COUT CPR2 SUB R2 R3
PC +1 C MDR
1 PC MDR
PC M[MAR] IR R3
IR C
R2OUT1 R3OUT2 SUB CPC COUT CP2R2 SUB R2 R3
3 27 SUB R2 R3 1 2 3 4 PC MAR PC +1 PC PCOUT3 CPMAR EMAR RD +1 CP1PC SMDR MDROUT3 R2 CP1IR R2 R2 R3 MAR PC PC MDR IR
74181
ALU
74181
4 ALU
2 3
74182
2 4
2 4 G0 G3 4 16 P0 P3 ALU 16 74181 G 64 P Cn ALU 2 5 74182 74181 74182 74181 Cn+z P G Cn+y Cn+x
74181
ALU
74182
74181 Pi 3 74181
1
, 0
Ci
1
2.3(b) ,4 0 6,
Si
Ci+1 = 1 Ci+1 = 0
Si = Si+0011 Ci+1 Si = Si+1101
26.
74181
74182
16
1 74181 2 13 74181 ALU 2 74181
ALU ALU 4 4 64 74181 Cn+4 ALU Pi ALU 4 ALU 16 ALU Gi 74181 ALU 74181 4 16 4 2 19 74181 74181 ALU 16
CPU
ALU ALU 5 3 2 SUB R2 R3 R2 3 25 3 25 SUB R2 R3 1 2 3 4 5 6 6 PC C MDR R2 A C A R3 R2 3 3 SUB R2 R3 R2 3 26 3 26 1 2 3 4 5 7 PC C MDR R2 C R2 3 4 SUB R2 R3 R2 3 27 R3 R2 MAR SUB R2 R3 PCOUT1 CPMAR EMAR RD +1 CPC COUT CP2PC SMDR MDROUT1 C CP1IR R2 C R3 R2 MAR C PC R3 R2 C MAR PC +1 C MDR PCOUT CPMAR EMAR RD +1 C=B CPC COUT CPPC SMDR MDROUT CPIR R2 A C R3 R2 MAR C PC R3 R2 SUB R2 R3
(3) IR(Instruction Register) (4)CU(Control Unit) (5)ALU(Arithmetic Logic Unit) (6)ACC(Accumulator) (7)MQ(Multiplier-Quotient Register) (8)X / (9)MAR(Memory Adress ress Register) (10)MDR(Memory Data Register) (11)I/O(Input/Output tput equipment) (13)CPI(Cycle Per Instruction) (14)FLOPS(Floating Piont Operation Per Second) 9 10 (1945-1956) 1944 I . (1900-1973) 500 Mark (3-5 / (12)MIPS(Million Instruction Per Second)
9 6 , 4 BCD S'i ,
i
, ,
, , 9 BCD , 4
i
BCD , , 4 Ci<10 ,
, 6 , ,C'i
1
, Si ,Ci 1 S'i Xi Yi Ci 10 , Si S'i 6 , C'i 1 1 S'i 10 , :Ci 1 1 6;Ci S'i, S'i Si
1
Ci 0
1
[x] [y]
= =
0 0. 1 0 1 1 1 +1 1. .00101 1 1. 1 1 1 0 0
[x] [y]
= =
0 0. 1 1 0 1 1 +0 0. 1 0 0 1 1 0 1. 0 1 1 1 0
X=1001
Y=1101
B
1001
A
0000 0000
C 1101 1101 C0=1
0 0110101 0 0110101
10 1110100
A A
115 , B 24 , A 0 1110011 , B A A A B B 0 1110011 , B 0 1 0 1 101 1 1 0001011
B 0011000 1 001100 0 1101000 11 101000 000
1
,,, 2
,
1.
2.
3.
4.
5.
3
4 2
5 · · . · ENIAC 14 1944 1 10 1 ENIAC · " · EDVAC EDVAC 1 2 1946 7 8 IAS " " · EDVAC ENIAC 1945 "--EDVAC Electronic Discrete Variable AutomaticCompUter ENIAC ENIAC " ENIAC 2 " 1946 ENIAC 2 John Von Nouma 1903 1957 1903 12 28
x y
0.11000,
0.00111 * 2
5
0
0.0
0.01 0 01
x y
0.01110 0, ,
0.10111 * 2
5
Mx*My
0. 1 1 0 1 0.1 0 0 1 01101 00000 00000 01101 00000 001110101 *
+[-My]
+[My]
+[My]
+[-My]
4
k
3
M ( x) x 3 G ( x)
CRC
110 1001000 1010 1011 1011
1001000 110
1001110
39
3
1 CPU CPU CPU
CPU 2 CPU CPU
ALU
CU
CPU
CPU CPU CPU
CPU CPU CPU CPU 3 — PC PC IR 4 CPU CPU PC IR — PC IR PC
1
M[MAR] MDR R2
MDR IR R3
R2OUT2 R3OUT3 ADD PC1R1 3 8 0 C2
8
3 7
9 31 27 26 22 21 17 16 OP ra rb LOAD STORE LOADA ADDI ANDI 31 27 26 22 21 OP ra C1 LOADR STORER LOADR 31 27 26 22 21 17 16 12 11 OP ra rc NEG NOT 31 27 26 22 21 17 16 12 11 OP rb rc BRxx 31 27 26 22 21 17 16 12 11 OP ra rb rc BRLxx 31 27 26 22 21 17 16 12 11 OP ra rb rc ADD SUB AND OR 31 27 26 22 21 17 16 OP ra rb SHR SHRA SHL ROL 31 27 26 22 21 17 16 12 11 OP ra rb rc ROL C3=0 SHR SHRA SHL 31 27 26 OP NOP 9 3 3 1 STOP 5 4 C3 C3 0 5 4 C3
(1964-1971) 1958 (IC)
(197180 “
) (LSI) (VLSI) ” 2,300 “ ” ? (Gordon Moore) IT 40 1965 4 19 ” 60,000 “ ULSI
“ 11 1965
”
“ ? ? 18
...”
12
5
1.
8
1
13 64
29 100 128
1.0110100 1.1001100
A B 1.0100010
A 19 32 17 128 A B
A A B A A
, B 0 . 10011 00, 0 . 10011 11 00, B 0 . 001 000 0 001 B B 0. 1 10 11 0 1 0.110 1101
1 . 0 01000 1 1 . 11 0111 1
"
·
" "
-" " · " 1947 · · · "
‘
· · 1956 1958 1961 1937
6 7 CPU 8 CPU PC IR 1 2 CU ALU ACC MQ X MAR MDR I/O MIPS CPI FLOPS CPU Central Processing Unit PC(Program Counter)
0
0.0
0.01
0.011
0.0110 0110
0.01101 0
0.01101 0
Ci
Ai Bi Ai Bi Ai Bi ( Ai ( Ai
Ai C i
1
Bi C i
1 1
1
Bi )C i Bi )C i
25. 1 3
3
E3 E2 E1 E0 S3S2S1S0 2 9 9 , ,
i i
3BCD
8421BCD
) 1946 Computer) 70 ENIAC (1956-1963) 1948 1956 000 2 14 ENIAC ENIAC 5 160 Mark I 18 000 1000 ENIAC(The Electronic Numerical Integrator And
1960 : COBOL(Common Business-Oriented Language) FORTRAN(Formula Translator)
M ( x) x 4 G ( x)
1101100 28.
1100000 11011
CRC
100
1100 11011
(7,4) M(x) 1001 x
3
G x 1 n G x
x3 x+1 +1 1 4 G 2 2
1001 x x3 x+1= x+1=1011 x+1 k 1 3 6 M(x) x) x 1001000 x x3 M x x3 R x
8.
[x] [y]
= =
0 0. 1 1 0 1 1 +0 0. 1 1 1 1 1 0 1. 1 1 0 1 0
[x] [y]
= =
0 0. 1 0 1 1 1 +1 1. 0 0 1 0 1 1 1. 1 1 1 0 0
[x] [y]
= =
0 0. 1 1 0 1 1 +0 0. 1 0 0 1 1 0 1. 0 1 1 1 0
+
0011011 0000011 0011110
[x] [y]
= =
0011011 +1 1 0 1 0 1 1 0000110
[x] [y]
= =
1101010 +1 1 1 1 1 1 1 1101001
[x] [y]
= =
0 0. 1 1 0 1 1 +0 0. 1 1 1 1 1 0 1. 1 1 0 1 0
A A A A A
A A A B A
3 9 ,B , A 16 32 1.0011000, B 1.1101000, B B 0.0 00 1 1 00
B
B 0. 0 100100 0.01 00100
B
0.0 00 1 1 00
87 , B 53 , A 1 1010111 , B 1 0101001 , B 1 1001011 B
1 0 1 0 0 0 0
1 0 1 0 0 0
0 1 1 0 0 1 0 1 1 0 0 0
1 1 0 1 1 1 1 0 1 1
(0) 0 0 0 0 0 1 (0) (0) (0) (0) (1) 1 0 0 (1) (1) 0 0 0 1 0 1 0 1 10 1 0 0 0 1 0 1
0.110
1
+B
1001 1001
1 2 +0
0100 0000 0100
1110 C0=0
2 3 +B
0010 1001 1011
0111 C0=1
3 4 +B
0101 1001 1110
1011 C0=1
4
0111
0101
(0) 0 (1) 0 (1) 1, 0
(0) (1) (0) (0) 0 (0) 0 0 (0) 0 0 0 0 0 0 0 (1) (0) (1) (1) (1) (0) (1) (1) 0 1 0 1,
13 64 29 128 100
3.
X.
4 16
7 16 14 16
4.
9B
FF
5.
6.
7. 1 A
8
1
9 64
13 32
A
B
2
A
19 32
17 128
A B
3
A
3 ,B 16
87 , B
115 , B
13 32
9ຫໍສະໝຸດ Baidu, 32
53 , A
A
B
A
B
4 A 5 A
24 ,
B
9 64
A B
A A
0.0010010 ,B 0.0010010 ,B 1.1011110 A B
C4
Gi 74182 74182 C8 C12 3 16 ALU
2
2 5
27. (7,4)
110 M(x) 110 x2 G x x n G x
G x 11011 3 x x+1 1001 3 G x 11011 x4 2 2 M(x) x4 M
x3+x+1
k
1
5
k
4 1100000 x6 x5 x x4 R x 1100000 1100