Assignment 02

Contents:

  • Overview
  • Internet Requirements
  • Practice Problems
  • Problems to be Submitted
  • Extra Credit

  • Overview

    Topic: Memory and Data Representation
    Related Reading: Ch. 1.1-1.5 of [Br]; pp. 203-207 and p. 248 of [DH]
    Due: 8pm Thursday, 31 January 2002

    Internet Requirements

    You will not need an Internet connection until it comes time to submit your work.

    Practice Problems

  • Question 3 of Ch. 1.2 of [Br] (p. 29).
    answers appear in Appendix F

  • Questions 1 and 3 of Ch. 1.4 of [Br] (p. 43).
    answers appear in Appendix F

  • Chapter Review Problems 10 and 11 of Ch. 1 of [Br] (pp. 71, 72)

  • practice with numerical representations and arithmetic
  • Questions 5 and 6 of Ch. 1.1 of [Br] (p. 26).
    answers appear in Appendix F
  • Questions 5 and 6 of Ch. 1.4 of [Br] (p. 44).
    answers appear in Appendix F
  • Questions 1, 2 and 5a of Ch. 1.5 of [Br] (p. 47).
    answers appear in Appendix F
  • Practice converting numbers between bases, and in doing addition in any given base. If you restricte your practice to the bases: 2, 8, 10, 16, you can self-check your work by using a calculator to check your work.

  • Problems to be Submitted (20 points)

    1. (2 points)
      Chapter Review Problem 6 of Ch. 1 of [Br] (p. 71)

    2. (2 points)
      Chapter Review Problem 14 of Ch. 1 of [Br] (p. 72)
      (Note: a standard 3-1/2 inch floppy disk holds 1.44MB of data)

    3. (2 points)
      Chapter Review Problem 22 of Ch. 1 of [Br] (p. 72)

    4. (3 points)
      Chapter Review Problem 24 of Ch. 1 of [Br] (p. 72)
      (Note: a table of the ASCII code in binary is given in Appendix A of [Br])

    5. (2 points)
      Convert the number 2532(base 6) into its base 10 representation.

    6. (3 points)
      Convert the number 348(base 10) into its base 5 representation.

    7. (3 points)
      Much as it was easy to convert directly between binary and octal or binary and hexidecimal, it should be easy to convert between base 3 and base 9 (every digit in base 9 will correspond to two digits in base 3)

      Convert the number 64182(base 9) into its base 3 representation.

    8. (3 points)
      Express in base 7, the sum
      4302463(base 7) + 513460(base 7)
    Overall, please type your answers to all of the problems in a single document to be submitted electronically. Please see www.cs.luc.edu/~mhg/comp150/submit/ for details about the submission process.

    Extra Credit (2 points)

    We are generally used to seeing mnemonic addresses on the internet, such as: www.luc.edu
    Internally, however, every machine on the internet is actually identified by a unique, 32-bit pattern, known as an IP address (Internet Protocol).

    Though it might seem natural to represent those 32 bits in binary, or in hexadecimal, the general convention used is termed dotted decimal notation. For example, Loyola's web site (www.luc.edu) is hosted by a machine with IP address 147.126.59.68. (So if you prefer numbers, you can visit the website http://147.126.59.68.)

    An explanation of dotted decimal notation is provided in Question 8 of Ch. 1.4 of [Br] (p. 44). Consider that question as practice; the answers are in Appendix F.

    Your extra credit challenge is to provide the precise 32-bit pattern which is represented by the IP address 147.126.59.68. (for legibility, please place a space after every four bits when typing your answer, such as 0000 0000 ...)


    comp150 Class Page
    mhg@cs.luc.edu
    Last modified: 23 January 2002