Quiz 3

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

Solutions are shown below in italics.

  1. Consider a computer having a 12-bit memory cells.

    1. How many bytes of memory can be accessed using a 12-bit address?

      Well, 12-bit address means 2**12 memory cells * 12 bits per memory cell * 1 byte per 8 bits = 3 * 2**11 bytes * 1 Kbyte per 1024 bytes = 6 Kbytes.

    2. How many bytes of memory can be accessed using a 24-bit address?

      A 24-bit address means 2**24 memory cells * 12 bits per memory cell * 1 byte per 8 bits = 3 * 2**23 bytes * 1 Kbyte per 1024 bytes * 1 Mbyte per 1024 Kbytes = 24 Mbytes.

    3. How many bytes of memory can be accessed using a 36-bit address?

      A 36-bit address means 2**36 memory cells * 12 bits per memory cell * 1 byte per 8 bits = 3 * 2**35 bytes * 1 Kbyte per 1024 bytes * 1 Mbyte per 1024 Kbytes * 1 Gbyte per 1024 Mbytes = 96 Gbytes.

    4. If a single memory cell were used to store a single character, how many different characters could be represented by a cell?

      That would be 2**12 = 4096 possible character codes.

  2. A certain hard disk has 320 cylinders, 7 tracks, and 31 sectors of 512 bytes each. It spins at 3600 revolutions per minute, and has an adjacent cylinder seek time of 3 msec, and a max seek time of 100 msec. Switching between tracks in the same cylinder is instantaneous.

    1. What is the total available storage capacity of the disk?

      Well, 320 cylinders * 7 tracks per cylinder * 31 sectors per track * 512 bytes per sector = 3555328 bytes * 1 Kbyte per 1024 bytes * 1 Mbyte per 1024 Kbytes = 33.9 Mbytes, a fairly small drive.

    2. What is the minimum time required to read all the data on the disk, starting with the first track of the first cylinder, reading all the tracks in that cylinder, advancing to the next cylinder, etc.?

      There would be up to 100 msec for the heads to position to the correct cylinder, and then up to one rotation for the first sector to come by. The next 7 rotations (one per track) would be required to read the data for the entire cylinder. Now, notice that at 3600 revolutions per minute, there are 60 revolutions per second, or 16.67 msec per revolution. This is plenty of time for the 3 msec between adjacent cylinder seek time. So, the time required to seek/wait for the first sector is one revolution, and this must be done for all 320 cylinders. So we get 100 msec * 1 second per 1000 msec + 320 cylinders * (1 + 7) revolutions per cylinder * 1 second per 60 revolutions = 42.77 seconds.

  3. Compute the Hamming distance of the following code:
    0000011110001111
    0001011010011110
    0010010110101101
    0011010010111100
    

    First, we compute the distance for all pairs of codes.

    0000011110001111
                     4
    0001011010011110   4
                     8   8
    0010010110101101   4
                     4
    0011010010111100
    
    The distance of the code is the minimum disctance, in this case, 4. With this code it is possible to detect 3-bit errors, but one can only correct 1-bit errors.

  4. Show the 12-bit Hamming codes for the following 8-bit ASCII values (shown in octal):

    1. 0 = 60
    2. 9 = 71
    3. A = 101
    4. Z = 132
    5. a = 141
    6. z = 172

    0 =  60 base 8 = 00110000 base 2 = 100001100000
    1 =  71 base 8 = 00111001 base 2 = 000101101001
    A = 101 base 8 = 01000001 base 2 = 100010010001
    Z = 132 base 8 = 01011010 base 2 = 000010101010
    a = 141 base 8 = 01100001 base 2 = 110111010001
    z = 172 base 8 = 01111010 base 2 = 010111101010
    

  5. While browsing the web, you found an 8 Megabyte mpeg file which you wanted to download. Calculate a MINIMUM time (in days, hours, minutes, seconds) required to transmit the file to your PC at each of the following data rates:

    1. 56 Kbits per second (synchronous)

      With synchronous communication, 8 bits per byte are transmitted. Also, 56 Kbits per second means 56000 bits per second, NOT 56 * 1024 bits per second. So, 8 Mbytes * 1024 Kbytes per Mbyte * 1024 bytes per Kbyte * 1 second per 56000 bits * 8 bits per byte = 1198.37 seconds = 19:58.37, or about 20 minutes, at least.

    2. 19.2 Kbits per second (asynchronous)

      With asynchronous communication at 19.2 Kbits per second, 10 bits per byte are transmitted, and 19.2 Kbits per second means 19200 bits per second, NOT 19.2 * 1024 bits per second. So, 8 Mbytes * 1024 Kbytes per Mbyte * 1024 bytes per Kbyte * 1 second per 19200 bits * 10 bits per byte = 4369.07 seconds = 1:12:49.07, or about 1 hour 15 minutes, at least.

    3. 110 bits per second (asynchronous)

      With asynchronous communicatio at 110 bits per second, 11 bits per byte are transmitted. So, 8 Mbytes * 1024 Kbytes per Mbyte * 1024 bytes per Kbyte * 1 second per 110 bits * 11 bits per byte = 838860.8 seconds = 9 17:01:00.8, or about 1 day 17 hours, at least.

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