My office hours: 2:00PM Monday and Friday and 4:00pm on Wednesday or
TA hours: Sunday 4:00pm – 6:00pm and Weds 7:00pm-9:00pm in Williams 303.
The TA is Joe Cleveland.
Class Server URL: comp210.eastus.cloudapp.azure.com
- Exam 1: 19 March (evening exam)
- Thursday, 18 April, in class.
- Final: Tuesday, 7 May, 10:30AM (scheduled final period)
The clear consensus was to have a second exam (in addition to the final).
Exam 2 will take place on Thursday, 18 April, in class. Exam topics are posted.
Announcements for the week of Feb 25:
- No class on Wednesday (Feb 27); I have to leave early Wednesday afternoon for a conference.
- I’m putting the exam off until after break. This will give us time to fully cover the material on the exam. The exam will be on Tuesday, 19 March, in the evening. There will be a sliding window for taking the exam. We’ll talk about the timing of the exam next week.
- Joe will have the lab sheets for you on Thursday, 28 Feb. You may work in groups (see the handout for your group assignment), but every person must turn in their own solution on the server.
- Ali will be presenting some new material on Friday, 29 Feb. There will be a question on the exam from this material and I will not be covering it in any other class. So don’t miss the class!
- The practicum will still be due on the Wednesday after break. So you will now have two big items the week after break, the exam and the practicum. The practicum is complicated, so I highly recommend that you get it mostly done before break.
- Note about the Practicum 2 writeup. For phase 4 I want the
pseudo-code for the recursive function, not for phase 4.
- Practicum 2: what is "%fs:0x28"? This is a reference to the way that
the intel machine language adresses memory, something that we have not (and
will not) talk about in class. If you're interested, see this article:
organization. You can safely ignore this instruction when you see it, but
the larger lesson is that you have to deal with some uncertainty when working
with the bomb. You won't know everything, but you have to use what you do
know to figure out what is happening.
- Lab 7: why is the instruction "sar 0x3f, %rdx" there?
Integer division always rounds it’s result by rounding towards 0. So if we do 5 the result is 2.5 which is rounded to 2. This is the same result
that we get if we shift 0101 to the right one position, i.e., 0010. If we do −5, however, the 3
result is −2.5 which should round toward 0, i.e., to −2. The 2’s complement version of −5 however is 1011. If we shift it right we get 1101 or −3 not −2. To fix this, we can add one before we shift, i.e., −5 + 1 = −4 or 1100. When we shift this right we get 1110 or −2, the correct answer.
How can we do this without an if statement to test whether the number is positive or negative? If a 2’s complement number is positive, the sign bit is 0. If the 2’s complement number is negative it’s sign bit is 1. So we shift the sign bit all the way to bit position 0 (63 bits if we have a 64 bit number). If the number is negative, it results in the value ”1”; if the number if positive it results in the value ”0”. We then add this to the number that we are to divide, i.e., we add ”1” to a negative number and ”0” to a positive number. Then when we shift right, the number will be rounded in the correct way.
- Problem set 2: it's ok to use the time.h
library to convert seconds into a date formate. Check out the strftime
function in particular.
Exam 2 is on Thursday, 18 April during the lab period.
Practicum 2 (the "bomb") is due at the beginning of class on Wednesday,
Past Assignments »
Problem Set 4 is due on Monday, 25 Feb at the beginning of class.
Practicum 1 is due on Friday, 22 Feb at the beginning of class.
Problem Set 3 is due on Monday, 18 Feb at the beginning of class.
Problem Set 2 is due on Monday, 18 Feb at the beginning of class.
Problem Set 1 is due on Monday, 18 Feb at the beginning of class.
Thursday, 23 January, read the Unix tutorial Intro, tutorial 1, tutorial 2.
No quiz on Monday, 28 January
Problem Set 1
is due on Monday, 28 Jan at the beginning of class.