Homework 1
Due:  Beginning of class Thursday, January 31st
Turnin: Four solutions: 1 iv, 1 v, 5, and 9. To receive credit for your solutions, you must show your work where applicable. Solutions to the remaining problems are attached.
1. — Assume that 16-bit, two’s complement, binary numbers are being used in this problem. Some binary arithmetic and conversions. For each of the pairs of numbers below, compute:
a.) hexadecimal (base 16) equivalents for both a and b, assume unsigned numbers
b.) octal (base 8) equivalents for both a and b, assume unsigned numbers
c.) decimal (base 10) equivalents for both a and b, assume signed numbers
d.) a + b and indicate if overflow occurs, assume signed numbers
e.) a - b by negating b and adding, indicate if overflow occurs, assume signed numbers
i.)    a = 0100 0111 0101 1000
    b = 1000 0000 1100 0110
ii.)    a = 0001 0000 0011 1000
    b = 0111 0010 0100 1011
iii.)    a = 0000 0000 0110 1100
    b = 0000 0001 1010 1001
iv.) turnin this one (15 points, 3 points each part)
    a = 1011 0001 1111 0101
    b = 1001 0111 1101 0011
v.) turnin this one (15 points, 3 points each part)
    a = 0110 1011 1001 1000
    b = 0100 1101 0010 1111
2. —problem 3.30, page 232 [15] <§§3.2, 3.6> Given the bit pattern (not the same as the textbook’s bit pattern):
1000 1111 1110 1111 1100 0000 0000 0000
what does it represent, assuming that it is
a.) a two’s complement integer?
b.) an unsigned integer?
c.) a single precision floating-point number?
3. — This exercise is similar to the previous one, but this time, use the bit pattern:
0000 0000 0000 0000 0000 0000 0000 0000
4. — This exercise is similar to the previous one, but this time, use the bit pattern:
0011 1100 0011 0000 0000 0000 0000 0000
5. turnin this one (15 points, 5 points each part) — This exercise is similar to the previous one, but this time, use the bit pattern:
0011 1110 0111 0100 0000 0000 0000 0000
6. — problem 3.37, page 232 [5] <§3.6> Show the IEEE754 binary representation for the floating-point number 10ten in single and double precision.
7. — This exercise is similar to the previous one, but this time use 10.5ten.
8. — This exercise is similar to the previous two, but this time use -42.3125ten.
9. turnin this one (10 points, 5 points each part)— This exercise is similar to the previous 3, but this time use 43,650.0078125ten.