\n"); $doctype = "XHTML5"; } else { header("Content-type: text/html; charset=utf-8"); $doctype = "HTML5"; } ?> CS-343 Assignment 1 Solutions

CS-343 Assignment 1

Solutions

  1. What is the logarithm, base 2, of the following decimal numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 16, 32, 64, 128, 256, 512, 768, 1024, 2048.
    0     -∞
    1     0
    2     1
    3     1.585
    4     2
    5     2.322
    6     2.585
    7     2.807
    8     3
    9     3.170
    10    3.322
    16    4
    32    5
    64    6
    128   7
    256   8
    512   9
    768   9.585
    1024  10
    2048  11
    
  2. Write the following decimal numbers in binary: 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48.
  3. 4      1 00
    8     10 00
    12    11 00
    16   100 00
    20   101 00
    24   110 00
    28   111 00
    32  1000 00
    36  1001 00
    40  1010 00
    48  1100 00
    
  4. What do all the binary numbers in your previous answer have in common (besides the fact that they are binary numbers!). Look at the pattern of zeros and ones.
  5. They all end with two zeros on the right.
    
  6. How about 12, 24, and 48: what binary pattern do they have in common?
  7. The all start with 11 followed by 2, 3, or 4 zeros.
    
  8. Summarize the answers to the two previous questions as a statement about what happens when you multiply binary numbers by 2 or by 4.
  9. If you multiply a binary number by 4 (which is 100 in binary),
    you append two zeros at the right of the original number, just
    like multiplying a decimal number by decimal 100.
    If you multiply a binary number by 2 (which is 10 in binary), you
    append one zero to the right end of the original number, just
    like multiplying a decimal number by decimal 10.
    
  10. 5K is 1010000000000 in binary. (5 followed by ten zeros.) Write the values 5M and 5G in binary.
  11. 5M = 101 0000000000 0000000000
    5G = 101 0000000000 0000000000 0000000000
    
  12. What is binary 1100 0000000000 0000000000 in decimal? Use the proper suffix in your answer so that your answer starts with a number between 0 and 1023.
  13. 12M
    
  14. How many picoseconds are there in 2.5 µsec?
  15. 2,500,000
    
  16. How many nanoseconds in 250 psec?
    0.25
    
  17. What power of 2 is 512?
  18. 9
    
  19. Approximately how many milliseconds did it take you to answer the previous question?
  20. About 100 msec. (Anything less, and you need more practice.
    Anything more, and you are in trouble for being faster than
    me!)
    
  21. What is the period, in picoseconds, of a 5 GHz clock?
  22. 200 psec
    
  23. What is the answer to the previous question in nanoseconds?
  24. 0.2 (one fifth of a nanosecond)
    
  25. Why does it make sense to say that a 10 MHz clock is twice as fast as a 5 MHz clock, but not to say that 100 degrees (farenheit) is twice as hot as 50 degrees?
  26. Speed is measured using ratio scales, which have both meaningful
    intervals and meaningful zero points, so ratios like "twice as"
    are meaningful. But the Farenheit scale is only an interval
    scale. The zero point is arbitrary, so it makes no sense to speak
    in terms of ratios. The Kelvin scale of temperature, however, has
    an absolute zero point, so one could use ratios to compare
    temperatures using that scale. (Question based on the
    supplemental material.)
    
  27. How did Claude Shannon propose measuring information?
  28. The unit of information is the amount of uncertainty reduced by
    answering one yes/no question.  (His colleague, John Tukey coined
    the term "bit" for "binary digit," which is equivalent to Shannon's
    formal definition. The word bit previously had the less specific 
    definition of "a small amount.")
    
  29. What is the frequency of a clock with a period of 50 msec?
  30. 0.02 × 103 Hz = 20 × 100 Hz
    = 20 Hz
    
  31. What is the frequency of a clock with a period of 50 µsec?
  32. 0.02 × 106 Hz = 20 × 103 Hz
    = 20 KHz
    
  33. What is the frequency of a clock with a period of 50 nsec?
  34. 0.02 × 109 Hz = 20 × 106 Hz
    = 20 MHz