Assignment 02

Contents:

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

  • Overview

    Topic: Number Systems and Arithmetic
    Related Reading: Ch. 2
    Due: 9am Wednesday, 24 July 2002

    Internet Requirements

    You will need an Internet connection for completing the assignment as well as submission.

    Practice Problems

  • Exercise 4 of Ch. 2 (p. 47); answer in back of text

  • Exercise 6 of Ch. 2 (p. 47)

  • Exercise 11 of Ch. 2 (p. 47)

  • Exercise 13 of Ch. 2 (p. 47); answer in back of text

  • Exercise 14 of Ch. 2 (p. 47)

  • Exercise 15 of Ch. 2 (p. 47)

  • Exercise 16 of Ch. 2 (p. 48); answer in back of text

  • Exercise 22 of Ch. 2 (p. 48); answer in back of text

  • If you want to give yourself a way to practice and then check your answers, many calculators will do some conversions for you. In particular, the standard calculator application that comes as part of Windows will convert numbers between decimal, binary, octal or hexadecimal. This calculator can usually be started by looking in the Start -> Programs -> Accessories menu. When it begins, it generally looks like a very simple calculator. However, there is a menu title "View" at the top of the calculator that lets you select between "Standard" and "Scientific" views. Select the Scientific view.

    In scientific mode, you will see a box that allows you to pick between one of four number systems: Hex(adecimal), Dec(imal), Oct(al), or Bin(ary). If you want it to convert from decimal to binary, select decimal mode, then type in a decimal number, then click on binary mode. In the same way you can convert from binary to octal, and so on. You can also perform all of the arithmetic operations while working in any of the number systems. Please note, however, that this calculator does not handle fractional values in any base other than decimal.

    One warning: When working outside of decimal notation, the calculator can only handle values which fit in 32 bits or less (limit is slightly less than 4.3 billion). Also, I strongly recommend that you keep the selection on the right as "Dword" when working in one of the other bases.


  • Problems to be Submitted (20 points)

      First, we wish to verify that you were successful in learning to use the Windows (or similar) calculator. These first problems are based on numbers that are intentionally too large to do by hand in a timely manner.

    1. (2 points)
      Convert 4048891811(base 10) to hexadecimal.

    2. (2 points)
      Convert 16108610(base 8) to decimal.

    3. (2 points)
      Perform the following hexadecimal addition:
      A52E4F03B + 902DC47
    Next, we wish to verify that you were successful in learning to do these calculations by hand. For this problems, we intentionally use various bases that cannot be checked using the Windows calculator. (If you have some other calculator which works with various bases, please do not use it! You need to be able to do this by hand)

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

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

    3. (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.

    4. (3 points)
      Express in base 7, the sum
      4302463(base 7) + 513460(base 7)

    5. (4 points)
      At the end of Ch. 2 there are a series of "Thought Questions." Pick any one question to answer. The length of your answer should be appropriate for the question, however I envision answers in the range of 1/2-page to 1-page.
    Overall, please type your answers to all of the problems in a single document to be submitted electronically. Please see details about the submission process.

    Extra Credit (2 points)

    We are generally used to seeing mnemonic addresses on the Internet, such as www.coloradocollege.edu
    , known as a domain name.

    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, CC's web site (www.coloradocollege.edu) is hosted by a machine with IP address 205.170.0.81 (So if you prefer numbers, you can visit the website http://205.170.0.81.)

    Your extra credit challenge is twofold:

    1. Every computer on the Internet must have a distinct address. With the current IP address protocol, roughly how many distinct such address exist?
    2. An explanation of dotted decimal notation for IP addresses is provided on pp. 468-469 (though they do not use the term "dotted decimal"). What is the precise 32-bit binary pattern which is represented by the IP address "205.170.0.81"?
      (for legibility, please place a space after every four bits when typing your answer, such as 0000 0000 ...)


    ns121 Class Page
    visprof@coloradocollege.edu