Quiz 1 Solutions

16 September 2013

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

  1. Convert the following unsigned binary numbers into base ten.

    1. 111    = 7
    2. 10110    = 22
    3. 11001    = 25
    4. 11111    = 31
  2. What do all multiples of four have in common, when written in binary? (Hint: try writing the quantities 4, 8, 12, 16 in binary.)

    Multiples of four always end with 00.

  3. Convert the following 4-bit signed (two’s complement) binary numbers into base ten.

    1. 0101    = +5
    2. 0111    = +7
    3. 1011    = –5
    4. 1111    = –1
  4. Convert the following 16-bit binary number into hexadecimal (base 16), and then into octal (base 8).

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

    Hexadecimal: 1101,1100,1010,1110 = DCAE
    Octal: 1,101,110,010,101,110 = 156256

  5. Convert the following hexadecimal numbers into binary:

    1. D1    = 1101,0001
    2. F6    = 1111,0110
    3. 38    = 0011,1000
  6. Add and verify the following unsigned binary numbers.

    We keep the extra carry bit, because these are unsigned and I didn’t say they were fixed width!

          1 1                        1   1             
      1 0 0 1 1 0  = 38                1 0 1 0 1 1  = 43
    +   1 0 0 1 1  = 19              + 1 0 1 1 0 0  = 44
    ——————————————                   ——————————————
      1 1 1 0 0 1  = 57              1 0 1 0 1 1 1  = 87