Midterm #2 -- open book section

12 April, 1994

The entire exam is to be turned in at 2:55 PM. Work the closed book section first and turn it in before you consult your books and notes to work on the open book section. You'll need to use your own paper for many of the answers.

Problem 1. (6 points)

What are the largest and the smallest integers that can be represented as eight-bit signed-2's complement binary numbers?

Problem 2. (12 points)

Show how the two six-bit signed-2's complement numbers, 011001 and 000111, are multiplied using the Booth multiplication algorithm.

Problem 3. (12 points)

Although it is possible to encode the integers from 0 to 999,999,999 in 30 binary digits, there are some integers within this range that can not be represented exactly by a 32-bit floating point number. Why? Give an example of one of these unrepresentable integers.

Problem 4. (6 points)

An ordinary shifter only shifts one position in a clock cycle, while a barrel shifter can shift several positions in one clock cycle. Why is a barrel shifter useful in a high performance floating point unit?

Problem 5. (10 points)

How does a C programmer access a device through memory-mapped I/O? How does a C programmer access a device through isolated, or programmed, I/O?

Problem 6. (12 points)

Most likely, the CPU communicates with its interface units with strobe transfers while the interface units communicate with their I/O devices with handshaking. Give at least two reasons why these different methods are used for similar tasks.

Problem 7. (6 points)

Draw a diagram similar to Figure 11-7 on page 397 of the textbook that shows how the seven-bit value 0110011 is transmitted through a serial line using even parity and two start bits.

Problem 8. (6 points)

How is the 40 bit pattern 0011111111100010101011111111111100001011 really transmitted with HDLC?