CS 117 Assignment, Due 1/26/96

Hand in this assignment on paper in class on Friday.
  1. For each of the following positive binary integers, what is the decimal equivalent?
  2. Add 11010 to 1011. Show your work (in particular, show where you get carries, and where you don't). You can check your work by translating the numbers into decimal, but I want to see you do the usual gradeschool addition algorithm in base 2 instead of base ten.
  3. Multiply 11010 and 1011. Show your work again.
  4. 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?

  5. 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?

    When you multiply a decimal number by 10, you shift the decimal point to the right one place. How can you shift a binary point to the right?

  6. Rewrite the following base ten numbers as 16-bit two's complement integers, as 16-bit signed magnitude integers, and as 16-bit excess-32767 integers: -1, 31, -31, 1729.
  7. What does the bit pattern 01101001 represent if you interpret it as an 8-bit two's complement integer? An 8-bit signed magnitude integer? An 8-bit excess-127 integer? A character using ASCII?




Jeff Ondich, Department of Mathematics and Computer Science, Carleton College, Northfield, MN 55057
(507) 663-4364, jondich@carleton.edu