CS211 (COMPUTER ARCHITECTURE) Midterm Exam
Rutgers University
Fall 2011
Instructor: Abhishek Bhattacharjee
Total Time: 90 minutes
Name: ___________________________________________
Question
Score
1
/10
2
/10
3
/30
4
/25
5
/25
Total
/100
This exam is closed-book, closed-notes.
Calculators are ok. Laptops, smartphones or palmtop computers are not allowed.
Show your work clearly in the spaces provided in order to get full or partial credit. Please do not
be excessively verbose, it will only obfuscate your response.
If you are unclear on the
wording/assumptions of a problem, please state your assumptions explicitly and work it through.

1.
Please provide
short
answers to the following (10 points):
a)
What is a Von Neumann machine? (4 points)
Answer: The von Neumann machine is a conceptual design model for a digital computer that uses
a central processing unit (CPU) capable of executing a certain set of instructions and a single
separate storage structure (”memory”) to hold both instructions (that make up programs) and
data.
b)
State Moore’s Law in a sentence. (3 points)
Answer: The number of transistors that can be placed inexpensively on an integrated circuit
doubles approximately every 18 months.
c)
Name two other metrics that are important to computer architects other than performance? (3
points)
Answer: Power consumption; Cost

2.
Pointers and C (10 points)
a)
Assume that the following declarations have been made:
char c = ‘A’;
char *p = &c;
char **p2 = &p;
void *v = &p2;
Examine each of the following expressions. If the expression is illegal, write ILLEGAL. If the
expression is legal, write its type (ie. int, void *, etc.)
(5 points)
•
&p2:
char***
•
*p2:
char*
•
&v:
char****
•
p2 + 1:
char**
•
v[0]:
Illegal
b)
What does the function malloc() do? (3 points)
Answer: malloc() allocates the given number of bytes in Heap and returns a pointer
to the beginning of the allocated memory.
