Full Name:
Student ID:
UW CSE 351, Winter 2013
Midterm Exam
February 15, 2013
Instructions:
Make sure that your exam is not missing any of the 9 pages, then write your full name and UW student
ID on the front.
Read over the entire exam before starting t
CSE351 Autumn 2013 Midterm Exam (30 Oct 2013)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and, hopefully, this estimate will prove to be reasonable.
There are 6 problems for a total of
CSE351 Spring 2014 Midterm Exam (5 May 2014)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and, hopefully, this estimate will prove to be reasonable.
There are 5 problems for a total of 9
University of Washington Computer Science & Engineering
Autumn 2016
Instructor: Justin Hsia
2016-11-02
Last Name:
Perfect
First Name:
Perry
Student ID Number:
Section you attend (circle):
Name of person to your Left | Right
1234567
Chris
Yufang
John
Kevin
(D) If we use the main ftmction shown below, answer the following for the execution of the
entire program: [4 pt]
void main () cfw_
printf(result = 0\n,fact(4) ) ;
Total 'ames Maximum stack
created: 6 frame depth: 5
main -> fact(4) > fact(3) > fact(2) >
SID: 1234567
Grading Notes for Question 3:
Line 1: must be dereference, must be 64-bit register name, p is first argument (%rdi).
Line 2: any width specier accepted as long as register names match
(testq/%rax, testl/%eax, testw/%ax).
Also accepted compq
Question 1: Computer Architecture Design [8 pts]
Answer the following questions in the boxes provided with a single sentence fragment.
Please try to write as legibly as possible.
(A) Why cant we upgrade to more registers like we can with memory? [2 pt]
Re
SID: 1234567
Question 2: Number Representation [12 pts]
(A) What is the value of the char 0b 1101 1010 in decimal? [1 pt]
If x = OxDA, x = 0x26 = 25+6 = 38
Also accepted unsigned: OxDA = 16*13+10 = 218 '38 r 218
(B) What is the value of char: 2 = (OxB < 6
Question 4: Pointers & Memory [12 pts]
For this problem we are using a 64-bit x86-64 machine (little endian). The initial state of
memory (values in hex) is shown below:
Word
Add: +0 +1 +2 +3 +4 +5 +6 +7
mun-m
mam-Inna
cm, cp = mun-mammal
SP = mun-m
unsig
CSE351 Autumn 2013 Midterm Exam (30 Oct 2013)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and, hopefully, this estimate will prove to be reasonable.
There are 6 problems for a total of
CSE351 Spring 2014 Midterm Exam (5 May 2014)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and, hopefully, this estimate will prove to be reasonable.
There are 5 problems for a total of 9
Full Name:
Student ID:
UW CSE 351, Winter 2013
Midterm Exam
February 15, 2013
Instructions:
Make sure that your exam is not missing any of the 9 pages, then write your full name and UW student
ID on the front.
Read over the entire exam before starting t
CSE351 Autumn 2010 Midterm Exam (29 Oct. 2010)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and, hopefully, this estimate will prove to be reasonable.
There are 3 problems worth a total
Name
Student ID
UW CSE 351, Summer 2013
Midterm Exam
Instructions:
Make sure that your exam is not missing any of the 10 pages, then write your full name and
UW student ID on the front.
Read over the entire exam before starting to work on the problems!
Name
Student ID
UW CSE 351, Summer 2013
Midterm Exam
Instructions:
Make sure that your exam is not missing any of the 12 pages, then write your full name and
UW student ID on the front.
Read over the entire exam before starting to work on the problems!
CSE351 Autumn 2012 Midterm Exam (5 Nov 2012)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and, hopefully, this estimate will prove to be reasonable.
There are 4 problems for a total of 1
CSE351 Autumn 2010 Midterm Exam (29 Oct. 2010)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and, hopefully, this estimate will prove to be reasonable.
There are 3 problems worth a total
CSE351 Spring 2012 Midterm Exam (30 April 2012)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and, hopefully, this estimate will prove to be reasonable.
There are 3 problems for a total o
CSE351 Spring 2012 Midterm Exam (30 April 2012)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and, hopefully, this estimate will prove to be reasonable.
There are 3 problems for a total o
CSE351 Autumn 2012 Midterm Exam (5 Nov 2012)
Please read through the entire examination first! We designed this exam so that it can be
completed in 50 minutes and, hopefully, this estimate will prove to be reasonable.
There are 4 problems for a total of 1
Question 3: C & Assembly [11 pts]
We are writing the function toLower, which takes a char pointer and converts a string of
letters (assume only letters and spaces) to lowercase, leaving spaces as spaces. Example: If the
pointer p points to TeST oNe, then