$30
CSCI 360 Assignment 2 – Binary, Hex and Absolute Addresses
60 points
Do not use a calculator to complete this. You are required to show your work. It is important that you know how to do what is included in this exercise without a calculator as you will be asked to do these types of conversions and binary or hexadecimal arithmetic on quizzes and exams.
You may NOT work with someone else on this assignment! Do your own work!
To complete and submit this assignment, please use a text editor like Notepad++, Notepad or Wordpad and use a non-proportional or fixed-width font like Source Code Pro or Courier New.
Please type your name, CSCI 360, Summer 2021, and the due date (in that order and on four separate lines) in the top right corner of the first page of the text document you submit. Please type very clearly, line up any columns necessary and be sure to indicate which question you are answering. If you can change the color of the font for just your answers to red, please do so.
Once again, you must SHOW your work!
1. Convert the following unsigned binary numbers to their decimal representations: (8 points)
a. 110
b. 1101
c. 1101011
d. 0101
2. Convert the following unsigned hexadecimal numbers to their decimal representations: (8 points)
a. 14
b. C1
c. CE9
d. B19
3. Convert the following unsigned decimal numbers to both hex and binary representations: (8 points)
a. 14
b. 456
c. 48
d. 4095
4. Do the following unsigned binary arithmetic giving the answer in binary: (8 points)
a. 10110 + 01101
b. 11001 + 00101
c. 10110 - 01111
d. 11111 - 01101
5. Do the following unsigned hexadecimal arithmetic giving the answer in hexadecimal: (8 points)
a. 829D + 1A82
b. E2C + A32
c. FA28 – 3254
d. E2C - AB1
6. Do the following arithmetic as if these were five-bit signed representations and indicate if overflow occurs and, if so, why. Note: Remember that you want to add. So, for signed subtraction, always convert the subtrahend (the number being subtracted) to its 2's complement and add it. Do this whether or not the subtrahend is negative OR positive and still check for overflow! (8 points)
a. 10110 + 01101
b. 11001 + 00101
c. 10110 - 01101
d. 11111 - 01011
7. Assume that
Register 0 contains 0007F144
Register 1 contains 00000128
Register 7 contains EC0735C8
Register 9 contains 00000C22
If they are valid, calculate the absolute D(X,B) addresses for the representations below. If they are not valid, explain why. (12 points)
a. 56(,1) yes
b. 0(0,1,7) No not D(X,B) syntax error
c. 6(7,0) No
d. 12(9) No
e. 255(9,1) NO
f. 11(1,7)