当前位置:天才代写 > 考试助攻 > 英国Midterm代考价格 计算机系统组织代写

英国Midterm代考价格 计算机系统组织代写

2023-06-20 16:57 星期二 所属: 考试助攻 浏览:279

英国Midterm代考价格

CSCI-UA.0201-001

Computer Systems Organization

Midterm Exam Fall 2016 (time: 60 minutes)

英国Midterm代考价格 In C, like in many other languages, we need to declare a variable before we can use it.For instance, we have to declare int x;

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.(5 points) Circle the correct answer among the choices given.  英国Midterm代考价格

If you circle more than one answer, you will lose the grade of the corresponding question.

(A) The assembler is:

  1. machine dependent
  2. language dependent
  3. both
  4. none

(B) The following number: 0x1F000001 can be interpreted as:

  1. signed int
  2. unsigned int
  3. single precision floating point
  4. all of them

(C) The instruction leal (%eax), %ebx accesses the memory:    英国Midterm代考价格

  1. once
  2. twice
  3. 0 times
  4. depends on whether 32-bit or 64-bit

(D) Regarding instruction set architecture, backward compatibility means

  1. executing old instructions on new hardware
  2. executing new instructions on old hardware
  3. both 1 and 2
  4. none of the above

(E) Which of the following pointers has a larger size (in terms of bytes)?

  1. pointer in a 32-bit machine
  2. pointer in a 64-bit machine
  3. pointer in a 32-bit machine pointing to an array of 100 integers

2.(2 points) assign a value to x and a value to y (you can specify them in binary) such that    英国Midterm代考价格

a.(x && y) is evaluated to true and (x & y) is evaluated to false

b.How about the other way around?

3.[2 points] In C, like in many other languages, we need to declare a variable before we can use it.For instance, we have to declare int x; before we can use x. Why is that (state two reasons)?

英国Midterm代考价格
英国Midterm代考价格

4.[2 points] Suppose we have the following decimal number: -10

a) Write that number in an 8-bit binary number. To get full credit, show all the steps.

b) Translate the number you calculated in a) above to hexadecimal.

5.[2 points] Suppose x is an integer. We want to test whether the two most significant bits of x are 1 or not (i.e. the two left most bits), so we wrote the C expression:

if( …. )

{ tests successful and the two bits are 1 }

else

{means at least one bit of the two most significant bits is 1}

What will you put between the parenthesizes in order to test that condition?

6.Suppose that we have the following number: 0xAA   英国Midterm代考价格

a) [1 point] Write this number in binary:

b) [2 points] Suppose that this number is interpreted as unsigned number, what is the decimal equivalent (note: you don’t have to write a final decimal number, you can leave it in the format of 2x +2y + …). To get full score, show all the steps.

c) [2 points] Suppose that this number is interpreted as signed number, what is the decimal equivalent (note: you don’t have to write a final decimal number, you can leave it in the format of 2x +2y + …). To get full score, show all the steps.

7. [2 points] Suppose “a” is a pointer to unsigned integer(i.e. it was declared as unsigned int * a; ) and points to the following array of unsigned integers:

{1,1,2,2,3}.

How many times the body of the following loop will be executed? Justify

while( (*a++) & 0x1 ) { …. loop body …. }

 

英国Midterm代考价格
英国Midterm代考价格

更多代写:新加坡金融网课托管  考试助考  英国Course代写  艺术类Essay代写范文  医药学论文代写  计量经济学考试代写

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

 

天才代写-代写联系方式