Return to course page

Skim §2 for parts you don't remember

In the following questions, let B be the maximum number (closest to postiive infinity) and S the minimum (closest to negative infinity) in the number system listed.

Question 1: (see above) In two's compliment,

  1. B + 1 == 0

  2. S - 1 == 0

  3. -B == B

  4. -S == S

  5. None of the above

Question 2: (see above) In unsigned binary,

  1. B + 1 == 0

  2. S - 1 == 0

  3. -B == B

  4. -S == S

  5. None of the above

Question 3: Assume x and y are binary numbers. Let u be the result of adding x and y using unsigned arithemtic and s be the result of adding x and y using signed (two's compliment) arithmetic. Assume all values are 64-bits long.

  1. a and b have the same bits set as one another for all x andy`

  2. a and b have different bits from one another for all x and y

  3. a and b might have the same or different bits, depending on the values of x and y

Question 4: Suppose you have a 32-bit unsigned int value initialized with a hexidecimal constant like 0xa180039b. If you change just one hexadecimal digit in the constant, what is the maximum number of bits that could change?

Answer:
Return to main page
Return to course page