Name:

Quiz 8

Regarding Reading 8.

  1. How many bits are needed to properly store the sum of two 32-bit numbers?
  2. Solve the following binary addition problems; provide your answer in base-2 and base-10.
      1000 1010      1010 1010      1111 1111      0001 1000
    + 1110 1001    + 0101 0101    + 1000 0001    + 1011 1101
      _________      _________      _________      _________
    
  3. In your own words, explain why a half-adder is called a half-adder.
  4. What are the three steps for subtracting two numbers without borrowing? (assume minuend > subtrahend)
  5. Distill a simple formula for subtracting without borrowing (hint: pages 144/145). Solve the following base-10 subtraction problem using that formula, showing your work: 2014 - 1976.
  6. What is a simple way to get the one's complement of any binary number? (hint: doesn't require math)
  7. Solve the following binary subtraction problems, showing the use of one's complements. Show each of the three steps of your work.
      1010 1010      1111 1111      0000 1000      1000 1010      0001 1000
    - 0101 0101    - 1000 0001    - 0000 0100    - 1110 1001    - 1011 1101
      _________      _________      _________      _________      _________
    
  8. Using the adder diagram at the bottom of page 150, convince yourself that it works with the following problems. Note that this machine does not properly display negative numbers (p151 ΒΆ3). Show your work by writing the numbers as they change through the circuitry, and show the use of the SUB switch/bit.

    0000 1000 + 0000 0100      1111 1111 + 1000 0001      0000 1000 - 0000 0100     0000 0100 - 0000 1000
    
  9. The three steps in #2 above can be distilled into a simple rule when using ten's or two's complement to subtract two numbers (aka adding a negative number). "To subtract two decimal numbers, simply ______ the _____'s complement of the __________ to the _____________."
    Hence, 65 - 138 ==> 65 + (-138) ==> 65 + ______ = ______ (or -___).
  10. What's the easy way to figure out the two's complement of a binary number?