Solved CSCI 463-1 Computer Systems Organization Spring 2025 Homework #4

$30.00

Original Work ?

Download Details:

  • Name: hw4-9ptgwy.zip
  • Type: zip
  • Size: 33.58 KB

Category: Tags: , , You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

Formatting guide for binary and hex numbers:

  1. a) Write binary numbers with a blank separating every group of 4 digits starting in both directions from the binary point (just as commas are inserted in decimal integers from the right).
  2. b) Make sure you fill out the byte, i.e., an even number of 4‑digit groups in binary or an even number of digits in hex.
  3. c) To keep Excel from omitting initial 0’s, you can put an apostrophe in front of the number.
  4. d) Extra zeroes to the left of an unsigned binary number or to the right of any binary fraction do not change the value, just as in decimal or hex. However, if a question asks for a specific length, e.g., a 16‑bit binary number (signed or unsigned), you must give a 16‑bit number.

Part I: Two’s complement

1a. Convert unsigned binary 0101 1010 0001 1010 to decimal.

1b. Convert 16-bit two’s complement 0101 1010 0001 1010 to decimal

1c. Do the results of #1a and #1b have the same decimal value? Why or why not?

 

2a. Convert unsigned binary 1101 1010 0001 1010 to decimal.

2b. Convert 16-bit two’s complement binary 1101 1010 0001 1010 to decimal.

2c. Do the results of #2a and #2b have the same decimal value? Why or why not?

 

3a. Convert 8-bit two’s complement 1001 0110 to decimal.

3b. Convert 16-bit two’s complement 0000 0000 1001 0110 to decimal.

3c. Do the results of #3a and #3b have the same decimal value? Why or why not?

 

4a. Convert decimal 510 to 16-bit unsigned binary.

4b. Convert decimal 510 to 16-bit two’s complement binary.

4c. Do the results of #4a and #4b have the same bit string? Why or why not?

 

5a. Convert decimal -510 to 16-bit two’s complement binary.

5b. Treat the result of the previous problem as an unsigned 16-bit binary number. Convert it to decimal.

5c. Take the answer to 5b and add 510 to it. What do you get? Express the answer as a power of 2.

5d. Why do you get that power of 2?

 

 

 

Part II: Binary fractions

6a. Convert 0.6875 to binary.

6b. Convert 0.6875 to hex.

7a. Convert 0.6 to binary. Truncate after 8 bits.

7b. Calculate the error in the previous conversion, i.e., the original value minus the decimal equivalent of the truncated value. (Do the calculation and express the result in decimal.)

 

7c. Convert 0.6 to hex. Truncate after two hex digits.

7d. Calculate the error in the previous conversion.

7e. What is the relationship between the answers to 7b and 7d? Why?

 

7f. Convert 0.6 to binary, truncating after 4 bits.

7g. Calculate the error in the previous conversion.

7h. Which is greater, the answer to 7a or 7f? Why?

7i. Which is greater, the answer to 7b or 7g? Why?

 

8a. Convert binary 0.0101 1011 to decimal.

8b. Convert binary 0.0101 1011 to hex.

 

8c. Convert binary 101.0101 1011 to decimal.

8d. Convert binary 101.0101 1011 to hex.

(Hint: convert the integral part and the fractional part separately, then add the two results.)

 

9a. Convert 0x00.e2 to binary.

9b. Convert 0x00.e2 to decimal.

9c. Convert 0x5a.e2 to binary.

9d. Convert 0x5a.e2 to decimal.

 

Part III: Overflow

10a. Binary addition (unsigned numbers):

1 0 1 1 0 0 1 1
+          0 0 1 1 0 1 1 0

 

 

10b. Convert the three numbers in #10a to decimal. Is the calculation correct? Why or why not?

11a. Binary addition (8-bit two’s complement form):

1 0 1 1 0 0 1 1
+          0 0 1 1 0 1 1 0

 

 

11b. Convert the three numbers in #11a to decimal. Is the calculation correct? Why or why not?

  1. Do the results of #10a and #11a have the same decimal value? Why or why not?

13a. Binary addition (8-bit two’s complement form):

0 1 1 1 0 0 1 1
+          0 1 1 1 0 1 1 0

 

 

13b. Convert the three numbers in #13a to decimal. Is the calculation correct? Why or why not?

14a. Binary addition (unsigned numbers):

0 1 1 1 0 0 1 1
+          0 1 1 1 0 1 1 0

 

 

14b. Convert the three numbers in #14a to decimal. Is the calculation correct? Why or why not?

  1. Do the results of #13a and #14a have the same decimal value? Why or why not?

16a. What is the negation of 0011 0101 in 8-bit two’s complement form?

16b. What is the negation of 0011 0101 in 16-bit two’s complement form?

16c. Consider the results of #16a and #16b as unsigned binary. Do they have the same decimal

value? Why or why not?

 

17a. Binary subtraction (Hint: negate the second number by taking its 8‑bit two’s complement, then add it to the first number.):

0 1 1 1 0 1 1 0
–           0 0 1 1 0 1 0 1

 

 

17b. Convert all three numbers in #17a to decimal.

17c. Is the calculation in #17a correct? Why or why not?