Assignments | Class Photo | Course Home | Schedule & Lecture Notes | Submit | Tutoring Hours

## Assignment 02

### Overview

Topic: Number Systems and Arithmetic
Due: 8pm Tuesday, 5 February 2008

### Internet Requirements

You will not need an Internet connection for completing the assignment, other than for submission.

### Practice Problems

• If you want to give yourself a way to practice and then check your answers, many calculators will do some conversions for you.
• The calculator which ships with Macintosh "OS X" can work in several common baces. Select the menu choice: View -> Programmer. You can enter numbers either in Decimal, Octal or Hexadecimal and then have the calculator do conversions between those bases. Furthermore, it will show you the entire 64-bit binary code for that value and will even display its ASCII or Unicode equivalent!

• 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 Macintosh or Windows calculator and/or the Meyer software. These first problems are based on numbers that are intentionally too large to do by hand in a timely manner.

1. (2 points)

2. (2 points)

Convert 2114112(base 8) to decimal.

3. (2 points)

52E4F03B + 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 standard calculators. (Even if you have some other calculator which works with those bases, please do not use it! You need to be able to do this by hand)

1. (3 points)

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

2. (3 points)

Convert the number 349(base 10) into its base 6 representation.

3. (4 points)

Express in base 7, the sum
4302463(base 7) + 513460(base 7)

4. (4 points)

Express in base 12, the sum
94A2B2(base 12) + 1505A69(base 12)

### Extra Credit (2 points)

Converting from binary to octal is easy because 81 = 23 (thus a correspondance exists between 1 octal digit and 3 binary bits).

Similarly, converting from binary to hexadecimal is easy because 161 = 24 (thus a correspondance exists between 1 hexadecimal digit and 4 binary bits).

It so happens that converting from base four to hexadecimal is straightforward because 161 = 42 (thus a correspondance exists between 1 hexadecimal digit and 2 digits in base four).

Convert the number 6F9C3(base 16) into its base 4 representation.

CSCI 140, Spring 2008