CSE 378, Autumn 1997 | Assignment #3 | Due: Monday, Oct 27th, 1997 |
You'll hand in this assignment on paper. However, we request that you use your favorite word processor, as hand-written assignments are difficult to read. Please put the section name (AA or AB) on your assignment, along with your name.
1. Convert the following decimal numbers to
32-bit 2's complement binary numbers, and then to hexadecimal.
a) 33,622
b) -316
c) -4
d) -3,773,889
2. Convert the following 32-bit 2's complement
binary numbers to hex, and then to decimal.
a) 1111 1111 1111 1111 1011 1011 1101 0100
b) 1111 1111 1111 1111 1100 1111 0011 1101
c) 0111 1111 1111 1111 1000 0000 0111 0010
3. Convert the following 32-bit 2's complement
hexadecimal numbers to binary numbers, and then to decimal. Finally,
show the hexadecimal representation of the negation of these numbers.
a) afe9
b) ffff fffe
c) 8000 0000
4. Add the following 32-bit 2's complement
numbers using signed addition. If the addition generates an
overflow exception, please say so.
a) 1111 1110 1111 1111 1111 1010 1010 1101
0110 1111 1111 1010 1100 1111 0011 1001
b) 0110 1100 0000 1010 0011 1011 1011 1111
0010 1111 1111 1111 1100 1101 0111 1001
5. Multiply the following 8-bit unsigned
binary numbers using the third mutliply algorithm (described in class
and in Figure 4.32 in the new book, Figure 4.27 in the old book). Show
the bit patterns for both the multiplicand register and the product register
at each step of the algorithm.
Multiplicand: 0011 1011
Multiplier: 1101 1100
6. Divide the following 8-bit unsigned
binary numbers using the third division algorithm (described in class
and in Figure 4.40 in the new book, Figure 4.37 in the old book).
Show the bit patterns for both the divisor register and the remainder
register at each step of the algorithm.
Dividend: 1010 0001
Divisor: 0001 0011