CS 117 Assignment, Due 4/30/97
HAND IN ON PAPER.
- For each of the following 16-bit two's complement
integers, compute the decimal equivalent.
- 0000 0000 0000 1101
- 1111 1111 1111 0111
- 1000 0000 0010 0000
- For each of the following decimal integers, compute
the 16-bit two's complement equivalent.
- What are the largest and smallest integers that can
be represented in 16-bit two's complement notation? Give
your answer in base ten.
- Add 11010 to 1011 directly in binary (don't translate
to decimal first). Show your work.
- 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?
- 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 ten, you shift the decimal point
to the right one place. How can you shift a binary point to the right?