Quiz 1

You have up to 25 minutes. You may use a calculator, but no text book or notes.

  1. Using 7-bit signed (two’s complement) binary numbers, what is the largest positive number? What is the smallest negative number?

  2. Convert the following 16-bit binary number into hexadecimal.

    0 1 1 1 1 1 1 1 0 0 1 1 1 0 1 0

  3. Add and verify the following unsigned binary numbers.

      1 0 1 1 1 1                      1 1 0 1 1 1
    + 0 1 1 1 0 1                    + 1 0 0 1 0 0
    ——————————————                   ——————————————

  4. Suppose we need to send a text message uses just 15 distinct characters. How many bits per character are required if we’re using a fixed encoding?

  5. Draw a binary tree that corresponds to the following variable-width encoding of four characters. The characters should appear in boxes at the leaves. Branch left on a zero, or right on a one.

    T 00  
    R 010 
    N 011 
    O 1   

  6. Use the character encoding from the previous question to decode the following word:

    0 0 1 0 1 0 1 0 1 1 0 0 1