Homework 2, Representation.

Goals

When you finish this homework, you should have:

Formal Description

Do the following
  1. Two's-complement representation
    Represent each of the following as a 8-bit two's-complement integer.
    1. -5
    2. -12
    3. 64
    4. -128
  2. Two's-complement representation
    1. What is the range of numbers for a 4-bit two's-complement integer?
    2. What is the range of numbers for a 7-bit two's-complement integer?
    3. What is the range of numbers for a n-bit two's-complement integer?
  3. Two's-complement overflow
    Using 8 bit two's-complement calculate 127 + 1
    1. Write 127 in binary.
    2. Perform the addition.
    3. Interpret the resulting 8-bit pattern as a signed integer.
    4. Did the mathematical answer fit in 8-bit two's complement?
    5. Explain what went wrong.
    6. Explain how you can detect that something went wrong.
  4. Parity
    In an even parity system the message sent is 10111000 and the receiver gets 10110100
    1. The received message is different from the original. How many bits changed?
    2. Does the even-parity check detect the error? Explain why or why not.
  5. RAID:
    Suppose a RAID system has the following
    Drive Byte 1
    1 10110011
    2 01101001
    Assume RAID level 5, or drive 3 is used for parity.
    1. Compute the value stored at Byte 1 of drive 3
    2. Assume the data on drive 1 is lost, show the computation to recover that data.
    3. Why is XOR particularly useful in this computation?
  6. Representation
    Consider 11110110. Determine the value of this bit pattern in:
    1. Unsigned Binary7
    2. Sign-magnitude
    3. 9-bit two's complement.
    4. 8-bit two's complement.
    5. ASCII
    Explain why the same eight bits can represent different numbers depending on the representation system.

Notes:

This homework was designed with the assistance of chatGPT. I submitted the notes pages and it provided some suggestions for questions.
As I have done, if you work in a group or use AI, you are required to state this. In addition, you are required to state the percentage of the work you had AI do for you.

Required Files

Please submit an electronic document with you answers.

Submission

Submit the assignment to the D2L folder Homework 2 by the due date.