北京航空航天大学
2015-2016 学年 第一学期期末
《计算机组成与体系结构》
考 试 试 卷
班 级 学 号
姓 名 成 绩
2016 年 1 月 12 日
北京航空航天大学 2015-2016 学年 第一学期 《计算机组成与体系结构》期末考试
学号 姓名
答题页 1
注意:答案全部填写在答题页中,其它地方无效
Problem 1.(20 points)
1 2 3
4
5
6 7 8
9
10
Problem 2.(12 points)
Format A
Format B
Bits
Value
Bits
Value
010 1110
110 1111
000 0001
16
Problem 3.(10 points) A:x =
B:string "0123456789" is stored at
C: buf[0] = 0x buf[1] = 0x buf[4] = 0x buf[5] = 0x _
D:Value at %esp is
E:
Problem 4.(10 points)
M = N =
学号 姓名
答题页 2
Problem 5.(10 points)
A1
A2
A3
A4
A5
Problem 6.(6 points)
A
B
Problem 7.(10 points)
a= , b= , c= , a= , c=
Problem 8.(10 points)(fill in Y or N)
A B C D E
Problem 9.(12 points)
Read from virtual address 0x7bcd8001:
Physical address of PDE:
Physical address of PTE:
The physical address accessed is
Read from virtual address 0x04002abc:
Physical address of PDE:
Physical address of PTE:
The physical address accessed is
Problem 1. (20 points)
Consider the following code, what is the output of the printf?
int x = 0x152F2F10 >> 12;
char y = (char) x;
unsigned char z = (unsigned char) x; printf("%d, %u", y, z);
(a) -241, 15
(b) -15, 241
(c) -12, 244
(d) -14, 242
In two’s compliment, what is TMax +1?
(a) TMin(b) TMax
(c) 0(d) ?1
Let int x = ?17/4 and int y = ?17 >> 2. What are the values of x and y? (a) x = ?5, y = ?5
(b) x = ?4, y = ?4 (c) x = ?5, y = ?4
(d) x = ?4, y = ?5
In C, which one is true? (a) 10000U > ?1
(b) for double d,d * d >= 0
for int x,x * x >= 0
for int x,x == (int) (float) x
By default, on Intel x86, the stack
(a) Is located at the bottom of memory
(b) Grows down towards smaller addresses
Grows up towards larger addresses
Is located in the heap
Intel x86-64 systems are
(a) Little endian
Big endian
Have no endianess
Depend on the operating system
Select the two’s complement negation of the following binary value: (a)(b) (c)