Use this study guide to prepare for the midterm exam. Feel free to post
and reply to questions on piazza.
- Be sure to read up on the Exam Rules
- Know two's complement. That phrase is used in two ways:
- As a representation:
In 4-bit two's complement representation, the integer -3 is represented as
1101.
- As an operation:
The two's complement of the bit pattern 1010 is
0110. Do you see why?
To do well on the exam, you must be comfortable with both uses of the term.
- Be able to show the representation of an integer value using
two's complement in a specified number of bits.
- Be able to take the two's complement of a bit pattern.
- Understand why two's complement is a useful way to represent integers.
- Understand how bytes can also represent other things:
- Color components, as in the RGB model
- Characters, as in the ASCII encoding
- What does the leftmost bit mean in two's complement?
- Know the idea of software development using Model View Controller
(MVC)
- How do you determine what goes into the model as compared to a view?
- Why is the MVC paradigm useful?
- What is PropertyChangeSupport and how does it support MVC?
- What are Threads and why do we use them?
- How do you start a Thread and what does it run?
- How do you wait for a Thread to be finished?
- What is a race condition?
- Give an example of a good race condition.
- Give an an example of a bad race condition.
- What is mutual exclusion?
- When do you use mutual exclusion?
- How do you implement mutual exclusion in Java?
- What is deadlock?
- How can deadlock be avoided? (Think of at least two ways of doing this)
- How can The Dining Philosophers Problem be solved without a dictator?
- What is a guarded block? Know the two sides to implementing
guarded blocks:
- The side that waits
- The side that notifiesAll
- Know how to make a sequence of statements appear to execute atomically.
Last modified 16:09:23 CST 22 February 2015
by Ron K. Cytron