Written Assignment 1
50 points
Write out your answers to these problems neatly in a text file and
submit your work by the due date.
Be sure to put your name on your paper.
Show your work!
Note: Only problem 6 involves two's-complement notation.
- (8 points) Convert the following binary numbers to their decimal
representations:
- B'1001'
- B'10110'
- B'101110'
- B'101011'
- (8 points) Convert the following hexadecimal numbers to their
decimal representations:
- X'3C'
- X'A9'
- X'4E8'
- X'507'
- (8 points) Convert the following decimal numbers to their
hexadecimal and binary representations:
- 37
- 1194
- 359
- 2047
- (8 points) Do the binary arithmetic:
- B'01110' + B'11011'
- B'10110' + B'01111'
- B'10101' - B'01100'
- B'11101' - B'01110'
- (8 points) Do the hexadecimal arithmetic:
- X'2581' + X'94BD'
- X'F28' + X'31C'
- X'5BE7' - X'36C1'
- X'EAB' - X'B84'
- (6 points) The integers in the following computations are indicated in
hexadecimal, but represent 32-bit two's complement binary numbers.
Perform the operations and indicate if overflow occurs and why.
(If overflow occurs the result is invalid, but show it anyway.)
a. X'D4C3B2A1' b. X'754C4612'
+ X'3456ABCD' + X'1003A642'
------------- -------------
c. X'E044032F' d. X'645C2041'
- X'A18492A2' - X'781D30B1'
------------- -------------
e. X'7FFFFFFF' f. X'E8866541'
+ X'70000001' - X'920B011F'
------------- -------------
- (4 points) Assume that:
- Register 0 contains X'00043E6C'
- Register 1 contains X'0000007D'
- Register 7 contains X'FF028CC4'
Here are some expressions which may be D(X,B) addresses. If they
are valid, calculate the values (in hexadecimal), and if they are
not valid, explain why not:
- 38(0,1)
- 0(0,7,1)
- 117(0,7)
- 49(7,1)