CS 117 Assignment, Due 4/30/97

HAND IN ON PAPER.

  1. For each of the following 16-bit two's complement integers, compute the decimal equivalent.
  2. For each of the following decimal integers, compute the 16-bit two's complement equivalent.
  3. What are the largest and smallest integers that can be represented in 16-bit two's complement notation? Give your answer in base ten.
  4. Add 11010 to 1011 directly in binary (don't translate to decimal first). Show your work.
  5. When you look at an integer expressed in the decimal system, it's easy to tell whether the number is divisible by 2, or 5, or 10, or 100, or 1000, or.... For example, a number is divisible by 5 if its decimal expression ends with a 5 or a 0, and a number is divisible by 100 if its decimal expression ends in two zeros. What sorts of divisibility are easy to see when a number is expressed in binary?
  6. The number 1.398 is equal to 1 + 3/10 + 9/100 + 8/1000. If we move to binary, and use a "binary point" instead of a decimal point, what will the following numbers equal?
  7. When you multiply a decimal number by ten, you shift the decimal point to the right one place. How can you shift a binary point to the right?