Computer Systems Architecture
I. Convert the following numbers from decimal to binary and then to hexadecimal (Don't use IEEE 754 format for this question):
a. 31.875
b. 4128.3125
II. Explain how multiplication was implemented in binary format in computers. Use an example such as 156 * 25 to explain the multiplication step by step.
II b. Represent 127.625 in a 32-bit IEEE 754 format
III. What is a stack? Explain how a stack works. Use a diagram or example to show how PUSH and POP instructions are used in stack instructions for subroutines
IV. 2's Complement (4 points each, 20 points total)
a. How do you do subtraction with two's complement? (In words, not a formula.)
Using 4-bit two's complement numbers for question b & c, show how to represent the following operations and their results. If you cannot, explain why.
b. 4 - 7
c. 11 - 3
d. Let the decimal numbers A=54, B= -77, give their 8-bit 2's complement representation
e. Compute A-B in 2's complement, and explain the steps of your solution. If there is any problem in finding the solution, explain as well.
V. Little Man Computer

Using the above Little Man Computer and Instruction Set, answer any 2 the following 3 questions:
1. Write a program that asks for 3 numbers and add them to give a total. Output the total
2. Write a program which outputs the numbers 5, 4, 3, 2, 1, 0 then stops.
3. The following program tries to find the positive difference between two input numbers, read the code to check whether there are some errors and correct them (without using more DAT mail boxes, that is, data location is only the cell 99).
00  IN                    901     
01  STO 99            399     
02  IN                    901     
03  SUB 99           299     
04  BRP 06           806     
05  ADD 99          199     
06  OUT    902     
07  COB                000     
...              ...                    ...
99  DAT 00           000