当前位置:天才代写 > CS代写,CS作业代写考试代考-价格便宜有靠谱 > 计算机代考 Computer Systems Organization代写

计算机代考 Computer Systems Organization代写

2023-06-24 15:34 星期六 所属: CS代写,CS作业代写考试代考-价格便宜有靠谱 浏览:429

计算机代考

CSCI-UA.0201-003

Computer Systems Organization

Midterm Exam Fall 2015 (time: 60 minutes)

计算机代考 Which of the following expressions generate correct mask? Circle ALL correct answers. There may be more than one correct answer, or there may be none!

Notes:

  • If you perceive any ambiguity in any of the questions, state your assumptions clearly.
  • Questions vary in difficulty; it is strongly recommended that you do not spend too much time on any one question.

1.[2 points] What would have happened if we didn’t have linkers? State 2 consequences.  计算机代考

2.[5 points] Fill in the blanks in the following table, assume the instructions are executed sequentially (i.e. instruction 1 executed, then instruction 2, then instruction 3. Assume rax and rbx are holding signed numbers.

3.[5 points] For the following assembly code and its corresponding C code, fill-in the blanks in the C code assuming x will go into %rbx and y will go into %rax;

4.[2 points] Can the carry flag (CF) and the overflow flag (OF) be both 1 at the same time? If yes, give an example of an operation that does this (no need for assembly code, just describe the operation). If not, explain why not.

计算机代考
计算机代考

5.[2 points] State two reasons for why do we need an assembler and not making the compiler generate the binary presentation right away.  计算机代考

6.Suppose x is an integer (i.e. 4 bytes). We want to test whether the most significant bit of x is 1 or not (i.e. the left most bit), so we wrote the expression:

if( (x & mask) != 0)

a.[1 point] What is the value of mask, both in binary and hexadecimal?

b.[2 points] Which of the following expressions generate correct mask? Circle ALL correct answers. There may be more than one correct answer, or there may be none!

  • 0x1FFFFFFF << 3
  • 0x1FFFFFFF << 2
  • two’s complement of 0xFFFFFFFC
  • two’s complement of (-2)

c.[1 point] Please give the expression that sets the most significant bit of x to 1 and leave all the other bits unchanged.

 

计算机代考
计算机代考

更多代写:温哥华代考  proctoru代考  微积分网课托管推荐  项目管理学essay代写  商业论文写作  英国Midterm代考价格

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

 

天才代写-代写联系方式