Assignment 1 for CSCI 201

Description:

In this assignment you are asked to do both a written and a programming assignment. Both assignments are due two weeks from the date that this assignment is given.

Written Assignment (show all of your work):

This assignment my be submitted electronically as describe below or it may be submitted in hard copy at the start of class on the day it is due.

  1. Convert the following base 10 numbers to base 2 (binary) using 8 bits to represent each binary number in two's complement format:
    1. 23
    2. 76
    3. 15
    4. -7
    5. -78
    6. -10
  2. Compute the following products and sums in binary (show only as many bit as necessary to perform the calculation and represent the answer):
    1. -8 + 8
    2. 5 x 4
    3. 12 - 11
  3. Exercise 2.7 and 2.8 on page 96 of your text.

Programming Assignment:

Write the C++ program described in exercise 2.20 of your text. The output temperature should include fractional degrees when appropriate. Be sure to use good programming style.

What to turn in: