Quiz 2

This quiz covers Appendices A and B of Tanenbaum. Please allow yourself up to 1 hour to take the quiz, and return it to me by 10:00 AM, Tuesday, September 16, if you would like for me to mark it. I will post my answers via the course homepage later that day.

Solutions appear below each question in italics.

  1. Convert the following numbers base 3 to their decimal, binary, and hexadecimal equivalents: 120, 21012, 1020102.

    120 base 3 = 15 base 10 = 1111 base 2 = F base 16; 21012 base 3 = 194 base 10 = 10111010 base 2 = BA base 16; 1020102 base 3 = 902 base 10 = 10110011 base 2 = 2E6 base 16.

  2. Convert the following numbers base 10 to their binary equivalents: 10.5, -12, 1023.9921875.

    10.5 = 10 + 1/2 = 1010.1 base 2; -12 = -1100 base 2; 1023.9921876 = 1023 + 127/128 = 111111111.1111111 base 2.

  3. Convert the following decimal numbers to sixteen-bit one's complement binary numbers: 32500, -12345, -2.

    0111111011110100; 1100111111000110; 1111111111111101.

  4. Convert the following decimal numbers to eight-bit two's complement binary numbers: 120, -12, -120.

    01111000; 11110100; 10001000.

  5. Convert the following eight-bit one's complement numbers to decimal: 10101010, 01000010, 11111111.

    -85; 66; -0.

  6. Convert the following eight-bit two's complement numbers to decimal: 01010101, 10111100, 11111111.

    85; -68; -1.

  7. Perform an eight-bit two's complement addition of 01010101 and 10101011.

    0.

  8. In IEEE single-precision notation, there is a sign bit, an 8-bit radix 2 excess 127 exponent, and a 23-bit significand in which the leading 1 is implied for normalized numbers.

    Convert the following decimal numbers to a 32-bit hexadecimal representation of their IEEE single-precision floating point equivalents: 32.03125, -1.5, -99.875.

    42002000; BFC00000; C2B7C000.

  9. Convert the following 32-bit hexadecimal representations of IEEE single-precision floating point numbers into their decimal equivalents: 01230000, FEDC0000, ABC00000.

    2.9938 x 10**-38; -1.4622 x 10**38; 3.3307 x 10**-16.

Copyright © 1997, Ray Ontko (rayo@ontko.com).
If you're curious about why I copyright, see Peter Suber's Why Copyright Web Documents?.